if(!this.b5mshoppingassist20131213173748)this.b5mshoppingassist20131213173748={};(function(e,t){var n=["jquery-highcharts","common","server"];e.define("adv",n,function(e,t,n){var s={};var a=0;var r=function(t){var r=false;var o='<div id="b5m_popPanel_wrap">'+'<div id="b5m_popPanel">'+'<a class="b5m-close" href="javascript:void(0);"/>'+'<iframe frameborder="0" scrolling="no" allowtransparency="true" />'+"</div>"+"</div>";var i=null;var c=document.createElement("link");c.rel="stylesheet";c.href=n.assets_base_url+"/css/default/b5m-plugin-adv.css";c.type="text/css";document.getElementsByTagName("head")[0].appendChild(c);i=e(o);var u=i.find("#b5m_popPanel");if(t.type=="image"){u.addClass("b5m-popPanel-image")}else if(t.type=="text"){u.addClass("b5m-popPanel-text")}else if(t.type=="js"){u.addClass("b5m-popPanel-js")}if(t.type!="js"){u.css("background","url("+t.skinUrl+") no-repeat")}u.find("iframe")[0].src=t.sourceUrl;i.appendTo(e("body"));e("body").css("overflow","auto");setTimeout(function(){i.show()},3e3);a=setTimeout(function(){i.animate({opacity:0},4e3,function(){e(this).remove()})},3e5);i.hover(function(){i.stop();i.css("opacity","1");hover=true;clearTimeout(a)},function(){hover=false;a=setTimeout(function(){i.animate({opacity:0},4e3,function(){e(this).remove()})},3e5)});u.find(".b5m-close").bind("click",function(){i.css("display","none")});u.bind("mousedown",function(t){if(t.button==2||t.button==3){t.stopPropagation();t.preventDefault();return false}if(e(t.target).hasClass("b5m-close"))return;s.start=1;p(t.screenX,t.screenY)}).bind("mouseup",function(){s.start=0;e(document).unbind("mousemove.adv")});e(document).bind("mouseup",function(){s.start=0;e(document).unbind("mousemove.adv")});function p(t,n){var a=t;var r=n;var o=parseInt(u.css("right"));var i=parseInt(u.css("bottom"));e(document).bind("mousemove.adv",function(e){if(s.start==1){o=o-(e.screenX-a);i=i-(e.screenY-r);u.css({right:o+"px",bottom:i+"px"});a=e.screenX;r=e.screenY}})}};function o(){var n=null;var s=null;var a=null;var r=(new Date).format("yyyy-MM-dd");try{var o=e.parseJSON(b5tplugin.getBrowserPopUrl());if(o){var i=o.newsdialog.content;for(var c=0;c<i.length;c++){if(i[c].displayPosition=="browser"&&i[c].effectiveDateStr==r){if(i[c].type=="js"){a=i[c]}else{s=i[c]}}}}}catch(u){}if(a){var p=a.showWebsite.replace(/\s/g,"");if(!p){p=".*"}var p=new RegExp(p);var l=t.getCookie("_n_p_ts");if(!l){l=0}l=parseInt(l);if(p.test(document.location.href)&&l<parseInt(a.showNum)){n=a;var f=(new Date).setHours(0,0,0,0)+24*3600*1e3;t.setCookie("_n_p_ts",l+1,new Date(f).toUTCString())}}if(!n&&s){var d="";try{d=t.getCache("b5m_popAdv_date")}catch(u){}var v=true;try{v=b5tplugin.isEnoughActiveDayNum()}catch(u){v=true}var r=new Date;var m=""+r.getFullYear()+r.getMonth()+r.getDate();if(v&&(!d||d!=m)){n=s;try{t.setCache("b5m_popAdv_date",m)}catch(u){}}}return n}Date.prototype.format=function(e){var t={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};if(/(y+)/.test(e))e=e.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length));for(var n in t)if(new RegExp("("+n+")").test(e))e=e.replace(RegExp.$1,RegExp.$1.length==1?t[n]:("00"+t[n]).substr((""+t[n]).length));return e};var i={run:function(){var e=document.getElementById("b5tplugin");if(!e)return;if(e.version<"4.0.8")return;var t=o();if(t){r(t)}}};return i})})(this.b5mshoppingassist20131213173748);