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

