/* Some parts Copyright (c) 2010 beauty24 GmbH */
/* Built using ./mk-core */
/* *** dev-js/ext/criteo_ld.js *** */
var CRITEO=function(){function p(c){if(document.getElementsByTagName){var a=document.getElementsByTagName("head")[0];if(!a){a=document.createElement("HEAD");document.documentElement.appendChild(a)}a&&a.appendChild&&a.appendChild(c)}}function q(){if(typeof window.encodeURIComponent==="undefined"){var c={ab:function(a){a=""+a;for(var b,d,e="",f=0;f<a.length;){b=a.charCodeAt(f++);if(!(b>=56320&&b<57344)){if(b>=55296&&b<56320){if(f>=a.length)continue;d=a.charCodeAt(f++);if(d<56320||b>=56832)continue;
b=(b-55296<<10)+(d-56320)+65536}e+=b<128?String.fromCharCode(b):b<2048?String.fromCharCode(192+(b>>6),128+(b&63)):b<65536?String.fromCharCode(224+(b>>12),128+(b>>6&63),128+(b&63)):String.fromCharCode(240+(b>>18),128+(b>>12&63),128+(b>>6&63),128+(b&63))}}return e},I:"0123456789ABCDEF",V:function(a){return c.I.charAt(a>>4)+c.I.charAt(a&15)},K:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-"};window.encodeURIComponent=function(a){a=c.ab(a);for(var b="",d=0;d<a.length;d++)b+=c.K.indexOf(a.charAt(d))==
-1?"%"+c.V(a.charCodeAt(d)):a.charAt(d);return b}}}function r(){if(document.getElementsByTagName){for(var c=1,a=[],b=[],d,e,f,m,g,n,k=document.getElementsByTagName("div"),i=0;i<k.length;i++)if(k[i].id&&k[i].id.substring(0,3).toLowerCase()=="cto"&&k[i].childNodes){d=e=f=m=n=null;g=2;for(var o=0;o<k[i].childNodes.length;o++){var h=k[i].childNodes[o];if(h&&h.tagName&&h.tagName.toLowerCase()=="div"&&h.className&&h.className.substring(0,3).toLowerCase()=="cto"){var l=h.textContent?h.textContent:h.innerText?
h.innerText:null;switch(h.className.toLowerCase()){case "ctowidgetserver":d=l;break;case "ctodatatype":e=l;break;case "ctowidgettype":f=l;break;case "ctoparams":m=l;break;case "ctoversion":g=l;break;case "ctodata":n=h.innerHTML;break}}}if(d&&(!e&&f||e&&!f)){g="v="+g;if(m)g+="&"+m;g="p"+c+"="+encodeURIComponent(g);if(n)g+="&d"+c+"="+encodeURIComponent(n);g+=f?"&w"+c+"="+f:"&t"+c+"="+e;for(e=0;e<a.length;e++)if(a[e]==d)break;if(e!=a.length&&b[e]&&b[e].length+g.length>2E3){CRITEO.AddScript(b[e]);b[e]=
null}if(e==a.length||!b[e]){a[e]=d;b[e]=d+"display.js?"}else b[e]+="&";b[e]+=g;c++}}for(c=0;c<b.length;c++)b[c]&&CRITEO.AddScript(b[c])}}function s(){q();r()}var j={F:[],C:function(){if(!arguments.callee.ag){arguments.callee.ag=true;for(var c=0;c<j.F.length;c++)j.F[c]()}},Q:function(c){this.F[this.F.length]=c;document.addEventListener&&document.addEventListener("DOMContentLoaded",j.C,null);if(/KHTML|WebKit/i.test(navigator.userAgent))var a=setInterval(function(){if(/loaded|complete/.test(document.readyState)){clearInterval(a);
delete a;j.C()}},10);if(typeof window.onload!="function")window.onload=j.C;else{var b=window.onload;window.onload=function(){j.C();b&&b()}}}};return{Q:function(){if(typeof CRITEO_Loaded=="undefined"){CRITEO_Loaded=1;j.Q(function(){s()})}},AddStyle:function(c){if(document.createElement){var a=document.createElement("style");if(a){a.setAttribute("type","text/css");p(a);if(a.styleSheet)try{a.styleSheet.cssText=c}catch(b){}else{c=document.createTextNode(c);a.appendChild(c)}}}},AddScript:function(c){if(document.createElement){var a=
document.createElement("script");if(a){a.type="text/javascript";a.src=c;p(a)}}},AddImage:function(c,a){if(document.createElement){var b=document.createElement("IMG");if(b){if(c){var d=document.getElementById(c);if(d===null){d=document.createElement("DIV");d.id=c;d.style.display="none";document.body.appendChild(d)}d!==null&&d.appendChild&&d.appendChild(b)}b.src=a}}},NewGuid:function(c){for(var a="",b=0;b<c;b++)a+=Math.floor(Math.random()*15).toString(15);return a+""}}}(),CRITEO_Loaded;CRITEO.Q();


