(function(){function f(){this.a=window._sf_async_config||{};this.u=g(this,this.z);this.e=[];i(this)}function g(a,b){return function(){b.apply(a,arguments)}}function m(){var a,b,c;a="";for(c=0;c<16;c++)b=Math.floor(Math.random()*36).toString(36),a+=b;return a}function n(a,b,c){a.a[b]=a.a[b]||c}
function p(a){if(!q("_SUPERFLY_nosample"))a.v?a.l():(a.v=!0,window._sf_async_config?a.l():(a=g(a,a.l),typeof window.addEventListener!="undefined"?window.addEventListener("load",a,!1):typeof document.addEventListener!="undefined"?document.addEventListener("load",a,!1):typeof window.attachEvent!="undefined"&&window.attachEvent("onload",a)))}
function i(a){a.h=0;a.k=0;a.r=r();a.m=!0;a.i=null;a.o=72E5;for(var b=document.getElementsByTagName("script"),c=0;c<b.length;c++)if(b[c].src.match(/(chartbeat|chartbeatdev|chartbeat_raw).js/)){var d=b[c];break}if(d){c=d.src.split("?")[1];b={};if(c){c.charAt(0)=="?"&&(c=c.substring(1));c=c.replace("+"," ");c=c.split(/[&;]/g);for(d=0;d<c.length;d++){var e=c[d].split("=");b[decodeURIComponent(e[0])]=decodeURIComponent(e[1])}}n(a,"uid",b.uid);n(a,"domain",b.domain)}b=window.location;n(a,"pingServer","ping.chartbeat.net");
n(a,"title",document.title);n(a,"domain",b.host);a:{c=null;if(a.a.useCanonical){c=null;d=document.getElementsByTagName("link");for(e=0;e<d.length;++e)if(d[e].rel=="canonical")c=d[e].href,c=c.substring(c.indexOf("/",9));if(c)break a}e=window.location;c=e.pathname+(e.search||"");c=c.replace(/PHPSESSID=[^&]+/,"");d=/&utm_[^=]+=[^&]+/ig;(e=d.exec(e.search))&&(c=c.replace(d,""));d=/\?utm_[^=]+=[^&]+(.*)/i;(e=d.exec(c))&&(c=c.replace(d,e[1]!=""?"?"+e[1]:""))}n(a,"path",c);c=parseInt(a.a.sessionLength,10);
if(!isNaN(c))a.o=c*6E4;a.A=m();a.n=b.host;a.n=a.n.replace(/^www\./,"");a.a.domain=a.a.domain.replace(/^www\./,"");a.f=q("_chartbeat2");b=r()-parseInt((a.f||"").split(".")[1]||0,10);a.w=a.f&&b>18E5?0:1;if(!a.f)a.f=m()+"."+r();s("_chartbeat2",a.f,30);a.c?t(a.c):a.c=new u}f.prototype.B=function(a,b){this.s=window.location.protocol+"//"+this.a.domain+this.a.path;this.a.path=a;b&&(this.a.title=b);window.clearInterval(this.j);i(this);p(this)};f.prototype.t=function(a){this.i=a};
f.prototype.l=function(){var a=window._sf_startpt,b=window._sf_endpt;if(typeof a=="number")this.q=typeof b=="number"?b-a:r()-a;this.j=window.setInterval(g(this,this.p),15E3);this.p()};function v(a,b){var c;c=new Image(1,1);c.onerror=a.u;c.src=b}f.prototype.z=function(){this.e.push(1);for(var a=0,b=0;b<this.e.length;++b)a+=this.e[b];a<3?(this.m=!0,w(this)):(clearInterval(this.j),s("_SUPERFLY_nosample","1",0.0070))};function w(a){var b=a.h,b=b?Math.min(b*2,16):1;a.h=b}
f.prototype.p=function(){var a;a:{a=this.c;for(var b=0;b<a.g.length;b++)if(a.b[a.d][a.g[b]]){a=!0;break a}a=!1}x(this.c);this.k<this.h&&!a?this.k++:(a?this.h=0:w(this),this.k=0,y(this),r()-this.r>=this.o&&window.clearInterval(this.j))};function z(){var a=window,b=document.body,c=document.documentElement;if(typeof a.pageYOffset=="number")return a.pageYOffset;else if(b&&b.scrollTop)return b.scrollTop;else if(c&&c.scrollTop)return c.scrollTop;return 0}
function y(a){function b(a,c,b){return(c=h[c]||h[b])?"&g"+a+"="+encodeURIComponent(c):""}var c=z(),d=0,e=0,j=0;A(a.c,"onkeydown")?e=1:A(a.c,"onmousemove")||A(a.c,"onscroll")?d=1:j=1;var h=a.a,k="",l="",o=window.location;if(a.m)a.m=!1,a.s?(k=a.s,l=!0):(k=document.referrer||"",l=k.indexOf("://"+o.host+"/")!=-1),k=(l?"&v=":"&r=")+encodeURIComponent(k),l="&i="+B(h.title.slice(0,100));var E=a.q?"&b="+a.q:"",F=a.i?"&A="+a.i:"";a.e.push(0);a.e.length>18&&a.e.shift();v(a,(o.protocol||"http:")+"//"+h.pingServer+
"/ping?h="+encodeURIComponent(h.domain)+"&p="+encodeURIComponent(h.path)+"&u="+a.f+"&d="+B(o.host.replace(/^www\./,""))+"&g="+h.uid+b(0,"sections","categories")+b(1,"authors","brands")+"&n="+a.w+"&c="+Math.round((r()-a.r)/600)/100+"&x="+c+"&y="+(document.body.scrollHeight||0)+"&w="+(window.innerHeight||document.body.offsetHeight||0)+"&j="+Math.round((a.h+2)*15E3/1E3)+"&R="+d+"&W="+e+"&I="+j+k+E+F+"&t="+a.A+l+"&_")};function u(){this.g=[];C(this,window,"onscroll");C(this,document.body,"onkeydown");C(this,document.body,"onmousemove");t(this)}function t(a){a.b=[{},{},{},{}];a.d=0;x(a)}function C(a,b,c){var d=b[c]||function(){};a.g.push(c);b[c]=function(b){d.apply(this,arguments);if(b&&c=="onkeydown"){var j=b.keyCode?b.keyCode:b.which;if(j==32||j>36&&j<41){a.b[a.d].onscroll++;return}}a.b[a.d][c]++}}function A(a,b){for(var c=0,d=0;d<a.b.length;d++)c+=a.b[d][b]||0;return c}
function x(a){a.d=(a.d+1)%a.b.length;for(var b=0;b<a.g.length;b++)a.b[a.d][a.g[b]]=0};function q(a){a+="=";for(var b=document.cookie.split(";"),c=0;c<b.length;c++){for(var d=b[c];d.charAt(0)==" ";)d=d.substring(1,d.length);if(d.indexOf(a)==0)return d.substring(a.length,d.length)}return null}function s(a,b,c){var d=new Date;d.setTime(r()+c*864E5);document.cookie=a+"="+b+("; expires="+d.toGMTString())+"; path=/"};function r(){return(new Date).getTime()}function B(a){return encodeURIComponent(a)};var D=new f;window.pSUPERFLY=D;f.prototype.virtualPage=f.prototype.B;f.prototype.activity=f.prototype.t;p(D);})();

