var SHOP_WINDOW=function(){"use strict";Date.now||(Date.now=function(){return+new Date}),Function.prototype.bind||(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var n=Array.prototype.slice.call(arguments,1),t=this,r=function(){},i=function(){return t.apply(this instanceof r?this:e,n.concat(Array.prototype.slice.call(arguments)))};return this.prototype&&(r.prototype=this.prototype),i.prototype=new r,i});var v=function(t){var e,r=[],n=document,i=n.documentElement,o=i.doScroll,a="DOMContentLoaded",s="addEventListener",l="onreadystatechange",c="readyState",d=(o?/^loaded|^c/:/^loaded|c/).test(n[c]);function u(e){for(d=1;e=r.shift();)e()}return n[s]&&n[s](a,e=function(){n.removeEventListener(a,e,!1),u()},!1),o&&n.attachEvent(l,e=function(){/^c/.test(n[c])&&(n.detachEvent(l,e),u())}),t=o?function(n){self!=top?d?n():r.push(n):function(){try{i.doScroll("left")}catch(e){return setTimeout(function(){t(n)},50)}n()}()}:function(e){d?e():r.push(e)}}();function d(e,n,t){var r=this;if(window.addEventListener)return e.addEventListener(n,function(e){t.call(r,e)},!1);e.attachEvent("on"+n,function(){var e=window.event;e.target=e.srcElement,t.call(r,e)})}function w(e){var n=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css",t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e)),n.appendChild(t)}function i(e){return"[object Array]"===Object.prototype.toString.call(e)}function o(e){return"[object Object]"===Object.prototype.toString.call(e)}function y(e){if(i(e))return 0===e.length;if(function r(e){return"[object String]"===Object.prototype.toString.call(e)}(e))return""===e;if(o(e)){var n=0;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){n++;break}return 0===n}return!1}function x(e){return null===e||e===undefined}function e(){function e(e){var n,t=1,r=0;if(e)for(t=0,n=e.length-1;0<=n;n--)t=0!=(r=266338304&(t=(t<<6&268435455)+(r=e.charCodeAt(n))+(r<<14)))?t^r>>21:t;return t}return(""+e(document.referrer)+(new Date).getTime()+e(document.cookie)).substr(0,32)}var k="QIHOO__WEB__SO__SHOP_WINDOW",_={multiColumnScene:{adNum:6}};window.QIHOO__WEB__UID||(window.QIHOO__WEB__UID=e()),window[k]||(window[k]={},window[k].UID=e(),window[k].displayShowId=[],window[k].elementName="qihooshopwindow"),window.QIHOO__WEB__DOUDI||(window.QIHOO__WEB__DOUDI=[]);var I=window[k],a=(window.QIHOO__WEB__DOUDI,window.QIHOO__WEB__UID),E=function(e,a,n){return n=n||/\{([^\{\}]*)\}/g,e.replace(n,function(e,n){var t=n.split("."),r=a;try{for(var i in t)t.hasOwnProperty(i)&&(r=r[t[i]])}catch(o){r=e}return"string"==typeof r||"number"==typeof r?r:e})};function O(e,n){if(i(e))for(var t=0;t=r.length&&(o.blockMarginLeft=0);var t=function a(e,n,t,r){if(e){if(2==t.tplid&&3==t.custom){var i="https:"==document.location.protocol?"https":"http";e.img=i+"://imgx.mediav.com/rimg.png?img="+encodeURIComponent(e.img)+"&size="+t.w+"x"+t.h}"titleBeside"==t.typeName&&(t.blockOverFlow="visible");var o={title:e.desc,curl:e.curl,prefix:n,price:e.price,img:e.img,marginTop:t.marginTop,overflow:t.blockOverFlow,textDisplay:t.textDisplay,text2Display:t.text2Display,blockMarginBottom:t.blockMarginBottom,showBeside:"titleBeside"==t.typeName?"block":"none"};return t.blockMarginLeft&&(o.blockMarginLeft="margin-right:"+t.blockMarginLeft+"px"),"rect_300_500"===t.size?(o.isHidden="hidden",2!==r&&3!==r||(o.blockMarginTop="margin-top:20px",o.blockMarginBottom="margin-bottom:20px"),0!==r&&1!==r||(o.blockMarginTop="margin-top:13px"),4!==r&&5!==r||(o.blockMarginBottom="margin-bottom:13px")):o.isHidden="",2==t.tplid?(3==t.custom&&t.w!=t.h&&(o.isHidden="hidden"),E('\r\n \r\n {title}\r\n\r\n',o)):E('\r\n \r\n \r\n {title}\r\n \r\n \r\n \r\n {title}\r\n \r\n \r\n \r\n \r\n \r\n {title}\r\n\r\n',o)}}(e,i,o,n);l++,t=te.fill(t,e),s.push(t)}),l=0}return s.join("")},update:function(e,n){document.getElementById(e);var t=window.adsData||[],r=this.dealFinalData(t,[],e,n),i="";t.adstk&&(i=t.adstk.join(",")),x(t.src)||"360搜索"==t.src&&(document.getElementById(e+"-adMark").style.display="none"),document.getElementById(e+"-info-content").innerHTML=''+r+' ',document.getElementById(e+"-loading").style.display="none",setTimeout(function(){!function i(e,n){var t=document.getElementById(e),r=document.getElementById(n);X(t,r),d(window,"scroll",$(X.bind(this,t,r),10))}(e+"-info",e+"-wrapper")},1e3),1'),i[s]&&c.push(this.renderFeed(i[s],t,r)),c.push(""),l.push(c.join(""))}return l.join("")},initEvent:function(e,n){document.getElementById(e);t(e,n)},sliderShow:function(i,e){var n,t=e,o=0,r=document.getElementById(i+"-info"),a=document.getElementById(i+"-wrapper");function s(e){var n=document.getElementById(i+"-wrapper"),t=parseInt(n.style.marginLeft),r=setInterval(function(){0<=t?(o-=100)<=-e&&(o=-e,clearInterval(r)):t<0&&0<=(o+=100)&&(o=0,clearInterval(r)),n.style.marginLeft=o+"px"},10)}function l(){n=setInterval(function(){s(t.w),setTimeout(function(){X(r,a)},500)},5e3)}l(),d(document.getElementById(i+"sliderLeft"),"click",function(e){s(t.w),setTimeout(function(){X(r,a)},500)}),d(document.getElementById(i+"sliderRight"),"click",function(e){s(t.w),setTimeout(function(){X(r,a)},500)}),d(document.getElementById(i),"mouseenter",function(e){clearInterval(n)}),d(document.getElementById(i),"mouseleave",function(e){l()}),d(document,"visibilitychange",function(e){"hidden"==document.visibilityState?clearInterval(n):"visible"==document.visibilityState&&l()})}};return function fe(e){I.displayShowId.push(e.showid);var n=6==window.adsData.Idtype?"https://p4.ssl.qhimg.com/t010aaf23d4ad7cde97.png":"https://p0.ssl.qhimg.com/t01c5fc7f8612d6b610.png",t=6==window.adsData.Idtype?"70px":"22px",r="magicCube";e.inject="inlay",e.style=r,e.layout="magicCubeScene";var i=e.size.split("_"),o=parseInt(i[1]),a=i[0];if("square_300"==e.size&&(e.row||e.line||(e.row=2,e.line=2),e.w=300,e.h=300,e.blockOverFlow="hidden",e.blockMarginBottom=0,e.textDisplay="block",e.text2Display="none"),"custom"==a&&(e.row||e.line||(e.row=2,e.line=2),e.w=o,e.h=o,e.blockOverFlow="hidden",e.blockMarginBottom=0,e.textDisplay="block",e.text2Display="none"),"custom"==a&&3==i.length){var s=parseInt(i[1]),l=parseInt(i[2]),c=parseInt(s/l);e.custom=3,e.row||e.line||(e.row=1,e.line=c),e.blockWidth=s,e.w=s,e.h=l}"rect"===a&&(e.rect=!0),"rect_300_500"==e.size&&(e.row||e.line||(e.row=3,e.line=2),e.w=300,e.h=500),"rect_300_250"==e.size&&(e.row||e.line||(e.row=2,e.line=2),e.w=300,e.h=250,e.blockMarginBottom=4,e.blockMargin=0),"custom_300_300"==e.size&&(e.row||e.line||(e.row=2,e.line=2),e.blocks=4),"custom_500_500"==e.size&&(e.row||e.line||(e.row=2,e.line=2),e.blocks=4);var d=e.row,u=e.line,f=e.w/u;e.margin=5,e.blocks=d*u,e.height=e.h,e.width=e.w,e.blockWidth=f-2*e.margin,_.multiColumnScene.adNum=e.blocks,e.silder=1,e.marginTop=(e.h-f*d)/(d+1),e.marginLeft=(e.w-f*u)/(u+1),e.marginTop<5&&(e.marginTop=4),e.marginLeft<5&&(e.marginLeft=4),"rect_300_250"==e.size&&(e.blockWidth=f-2),3==e.custom&&s!=l&&1===e.line&&(e.w=s,e.h=l,e.blockWidth=l,e.blockMargin=0,e.blockMarginLeft=(s-(c*l+2*c))/(c-1)-2,e.marginTop=0),3===e.custom&&s!=l&&1!==e.line&&(e.blocks=e.row*e.line,e.marginTop=(e.h-f*d)/d),document.createElement(I.elementName),w(I.elementName+"{display:block;} "+I.elementName+" .img{background-size:cover;background-repeat:no-repeat;}"),function b(e){e.createElement("info-div")}(document);var p=k+(new Date).getTime();I[p]={};var g=[];g.push(' '),g.push(' '),g.push(' 正在为您努力加载...'),g.push(" "),g.push(' '),g.push(" "),g.push(' ');var m=[];m.push("<"+I.elementName+' class="'+I.elementName+' {id}" id="{id}" style="width:{width}px;height:{boxHeight}px;font-size:14px;overflow:hidden;display:block;margin:0;padding:0;overflow:hidden;position:relative;text-align:left;">'),m.push(g.join("")),m.push("");var h=E(m.join(""),{id:p,width:e.w,height:e.h,boxHeight:e.height,marginTop:e.marginTop||12,infoHeight:e.userConf&&!e.userConf.isShowTab?e.h:e.h-42});y(e.placeholderId)||x(e.placeholderId)?(document.write(h),re.initDOM(p,e),re.initEvent(p,e)):v(function(e,n,t){try{document.getElementById(e.placeholderId).innerHTML=t,n.initDOM(p,e),n.initEvent(p,e)}catch(r){}}.bind(this,e,re,h))}}(); ;