if(typeof(Window)=="undefined"){var Window=function(){}}(function(){if(!window.postMessage){function b(d){var e=(d.href).replace("##","#").split("#")[1];return decodeURIComponent(e||"")}function c(d,g,f){var i="#"+(encodeURIComponent(g||""));try{d.hash=i;if(d.hash!=i){throw true}}catch(h){d.href=(f||"")+i}}Window.prototype.postMessage=function(e,d){c(this.location,e,d)};if(!window.dispatchEvent&&!window.fireEvent){window._messageObservers=[];if(window.attachEvent){window._attachEvent=window.attachEvent;window.attachEvent=function(e,d){if(e=="onmessage"){return window._messageObservers.push(d)}else{return window._attachEvent(e,d)}}}}function a(){var g=b(window.location);if(g){c(window.location,null);if(document.createEvent){var f=document.createEvent("Event");f.initEvent("message",true,false);f.data=g;if(window.dispatchEvent){window.dispatchEvent(f)}else{document.dispatchEvent(f)}}else{if(document.createEventObject){var f=document.createEventObject();f.type="message";f.data=g;if(window.fireEvent){window.fireEvent(f)}else{if(window._messageObservers){var h=window._messageObservers,d=h.length;for(var e=0;e<d;e++){h[e](f)}}}}}}}if(window.location.hash.indexOf("fb_xd_fragment")==-1){setInterval(a,200)}}Window.postMessage=function(f,e,d){if(f.postMessage){return f.postMessage(e,d)}else{return Window.prototype.postMessage.call(f,e,d)}}})();var mydecowl={ifr:document.createElement("iframe"),ifrAttr:{id:"mydeco_iframe",name:"mydeco_iframe",marginWidth:"0",marginHeight:"0",frameBorder:"0"},ifrStyle:{width:"100%",height:"700px",border:"0"},messageRegexp:/^mydecoMessage=(.+)$/,extend:function(b,c){for(var a in c){b[a]=c[a]}return b},init:function(){var c=/[?&]query=([^&]*)/.exec(location.search),d=/[?&]page=([^&]*)/.exec(location.search),b=/[?&]guid=([0-9a-zA-Z]*)/.exec(location.search),a=/[?&]view=([^&]*)/.exec(location.search),e=/#mydeco_src=(.*)$/.exec(decodeURIComponent(location.hash));if(e){location.hash="";this.ifrAttr.src=e[1]+"&mydeco_parent_url="+encodeURIComponent(location.href)}else{if(b){mydeco_wl_url=mydeco_wl_url.replace("/search/","/product/"+b[1]+"/")}if(d){mydeco_wl_url=mydeco_wl_url.replace("/search/","/top10"+d[1])}this.ifrAttr.src=mydeco_wl_url+(c?(mydeco_wl_url.substr(-6)=="query="?c[1]:"&query="+c[1]):"")+(a?"&view="+a[1]:"")+"&mydeco_resize=true&mydeco_parent_url="+encodeURIComponent(location.href)}this.extend(this.ifr,this.ifrAttr);this.extend(this.ifr.style,this.ifrStyle);document.getElementById("mydeco_wrapper").appendChild(this.ifr);if(typeof window.addEventListener!="undefined"){window.addEventListener("message",this.listener,false)}else{if(typeof window.attachEvent!="undefined"){window.attachEvent("onmessage",this.listener);location.hash=""}}},listener:function(e){var mess=mydecowl.messageRegexp.exec(e.data);if(!mess){return}mess=eval("("+mess[1]+")");mydecowl.ifr.style.height=mess.height;window.scrollTo(0,0)}};mydecowl.urls={origin:"/"};mydecowl.init();
