!function(a){var e="advads_procfp",b="advanced_ads_ad_clicks",c=null,d=null,g;function f(a){try{return JSON.parse(a)}catch(a){return null}}a(document).on("advads-passive-cb-conditions",function(c,a){a.conditions.ad_clicks="check_ad_clicks",a.check_ad_clicks=function(d,e){var a,g,c;if(advads.cookie_exists(b+"_"+e.id)&&(a=advads.get_cookie(b+"_"+e.id),a=f(a)),a){g=parseInt((new Date).getTime()/1e3);for(c in a)if("_"+d.expiration==c&&a[c].ttl>=g&&a[c].count>=parseInt(d.limit))return!1}return!0}}),g=function(){this.$elements={},this.currentIFrame=!1,this.focusLost=!1,this.wrappers=[".google-auto-placed"],this.attributes={"data-anchor-status":"displayed","data-vignette-loaded":"true"},this.lastClick=0,this.init()},g.prototype={constructor:g,init:function(){const b=this;let c;a(document).on("click","a[data-cfpa]",function(){b.onClick(parseInt(a(this).attr("data-cfpa")))}),a(window).on("blur",function(a){setTimeout(function(){if(!b.currentIFrame)for(let a=document.activeElement;a&&a!==this&&a!==document&&(b.currentIFrame=b.checkWrappers(a),!b.currentIFrame);a=a.parentNode);b.currentIFrame&&(b.onClick(b.currentIFrame),b.focusLost=!0,top.focus())},0)}),a(document).on("mouseenter","div[data-cfpa]",function(){var c=parseInt(a(this).attr("data-cfpa"));b.addElement(c)}),document.addEventListener("touchmove",function(){c=!0},!1),document.addEventListener("touchstart",function(){c=!1},!1),["click","touchend"].forEach(function(a){document.addEventListener(a,function(d){if(c||b.getTimestamp()-b.lastClick<1)return;let a=null;for(let c=d.target;c&&c!==this&&c!==document;c=c.parentNode){if(a=b.checkWrappers(c),a){b.onClick(a);break}if(c.hasAttribute("data-cfpa")&&c.hasAttribute("data-cfptl")){a=parseInt(c.getAttribute("data-cfpa"),10),b.onClick(a);break}}})})},getTimestamp:function(){return Math.floor(Date.now()/1e3)},checkWrappers:function(a){for(let b=0,d=this.wrappers.length,c=null;b<d;b++)if(c=this.wrappers[b],a.matches&&a.matches(c))return".google-auto-placed"===c?"google-auto-placed":null;for(const[b,c]of Object.entries(this.attributes))if(a.hasAttribute(b)&&a.getAttribute(b)===c)return"google-auto-placed";return null},addElement:function(e){var k,i,g,l,m,h,n,j,o;if(!1==e instanceof jQuery&&(e=a('div[data-cfpa="'+e+'"]').first()),k=!!e.find("iframe").length,k||e.find("a").length)if(i=parseInt(e.attr("data-cfpa")),this.$elements[i]=e,e.removeAttr("data-cfpa"),k?(e.find("iframe").first().attr({"data-cfpa":i}),e.attr("data-cfph")&&e.find("iframe").first().attr({"data-cfph":e.attr("data-cfph")})):(e.find("a").not(".advads-edit-button").first().attr({"data-cfpa":i}),e.attr("data-cfph")&&e.find("a").not(".advads-edit-button").first().attr({"data-cfph":e.attr("data-cfph")})),e.removeAttr("data-cfph"),advads.cookie_exists(b+"_"+i))if(g=advads.get_cookie(b+"_"+i),g=f(g)){l=parseInt((new Date).getTime()/1e3),m=!1;for(h in g)if(g.hasOwnProperty(h)&&"exp"!=h&&g[h].ttl<l){for(n=parseFloat(h.substr(1)),j=g[h].ttl;j<l;)j+=60*n*60;g[h].ttl=j,g[h].count=0,m=!0}m&&(o=new Date(g.exp),advads.set_cookie_sec(b+"_"+i,JSON.stringify(g,"false",!1),parseInt(o.getTime()/1e3),c,d))}},_banVisitor:function(){var b=new Date,a=new Date,e;a.setTime(a.getTime()+24*advadsCfpBan*60*60*1e3),e=(a.getTime()-b.getTime())/1e3,advads.set_cookie_sec("advads_pro_cfp_ban",1,e,c,d),jQuery("[data-cfptl]").remove(),this.wrappers.forEach(function(a){jQuery(a).remove()});for(const[a,b]of Object.entries(this.attributes))jQuery("["+a+'="'+b+'"]').remove()},onClick:function(g){var k=!1,h=!1,i,r,l,s,m,n,p,q,j,o;if(this.lastClick=this.getTimestamp(),"google-auto-placed"!==g&&a('[data-cfpa="'+g+'"]').attr("data-cfph"))if(advads.cookie_exists(b+"_"+g)&&(h=f(h=advads.get_cookie(b+"_"+g))),h){for(i in h)h.hasOwnProperty(i)&&"exp"!=i&&(r=parseInt(h[i].count),h[i].count=r+1);l=new Date,s=new Date(h.exp),m=parseInt((s.getTime()-l.getTime())/1e3),advads.set_cookie_sec(b+"_"+g,JSON.stringify(h,"false",!1),m,c,d)}else{n=a('[data-cfpa="'+g+'"]').attr("data-cfph").split("_"),p={},q=0,j=new Date,l=new Date;for(i in n)parseFloat(n[i])>q&&(q=parseFloat(n[i])),p["_"+n[i]]={count:1,ttl:parseInt(l.getTime()/1e3+3600*parseFloat(n[i]))};j.setTime(j.getTime()+60*q*60*1e3),o="expires="+j.toUTCString(),m=parseInt((j.getTime()-l.getTime())/1e3),p.exp=o,advads.set_cookie_sec(b+"_"+g,JSON.stringify(p,"false",!1),m,c,d)}advads.cookie_exists(e+"_"+g)&&(k=f(k=advads.get_cookie(e+"_"+g))),k?(r=parseInt(k.count),k.count=r+1,l=new Date,m=((s=new Date(k.exp)).getTime()-l.getTime())/1e3,advads.set_cookie_sec(e+"_"+g,JSON.stringify(k,"false",!1),m,c,d),advadsCfpClickLimit<=k.count&&"undefined"!=typeof advadsCfpBan&&this._banVisitor()):(j=new Date,l=new Date,j.setTime(j.getTime()+60*advadsCfpExpHours*60*1e3),o="expires="+j.toUTCString(),m=(j.getTime()-l.getTime())/1e3,advads.set_cookie_sec(e+"_"+g,'{"count":1,"exp":"'+o+'"}',m,c,d),1===advadsCfpClickLimit&&"undefined"!=typeof advadsCfpBan&&this._banVisitor())}},a(function(){for(var b in window.advadsProCfp=new g,a(document).on("mouseenter","iframe[data-cfpa]",function(c){var b=parseInt(a(this).attr("data-cfpa"));advadsProCfp.currentIFrame=b}).on("mouseenter",".google-auto-placed",function(a){advadsProCfp.currentIFrame="google-auto-placed"}).on("mouseleave mouseout","[data-cfpa], .google-auto-placed",function(){advadsProCfp.currentIFrame=!1,advadsProCfp.focusLost&&(advadsProCfp.focusLost=!1,a(window).trigger("focus"))}),advadsCfpQueue)advadsCfpQueue.hasOwnProperty(b)&&advadsProCfp.addElement(advadsCfpQueue[b]);advadsCfpQueue=[],void 0!==window.advadsCfpPath&&(""!=advadsCfpPath&&(c=advadsCfpPath),""!=advadsCfpDomain&&(d=advadsCfpDomain))})}(window.jQuery)