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 h=function(t){var e,r=[],n=document,i=n.documentElement,o=i.doScroll,a="DOMContentLoaded",l="addEventListener",s="onreadystatechange",c="readyState",d=(o?/^loaded|^c/:/^loaded|c/).test(n[c]);function u(e){for(d=1;e=r.shift();)e()}return n[l]&&n[l](a,e=function(){n.removeEventListener(a,e,!1),u()},!1),o&&n.attachEvent(s,e=function(){/^c/.test(n[c])&&(n.detachEvent(s,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 b(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 w(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 y(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 v="QIHOO__WEB__SO__SHOP_WINDOW",x={multiColumnScene:{adNum:6}};window.QIHOO__WEB__UID||(window.QIHOO__WEB__UID=e()),window[v]||(window[v]={},window[v].UID=e(),window[v].displayShowId=[],window[v].elementName="qihooshopwindow"),window.QIHOO__WEB__DOUDI||(window.QIHOO__WEB__DOUDI=[]);var k=window[v],a=(window.QIHOO__WEB__DOUDI,window.QIHOO__WEB__UID),_=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 I(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"),_('\r\n \r\n {title}\r\n\r\n',o)):_('\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);s++,t=te.fill(t,e),l.push(t)}),s=0}return l.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(",")),y(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[l]&&c.push(this.renderFeed(i[l],t,r)),c.push(""),s.push(c.join(""))}return s.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 l(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 s(){n=setInterval(function(){l(t.w),setTimeout(function(){X(r,a)},500)},5e3)}s(),d(document.getElementById(i+"sliderLeft"),"click",function(e){l(t.w),setTimeout(function(){X(r,a)},500)}),d(document.getElementById(i+"sliderRight"),"click",function(e){l(t.w),setTimeout(function(){X(r,a)},500)}),d(document.getElementById(i),"mouseenter",function(e){clearInterval(n)}),d(document.getElementById(i),"mouseleave",function(e){s()}),d(document,"visibilitychange",function(e){"hidden"==document.visibilityState?clearInterval(n):"visible"==document.visibilityState&&s()})}};return function fe(e){k.displayShowId.push(e.showid);var n="magicCube";e.inject="inlay",e.style=n,e.layout="magicCubeScene";var t=e.size.split("_"),r=parseInt(t[1]),i=t[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"==i&&(e.row||e.line||(e.row=2,e.line=2),e.w=r,e.h=r,e.blockOverFlow="hidden",e.blockMarginBottom=0,e.textDisplay="block",e.text2Display="none"),"custom"==i&&3==t.length){var o=parseInt(t[1]),a=parseInt(t[2]),l=parseInt(o/a);e.custom=3,e.row||e.line||(e.row=1,e.line=l),e.blockWidth=o,e.w=o,e.h=a}"rect"===i&&(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 s=e.row,c=e.line,d=e.w/c;e.margin=5,e.blocks=s*c,e.height=e.h,e.width=e.w,e.blockWidth=d-2*e.margin,x.multiColumnScene.adNum=e.blocks,e.silder=1,e.marginTop=(e.h-d*s)/(s+1),e.marginLeft=(e.w-d*c)/(c+1),e.marginTop<5&&(e.marginTop=4),e.marginLeft<5&&(e.marginLeft=4),"rect_300_250"==e.size&&(e.blockWidth=d-2),3==e.custom&&o!=a&&1===e.line&&(e.w=o,e.h=a,e.blockWidth=a,e.blockMargin=0,e.blockMarginLeft=(o-(l*a+2*l))/(l-1)-2,e.marginTop=0),3===e.custom&&o!=a&&1!==e.line&&(e.blocks=e.row*e.line,e.marginTop=(e.h-d*s)/s),document.createElement(k.elementName),b(k.elementName+"{display:block;} "+k.elementName+" .img{background-size:cover;background-repeat:no-repeat;}"),function m(e){e.createElement("info-div")}(document);var u=v+(new Date).getTime();k[u]={};var f=[];f.push(' '),f.push(' '),f.push(' 正在为您努力加载...'),f.push(" "),f.push(' '),f.push(" "),f.push(' ');var p=[];p.push("<"+k.elementName+' class="'+k.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;">'),p.push(f.join("")),p.push("");var g=_(p.join(""),{id:u,width:e.w,height:e.h,boxHeight:e.height,marginTop:e.marginTop||12,infoHeight:e.userConf&&!e.userConf.isShowTab?e.h:e.h-42});w(e.placeholderId)||y(e.placeholderId)?(document.write(g),re.initDOM(u,e),re.initEvent(u,e)):h(function(e,n,t){try{document.getElementById(e.placeholderId).innerHTML=t,n.initDOM(u,e),n.initEvent(u,e)}catch(r){}}.bind(this,e,re,g))}}(); ;