var Conf=function(){var h={dev:{cookieDomain:".polyvore.net",oldImgHost:"www.polyvore.net",imgHosts:["img1.polyvore.net","img2.polyvore.net"],httpsImgHost:"www.polyvore.net",blogUrl:"http://blog.polyvore.com",fbApiKey:"e006261993081197d9a617cbb0b6e7b6",fbMiniEditorAppId:"169696363050346",isStaging:true,appEffectsCategories:[327,329,330,331]},testenv:{cookieDomain:".polyvore.net",oldImgHost:"www.polyvore.net",imgHosts:["img1.polyvore.net","img2.polyvore.net"],httpsImgHost:"www.polyvore.net",blogUrl:"http://blog.polyvore.com",fbApiKey:"e006261993081197d9a617cbb0b6e7b6",fbMiniEditorAppId:"169696363050346",isStaging:true},sandbox:{cookieDomain:".polyvore.net",oldImgHost:"www.polyvore.net",imgHosts:["img1.polyvoreimg.com","img2.polyvoreimg.com"],httpsImgHost:"www.polyvore.com",rewriteImgBase:true,blogUrl:"http://blog.polyvore.com",fbApiKey:"e006261993081197d9a617cbb0b6e7b6",fbMiniEditorAppId:"169696363050346",isStaging:true},live:{cookieDomain:".polyvore.net",oldImgHost:"www.polyvore.com",imgHosts:["img1.polyvoreimg.com","img2.polyvoreimg.com"],httpsImgHost:"www.polyvore.com",cdnImgHosts:["ak1.polyvoreimg.com","ak2.polyvoreimg.com"],httpsCdnImgHost:"www.polyvore.com",rewriteImgBase:true,blogUrl:"http://blog.polyvore.com",fbApiKey:"e006261993081197d9a617cbb0b6e7b6",fbMiniEditorAppId:"123732014354410",isStaging:true,appEffectsCategories:[327,329,330,331]},prod:{webHost:"www.polyvore.com",cookieDomain:".polyvore.com",oldImgHost:"www.polyvore.com",imgHosts:["img1.polyvoreimg.com","img2.polyvoreimg.com"],httpsImgHost:"www.polyvore.com",cdnImgHosts:["ak1.polyvoreimg.com","ak2.polyvoreimg.com"],httpsCdnImgHost:"www.polyvore.com",rsrcUrlPrefix:"http://www.polyvorecdn.com/rsrc/",httpsRsrcUrlPrefix:"https://www.polyvore.com/rsrc/",rsrcExtUrlPrefix:"http://ext.polyvorecdn.com/rsrc/",noCachePrefix:"http://rsrc.polyvore.com/rsrc/",blogUrl:"http://blog.polyvore.com",fbApiKey:"3d1d18f72a710e20514cd62955686c8f",fbMiniEditorAppId:"131434943568989",isStaging:false,appEffectsCategories:[327,329,330,331]}};var a=window.polyvore_mode||window._polyvoreMode||"prod";var g=h[a];var d=null;if(window._polyvoreLocale&&window._polyvoreLocale!="en"){d=window._polyvoreLocale}var c=document.getElementsByTagName("script");c=c.length?c[c.length-1].src.toString():"";if(c&&!/^(([a-z]+):\/\/)/.test(c)){var e=document.createElement("div");c=c.replace('"',"%22");e.innerHTML='<a href="'+c+'" style="display:none">x</a>';c=e.firstChild.href}c=c.replace(/.*https?:\/\/[^\/]*\//,"/").replace(/(\/[^\/]*){2,2}$/,"");var f;function b(m,p){var o=[m];var k=[];forEachKey(p,function(i){k.push(i)});k.sort();k.forEach(function(i){o.push(p[i])});var n=0;o=o.join("");for(var l=0,j=o.length;l<j;l++){n+=o.charCodeAt(l)}return n}return{getDevName:function(){return window._polyvoreDevName},getFbApiKey:function(){return g.fbApiKey},getCookieDomain:function(){return g.cookieDomain},getWebHost:function(){return g.webHost||window._polyvoreHost||"www.polyvore.net"},getWebUrlPrefix:function(){return Conf.getWebHost()+c},getImgHost:function(i,k){if(getProtocol()=="https"){return g.httpsImgHost}if(!k){k={}}if(k.size=="x"||k.size=="l"||k.size=="e"){return g.oldImgHost}else{var j=b(i,k);return g.imgHosts[j%g.imgHosts.length]}},getCDNImgHost:function(j,l){if(getProtocol()=="https"){return g.httpsCdnImgHost}var i=g.cdnImgHosts;if(!i){return""}var k=b(j,l);return i[k%i.length]},getRsrcUrlPrefix:function(i){if(f){return f}if(getProtocol()=="https"){f=g.httpsRsrcUrlPrefix;return g.httpsRsrcUrlPrefix}f=i?g.rsrcExtUrlPrefix:g.rsrcUrlPrefix;if(!f){f="http://"+Conf.getWebUrlPrefix()+"/rsrc/"}return f},getNoCachePrefix:function(){return g.noCachePrefix?g.noCachePrefix:"http://"+Conf.getWebUrlPrefix()+"/rsrc/"},getBlogURL:function(){return g.blogUrl},isStaging:function(){return g.isStaging},setLocale:function(i){d=i},getLocale:function(){return d},getModeName:function(){return a},getSetting:function(i){return g[i]}}}();(function(){function a(){var e=Math.floor((new Date()).getTime()/86400000);var h=Conf.getRsrcUrlPrefix(true)+"embed.js?";var b=document.getElementsByTagName("script");for(var d=0;d<b.length;d++){if(b[d].src&&b[d].src.indexOf(h)===0){return}}var f=document.createElement("script");f.type="text/javascript";f.src=h+e;document.body.appendChild(f);var g=document.createElement("link");g.type="text/css";g.rel="stylesheet";g.href=Conf.getRsrcUrlPrefix(true)+"embed.css?"+e;document.body.appendChild(g)}if(window.attachEvent){window.attachEvent("onload",a)}else{if(window.addEventListener){window.addEventListener("load",a,false)}}})();
