(function(){var e="wasaiAside_"+WasaiAsideConf.name;if(!WasaiAsideConf.isOn||qboot.cookie.get(e))return;var t=[".wasai_aside{","display:none;","position:absolute;","top:0px;","left:0px;","width:"+WasaiAsideConf.imgWidth+"px;","height:"+WasaiAsideConf.imgHeight+"px;","}",".wasai_aside .link{","display:block;","height:100%;","width:100%;","background:url("+WasaiAsideConf.img+");","_background-image:none;",'_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+WasaiAsideConf.img+'",sizingMethod="image");',"}",".wasai_aside .close{","position:absolute;","bottom:0;","left:8px;","width:16px;","height:16px;","text-indent:-999em;","}"].join(""),n=['<div class="wasai_aside">','<a class="link" href="'+WasaiAsideConf.url+'"></a>','<a href="javascript:;" class="close">X</a>',"</div>"].join("");qboot.load.css(t),qboot.await(function(){return window.QW&&window.M},function(){var t=W(n);W("#doc-view-front").insert("beforeend",t);var r=!0;t.receive("page-size-changed",function(n){if(qboot.cookie.get(e))return;var i=n.data.spaceWidth;if(i>WasaiAsideConf.imgWidth+5){var s=W("#important-news").getRect(),o=s.left-WasaiAsideConf.imgWidth-5,u=s.top-W("#doc-view").getRect().top;t.css({left:o+"px",top:u+"px"}),t.show(),r&&(LogHub&&LogHub.behavior("wasai_aside","show"),r=!1)}else t.hide()})},null,100,100),W(document).delegate(".wasai_aside .close","click",function(t){t.preventDefault(),W(".wasai_aside").hide(),qboot.cookie.set(e,1,{expires:864e6}),LogHub&&LogHub.behavior("wasai_aside","click")})})();