var _CLOB=_CLOB||(function(){var instance=null;function _ins(){var site_ids=[],last={},monitors=0,setup=0,ossassets=0,ossdata=0,_c=this,_cc={},_n=navigator,_l=location,_w=window,_d=document,_t=setTimeout,_mx=Math.max,_tl={},_td={};this.sitekeys=[];this.sitekey=function(site_id,key_only){if(_c.sitekeys[site_id])return(key_only?'':'&sitekey=')+_c.sitekeys[site_id];return'';};this.init=function(site_id){_cc=clicky_custom;if(!_cc.track_iframe){_td=top.document;_tl=top.location;}if(!site_id)return;for(var s in site_ids)if(site_ids[s]==site_id)return;if(_cc.site_id_replace)site_ids=[site_id];else site_ids.push(site_id);if(_cc.getHighEntropyValues&&_n.userAgentData&&_n.userAgentData.getHighEntropyValues){_n.userAgentData.getHighEntropyValues(["model","platformVersion"]).then(function(ua){_c.he_model=ua.model;_c.he_platform=parseInt(ua.platformVersion);});}if(!setup){setup=1;_t(function(){if(_l.hash.match(/^#_heatmap/))_c.heatmap();if(!_c.get_cookie('_first_pageview'))_c.set_referrer();if(!_cc.pageview_disable)_c.pageview();_c.start_monitors();},200);}};this.custom_data=function(){var data={},keys=['username','name','email'],ccv=_cc.visitor||{},href='',i;for(i=0;i<keys.length;i++){var key=keys[i],temp=_c.get_cookie('_custom_data_'+key);if(temp)data[key]=temp;if(ccv&&(temp=ccv[key]))data[key]=temp;temp=_l.search.split('utm_custom['+key+']');if(temp[1]){temp=temp[1].split('&')[0].split('=')[1];if(temp)data[key]=temp;}}for(i in ccv)if(ccv.hasOwnProperty(i))if(!data[i])data[i]=ccv[i];for(i in data)if(data.hasOwnProperty(i))href+="&custom["+_c.enc(i)+"]="+_c.enc(data[i]);return href;};this.set_referrer=function(){var r=_td.referrer||_d.referrer;r=r&&r.match(/^https?:/)?(RegExp("^https?://[^/]*"+_l.host.replace(/^www\./i,"")+"/","i").test(r)?'':r):'';_c.ref=r||_c.get_cookie('_referrer_og');if(!_c.get_href().match(/utm_campaign/))_c.utm=_c.get_cookie('_utm_og');};this.pageview=function(){_c.beacon('pageview','&href='+_c.enc(_c.get_href())+'&title='+_c.enc(_cc.title||_w.clicky_page_title||_td.title||_d.title)+(_c.ref?'&ref='+_c.enc(_c.ref):'')+(_c.utm?'&utm='+_c.enc(_c.utm):''));};this.get_href=function(enc){var href=_cc.href||(_tl.pathname?_tl.pathname+_tl.search:_l.pathname+_l.search);if(_l.hash.match(/utm_campaign/i))href=href+(_l.search?'&':'?')+_l.hash.substr(1).replace(/\?/,'&');return enc?_c.enc(href):href;};this.log=function(href,title,type){if(href){if(type=='pageview')href=href.replace(/^https?:\/\/([^\/]+)/i,'');_c.beacon({'type':(type||'click'),'href':href,'title':(title||'')});}};this.dupe=function(site_id,type,q){var q=q||"",now=Date.now(),dupe=false;if(site_id&&type){var k=type+site_id;if(last[k]&&last[k].q==q&&last[k].unixtime+(_mx(1,(_cc.timeout_dupe||3))*1000)>now)dupe=true;last[k]={unixtime:now,q:q};}return dupe;};this.heatmap_xy=function(e){if(e&&e.pageX&&!_cc.heatmap_disable)_c.beacon('heatmap','&heatmap[]='+_c.enc(_c.get_href())+'|'+e.pageX+'|'+e.pageY+'|'+_c.doc_wh().w);};this.doc_wh=function(){var de=_d.documentElement;return{w:_w.innerWidth||de.clientWidth||1024,h:_mx(_d.body.scrollHeight,_d.body.offsetHeight,de.clientHeight,de.scrollHeight,de.offsetHeight)}};this.heatmap=function(date,sub,subitem){if(_w._heatmap_destroy)_heatmap_destroy();if(_w.heatmapFactory)_c.heatmap_data(date,sub,subitem);else{_c.inject('//static.getclicky.com/inc/javascript/heatmap.js');_t(_c.heatmap,1000,date,sub,subitem);}};this.heatmap_data=function(date,sub,subitem){wh=_c.doc_wh();_c.inject('//clicky.com/ajax/onsitestats/heatmap?'+'site_id='+site_ids[0]+_c.sitekey(site_ids[0])+'&href='+_c.get_href(1)+'&domain='+_l.hostname+'&w='+wh.w+'&h='+wh.h+(_l.hash.match(/^#_heatmap/)?_l.hash.replace(/^#_heatmap/,''):'')+(date?'&date='+date:'')+(sub?'&sub='+sub:'')+(subitem?'&subitem='+subitem:'')+'&x='+_c.rnd());};this.heatmap_override=function(e){var n,nodes=_d.querySelectorAll(e);for(n=0;n<nodes.length;n++)_c.add_event(nodes[n],'click',_c.heatmap_xy);};this.onsitestats=function(refresh,reset){if(ossassets){if(_w.jQuery&&_w._OSS){if(_c.jqnc){jQuery.noConflict();_c.jqnc=0;}if(!ossdata||refresh){ossdata=1;_c.inject('//clicky.com/ajax/onsitestats/?site_id='+site_ids[0]+_c.sitekey(site_ids[0])+'&href='+_c.get_href(1)+'&domain='+_l.hostname+(refresh?'&refresh=1':'')+(reset?'&reset=1':'')+'&x='+_c.rnd());}}else _t(_c.onsitestats,200);}else{ossassets=1;_c.inject('//static.getclicky.com/inc/onsitestats.css','css');_c.inject('//static.getclicky.com/inc/javascript/onsitestats.js');if(!_w.jQuery){_c.inject('//static.getclicky.com/inc/javascript/jquery.js');_c.jqnc=1;}_t(_c.onsitestats,1000);}};this.start_monitors=function(){if(!monitors){monitors=1;_c.hm_monitor();if(_cc.html_media_track&&(_d.getElementsByTagName('audio').length||_d.getElementsByTagName('video').length))_c.html_media_monitor();if(!_cc.history_disable){_c.pushState=history.pushState;history.pushState=function(){_c.pushState.apply(history,arguments);_t(_c.pageview,250);};_c.add_event(window,'popstate',function(e){if(e.state)_t(_c.pageview,250);});}}};this.hm_monitor=function(){if(_d.body){_c.add_event(_d.body,'click',_c.heatmap_xy);var o,hmo=_cc.heatmap_objects;if(hmo){if(typeof hmo=='object'){for(o in hmo)_c.heatmap_override(hmo[o]);}else _c.heatmap_override(hmo);}}else _t(_c.hm_monitor,1000);};this.html_media_monitor=function(){if(!_w._htmlvid)_c.inject('//static.getclicky.com/inc/javascript/video/html.js');};this.video=function(action,time,href,title){if(href&&action){_c.beacon('video','&video[action]='+action+'&video[time]='+(time||0)+'&href='+_c.enc(href)+(title?'&title='+_c.enc(title):''));}};this.goal=function(id,revenue){if(id){var goal=(typeof id=='number'||id.match(/^[0-9]+$/))?'[id]='+id:'[name]='+_c.enc(id);_c.beacon({type:'goal',q:'&goal'+goal+(revenue?'&goal[revenue]='+revenue:'')});}};this.beacon=function(type,q){var o,i,j,site_id,hm,custom='',goal='',split='',jsuid=_c.get_cookie('_jsuid');if(typeof type=='object'){o=type;if(o.type)type=o.type;else return false;if(o.q)q=o.q;else{q='';for(i in o)if(i!='type'&&o.hasOwnProperty(i))q+='&'+i+'='+_c.enc(o[i]);}}else{type=type||'pageview';q=q||'';}if(type!='heatmap'&&type!='ping'){custom=_c.custom_data();if(_cc.goal){if(typeof _cc.goal=='object'){for(i in _cc.goal)if(_cc.goal.hasOwnProperty(i))goal+='&goal['+_c.enc(i)+']='+_c.enc(_cc.goal[i]);}else goal='&goal='+_c.enc(_cc.goal);}if(_cc.split){for(i in _cc['split']){if(_cc['split'].hasOwnProperty(i)){if(i=='goal'&&typeof _cc['split'].goal=='object'){for(j=0;j<_cc['split'].goal.length;j++)split+='&split[goal][]='+_cc.split.goal[j];}else split+='&split['+_c.enc(i)+']='+_c.enc(_cc.split[i]);}}}}for(i=0;i<site_ids.length;i++){site_id=site_ids[i];hm=_c.get_cookie('_heatmaps_g2g_'+site_id)||window['_heatmaps_g2g_'+site_id]||'';if(_c.get_cookie('_no_tracky_'+site_id)||_c.dupe(site_id,type,q)||(type!='pageview'&&(window['unpoco_'+site_id]))||(type=='heatmap'&&hm!='yes'))continue;_c.inject('//in.getclicky.com/in.php?site_id='+site_id+(type=='pageview'?'':'&type='+type)+q+custom+goal+split+'&res='+screen.width+"x"+screen.height+'&lang='+(_n.language||_n.browserLanguage||'en')+'&tz='+_c.enc(_w.Intl&&Intl.DateTimeFormat().resolvedOptions().timeZone||'')+'&tc='+(_n.maxTouchPoints||'')+(_c.he_platform?'&hep='+_c.he_platform:'')+(_c.he_model?'&hem='+_c.he_model:'')+'&ck='+(_n.cookieEnabled&&!_cc.cookies_disable?1:0)+(jsuid?'&jsuid='+jsuid:'')+(hm?'&hm='+hm:'')+(_cc.visitor_consent?'&consent=1':'')+''+'&x='+_c.rnd(),(type=='pageview'?'js':'beacon'));}_c.ref=_c.utm=_cc.goal=_cc.split='';};this.inject=function(src,type){type=type||'js';if(type=='beacon'){if(_n.sendBeacon&&_n.sendBeacon(src))return;type='js';}if(type=='js'){var s=_d.createElement('script');s.type='text/javascript';s.async=true;s.src=src;}else if(type=='css'){var s=_d.createElement('link');s.type='text/css';s.rel='stylesheet';s.href=src;}(_d.body||_d.getElementsByTagName('head')[0]).appendChild(s);};this.ping_start=function(){if(_c.pinging||_cc.ping_disable||(_cc.timeout&&(_cc.timeout<5||_cc.timeout>240)))return;_c.pinging=1;_t(_c.ping,30000);_t(_c.ping,60000);_t(function(){var pingy=setInterval(_c.ping,120000);_t(clearInterval,_mx(125,(_cc.timeout||10)*60-115)*1000,pingy);_c.ping();},120000);};this.ping=function(){_c.beacon('ping');};this.get_cookie=function(name){if(_cc.sticky_data_disable&&name.match(/^_(custom|utm|referrer)/))return'';var i,ca=_d.cookie.split(';');for(i=0;i<ca.length;i++)if(ca[i].match(new RegExp("\\b"+name+"=")))return decodeURIComponent(ca[i].split(name+'=')[1]);return'';};this.set_cookie=function(name,value,expires,force){if((_cc.cookies_disable&&!force)||(_cc.sticky_data_disable&&name.match(/^_(custom|utm|referrer)/)))return false;var maxage=expires=='session'?'':";max-age="+(expires||86400*365),temp=name+"="+_c.enc(value)+maxage+";path=/;";if(_cc.cookie_domain)temp+='domain='+_cc.cookie_domain+';';else if(_l.hostname.match(/\./))temp+='domain=.'+_l.hostname.replace(/^www\./i,'')+';';_d.cookie=temp;};this.enc=function(e){return encodeURIComponent(e);};this.rnd=function(){return Math.ceil(999999999*Math.random()).toString(36);};this.add_event=function(o,type,func){if(o.addEventListener)o.addEventListener(type,func,false);};this.advanced=function(){var i,j,ai,cl,a=_d.getElementsByTagName("a"),p=_cc.outbound_pattern,link=new RegExp("^(https?|ftp|telnet|mailto|tel):","i"),link_internal=new RegExp("^https?:\/\/[^/]*"+_l.host.replace(/^www\./i,""),"i"),download=new RegExp("\\.(7z|aac|apk|avi|cab|csv|dmg|doc(x|m|b)?|epub|exe|flv|gif|gz|jpe?g|js|m4a|mp(3|4|e?g)|mobi|mov|msi|ods|pdf|phps|png|ppt(x|m|b)?|rar|rtf|sea|sit|svgz?|tar|torrent|txt|vcf|web(m|p)|wma|wmv|xls(x|m|b)?|xml|zip)$","i");for(i=0;i<a.length;i++){ai=a[i];cl=ai.className;if(typeof cl!='string')continue;if(cl.match(/clicky_log_download/i))_c.add_event(ai,"mousedown",_c.download);else if(cl.match(/clicky_log_outbound/i))_c.add_event(ai,"mousedown",_c.outbound);else if(cl.match(/clicky_log/i))_c.add_event(ai,"mousedown",_c.click);else{if(_cc.outbound_disable)continue;if(link.test(ai.href)&&!cl.match(/clicky_ignore/i)){if(download.test(ai.href))_c.add_event(ai,"mousedown",_c.download);else if(!link_internal.test(ai.href))_c.add_event(ai,"mousedown",_c.outbound);else if(typeof p=='object'){for(j=0;j<p.length;j++){if(_c.outbound_pattern_match(ai.href,p[j])){_c.add_event(ai,"mousedown",_c.outbound);break;}}}else if(typeof p=='string'&&_c.outbound_pattern_match(ai.href,p))_c.add_event(ai,"mousedown",_c.outbound);}}}};this.adv_log=function(e,type){var t=_c.get_target(e);_c.log(_c.adv_href(t),_c.adv_text(t),type);};this.get_target=function(e){e=e||_w.event;var t=e.target?e.target:e.srcElement;if(t.nodeType&&t.nodeType==3)t=t.parentNode;return t;};this.adv_href=function(e){do{if(e.href&&!e.src)return e.href;e=_c.get_parent(e);}while(e);return"";};this.adv_text=function(e){do{var txt=e.text||e.innerText;if(txt)return txt;if(e.title)return e.title;if(e.name)return e.name;if(e.alt)return e.alt;if(e.src)return e.src;e=_c.get_parent(e);}while(e);return"";};this.get_parent=function(e){return e.parentElement||e.parentNode;};this.outbound_pattern_match=function(href,p){return RegExp(p.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")).test(href);};this.download=function(e){_c.adv_log(e,"download");};this.outbound=function(e){_c.adv_log(e,"outbound");};this.click=function(e){_c.adv_log(e,"click");};};return new function(){this.getInstance=function(){if(instance==null){instance=new _ins();instance.constructor=null;}return instance;}};})();var clicky=_CLOB.getInstance(),clicky_custom=clicky_custom||{},clicky_site_ids=clicky_site_ids||[],_cgen=clicky,_cgen_custom=clicky_custom;clicky_site_ids.push(window.async_site_id||window.clicky_site_id);clicky_site_ids.push(document.currentScript&&document.currentScript.getAttribute("data-id"));clicky_custom.visitor=clicky_custom.visitor||clicky_custom.session||window.clicky_custom_session;if(window.clicky_goal)clicky_custom.goal=clicky_goal;if(self!=top){try{var _test=top.document.title;}catch(e){clicky_custom.track_iframe=1;}}while(clicky_site_ids.length)clicky.init(clicky_site_ids.shift());