Function.prototype.bind||(Function.prototype.bind=function(c){if("function"!==typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var d=Array.prototype.slice.call(arguments,1),a=this,b=function(){},e=function(){return a.apply(this instanceof b&&c?this:c,d.concat(Array.prototype.slice.call(arguments)))};b.prototype=this.prototype;e.prototype=new b;return e}); Array.prototype.forEach||(Array.prototype.forEach=function(c,d){for(var a=0,b=this.length;aopera.version();this.isFirefox=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");this.isPhone=navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPod/i);this.isOldAndroid=0<=navigator.userAgent.indexOf("Android")&&2.3>=parseFloat(navigator.userAgent.slice(navigator.userAgent.indexOf("Android")+8));this.jsonpScript={};e?setTimeout(function(){this.start(e)}.bind(this),1):this.definition()}; AdTrack.Dispatcher.prototype={openChannel:function(a,b){if(a.channel.length<=b)return this.doError(a,"No channel available for pass "+b),null;var c=a.channel[this.pass];if("sklik"==c.tag)return new AdTrack.SklikChannel(this,a,c);if("etarget-cz"==c.tag||"etarget-sk"==c.tag)return new AdTrack.EtargetChannel(this,a,c);if("bb-rtb"==c.tag)return new AdTrack.BBRTBChannel(this,a,c);if("mads"==c.tag)return new AdTrack.MADSChannel(this,a,c);this.doError(a,"Unknown ad channel "+c.tag+", pass "+b);return null}, definition:function(){if(!this.isHidden()){var a="http://"+this.server+"/adtrack.php?"+this.uri("d",this.domain)+"&"+this.uri("m","mobile"==this.type?1:0)+"&"+this.uri("g",this.group)+"&"+this.uri("p",this.position)+"&"+this.uri("ext[url]",this.url)+"&"+this.uri("ext[dpi]",this.getDPI())+"&",a=this.isPhone?270==window.orientation||90==window.orientation||-90==window.orientation?a+(this.uri("ext[screenWidth]",screen.height)+"&"+this.uri("ext[screenHeight]",screen.width)):a+(this.uri("ext[screenWidth]", screen.width)+"&"+this.uri("ext[screenHeight]",screen.height)):a+(this.uri("ext[screenWidth]",screen.width)+"&"+this.uri("ext[screenHeight]",screen.height));this.isOldIE&&(a+="&"+this.uri("ext[isOldIE]",1));this.isIE&&(a+="&"+this.uri("ext[isIE]",1));this.isOldOpera&&(a+="&"+this.uri("ext[isOldOpera]",1));this.isFirefox&&(a+="&"+this.uri("ext[isFirefox]",1));this.isPhone&&(a+="&"+this.uri("ext[isPhone]",1));this.isOldAndroid&&(a+="&"+this.uri("ext[isOldAndroid]",1));this.jsonp(a,"dclbk",function(a){this.start(a)}.bind(this))}}, start:function(a){this.pass=0;this.renderer=null;"flexi"==a.renderer?this.renderer=new AdTrack.FlexiRenderer(this,a):"fixed"==a.renderer?this.renderer=new AdTrack.FixedRenderer(this,a):"image"==a.renderer?this.renderer=new AdTrack.ImageRenderer(this,a):this.doError(a,"Unknown ad renderer "+a.renderer);this.renderer&&(this.channel=this.openChannel(a,this.pass))&&this.render(a)},domAdjust:function(a){if(a.options.dom.remove)if(a.options.dom.remove instanceof Array)Array.prototype.forEach.call(a.options.dom.remove, function(a){(a=document.querySelector(a))&&a.parentNode.removeChild(a)}.bind(this));else{var b=document.querySelector(a.options.dom.remove);b?b.parentNode.removeChild(b):this.doError(a,"Unable to find r selector "+a.options.dom.remove)}if(a.options.css){b=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(b);try{b.innerHTML=a.options.css}catch(c){b.styleSheet.cssText=a.options.css}}},render:function(a){var b=document.readyState;if("complete"==b||"ready"==b||!this.isOldIE&& "interactive"==b){if(this.container=this.getContainer(a,!0))this.domAdjust(a),this.renderer.render(this.channel)}else if(this.container=this.getContainer(a,!1))this.domAdjust(a),this.renderer.render(this.channel);else{var c=document.addEventListener?"DOMContentLoaded":"readystatechange",d=function(){this.removeEvent.call(document,c,d);if(this.container=this.getContainer(a,!0))this.domAdjust(a),this.renderer.render(this.channel)}.bind(this);this.addEvent(document,c,d)}},getContainer:function(a,b){if(a.options.dom)if("container"== a.options.dom.method){var c=document.querySelector(a.options.dom.selector);if(c)return c;b&&this.doError(a,"Unable to find c selector "+a.options.dom.selector)}else if("create"==a.options.dom.method)if(c=document.querySelector(a.options.dom.container)){var d=document.createElement("div");if(a.options.dom.before){var e=c.querySelector(a.options.dom.before);if(e)return e.parentNode.insertBefore(d,e),d;if(a.options.dom.allowFallbackLast)return c.appendChild(d),d;b&&this.doError(a,"Unable to find b selector "+ a.options.dom.before+"")}else if(a.options.dom.after){if(e=c.querySelector(a.options.dom.after))return e.parentNode.insertBefore(d,e.nextSibling),d;if(a.options.dom.allowFallbackLast)return c.appendChild(d),d;b&&this.doError(a,"Unable to find a selector "+a.options.dom.after+"")}else return c.appendChild(d),d}else b&&this.doError(a,"Unable to find s selector "+a.options.dom.container);else{if("image"==a.options.dom.method){if(d=document.querySelector(a.options.dom.image))return d;b&&this.doError(a, "Unable to find i selector "+a.options.dom.image)}}else b&&this.doError(a,"No dom definition");return null},passback:function(a,b){this.pass++;this.channel=this.openChannel(a,this.pass);this.doPassback(a,b,this.channel?this.channel.chd:null);this.channel&&this.renderer.render(this.channel)},getNS:function(a,b){return a.querySelectorAll("."+b)},setText:function(a,b){Array.prototype.forEach.call(a,function(a){a.innerHTML=b}.bind(this));return a},setAttribute:function(a,b,c){Array.prototype.forEach.call(a, function(a){a.setAttribute(b,c)}.bind(this));return a},setOnclick:function(a,b,c){Array.prototype.forEach.call(a,function(a){this.addEvent(a,"click",b);a.onclick=c?"return true;":"return false;"}.bind(this));return a},clearClass:function(a,b){Array.prototype.forEach.call(a,function(a){a.className=a.className.replace(b,"").trim()}.bind(this));return null},doLoad:function(a,b,c){var d=this.time();a="http://"+this.server+"/load.php?"+this.uri("d",this.domain)+"&"+this.uri("m","mobile"==this.type?1:0)+ "&"+this.uri("c",b.tag)+"&"+this.uri("cf",b.flag?b.flag:"")+"&"+this.uri("g",this.group)+"&"+this.uri("p",this.position)+"&"+this.uri("s",a.style)+"&"+this.uri("l",c)+"&"+this.uri("t",d-this.time_start)+"&"+this.uri("u",this.url);this.jsonp(a,"callback",function(a){}.bind(this))},doPassback:function(a,b,c){var d=this.time();a="http://"+this.server+"/passback.php?"+this.uri("d",this.domain)+"&"+this.uri("m","mobile"==this.type?1:0)+"&"+this.uri("c",b.tag)+"&"+this.uri("cf",b.flag?b.flag:"")+"&"+this.uri("cpt", c?c.tag:"")+"&"+this.uri("cptf",c&&c.flag?c.flag:"")+"&"+this.uri("cpc",c?c.count:"")+"&"+this.uri("g",this.group)+"&"+this.uri("p",this.position)+"&"+this.uri("s",a.style)+"&"+this.uri("t",d-this.time_start)+"&"+this.uri("u",this.url);this.jsonp(a,"callback",function(a){}.bind(this))},doClick:function(a,b,c,d,e,h,f){var g=this.time();b="http://"+this.server+"/click.php?"+this.uri("d",this.domain)+"&"+this.uri("m","mobile"==this.type?1:0)+"&"+this.uri("c",b.tag)+"&"+this.uri("cf",b.flag?b.flag:"")+ "&"+this.uri("g",this.group)+"&"+this.uri("p",this.position)+"&"+this.uri("s",a.style)+"&"+this.uri("r",this.referer)+"&"+this.uri("i",e)+"&"+this.uri("z",h)+"&"+this.uri("x",c)+"&"+this.uri("y",d)+"&"+this.uri("t",g-this.time_start)+"&"+this.uri("u",this.url);this.jsonp(b,"callback",function(b){if(!a.options.newwindow)try{window.top.history.pushState&&(this.isFirefox||this.isOldOpera)&&window.top.history.pushState({},document.title,window.top.location.href),window.top.location.assign(f)}catch(c){window.top.location.href= f}}.bind(this))},doError:function(a,b){b="[C"+this.version+"] "+b+" ["+this.domain+" / "+this.type+" / "+this.group+" / "+this.position+" ("+this.pass+")]";this.log(b);var c="http://"+this.server+"/error.php?"+this.uri("m",b)+"&"+this.uri("u",this.url);this.jsonp(c,"callback",function(a){}.bind(this))},doEvent:function(a){},uri:function(a,b){return a+"="+encodeURIComponent(b)},log:function(a){console.log("AdTrack - "+a)},time:function(){return Math.round(this.time_performance?window.performance.now(): (new Date).getTime())},isBanner:function(a){return 0"),a=a.replace(/</ig,"<"),a=a.replace(/'/g,"'"),a=a.replace(/"/ig,'"'), a=a.replace(/&/ig,"&"));return a},noquerystring:function(a){return a.split("?")[0]},escapeRegExp:function(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},addEvent:function(a,b,c){null!=a&&"undefined"!=typeof a&&(a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent?a.attachEvent("on"+b,c):a["on"+b]=c)},removeEvent:function(a,b,c){null!=a&&"undefined"!=typeof a&&(a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent?a.detachEvent("on"+b,c):a["on"+b]="")},jsonp:function(a, b,c){var d=("adTrackJSONP"+Math.random()).replace(".","");if(a=a+"&"+this.uri(b,d))window[d]=function(a,b){try{delete window[d]}catch(f){}try{this.jsonpScript[d]&&(this.jsonpScript[d].parentNode.removeChild(this.jsonpScript[d]),this.jsonpScript[d]=null,delete this.jsonpScript[d])}catch(g){}c&&c(a,b)}.bind(this),b=document.createElement("script"),b.setAttribute("src",a),this.jsonpScript[d]=b,document.getElementsByTagName("head")[0].appendChild(b)},getDomainName:function(a){a=a.split(".").reverse(); return 3<=a.length&&a[1].match(/^(com|edu|gov|net|mil|org|nom|co|name|info|biz|us)$/i)?a[2]+"."+a[1]+"."+a[0]:a[1]+"."+a[0]},setCookie:function(a,b,c){var d=new Date;d.setTime(d.getTime()+1E3*c);c="expires="+d.toUTCString();document.cookie=a+"="+b+"; "+c+";domain="+this.getDomainName(document.location.host)+"; Path=/"},getCookie:function(a){a+="=";for(var b=document.cookie.split(";"),c=0;c