(function(){var f;function h(){var a=j(),b;if(a)b=a._cb_cp,a._cb_cp="";else if(/_cb_cp[a-z0-9]{16}/.test(window.name))b=window.name.substr(6),window.name="";return b};function k(){this.a=window._sf_async_config||{};this.w=n(this,this.C);this.e=[];q(this);r("unload",n(this,this.B));for(var a=0,b;b=(window._cbq||[])[a];++a)this.s(b);window._cbq={push:n(this,this.s)}}f=k.prototype;f.s=function(a){this.a[a[0]]=a[1];this.f=0};function n(a,b){return function(){b.apply(a,arguments)}}function u(){var a,b,c;a="";for(c=0;c<16;c++)b=Math.floor(Math.random()*36).toString(36),a+=b;return a}function v(a,b,c){a.a[b]=a.a[b]||c}
function w(a){if(!x("_SUPERFLY_nosample"))a.z?a.l():(a.z=!0,!window._sf_async_config&&!window._cbq?r("load",n(a,a.l)):a.l())}
function q(a){a.f=0;a.k=0;a.t=y();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])}}v(a,"uid",b.uid);v(a,"domain",b.domain)}b=window.location;v(a,"pingServer","ping.chartbeat.net");
v(a,"title",document.title);v(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]:""))}v(a,"path",c);c=parseInt(a.a.sessionLength,10);
if(!isNaN(c))a.o=c*6E4;a.r=u();a.n=b.host;a.n=a.n.replace(/^www\./,"");a.a.domain=a.a.domain.replace(/^www\./,"");a.g=x("_chartbeat2");b=y()-parseInt((a.g||"").split(".")[1]||0,10);a.A=a.g&&b>18E5?0:1;if(!a.g)a.g=u()+"."+y();z("_chartbeat2",a.g,30);a.c?A(a.c):a.c=new B}f.D=function(a,b){this.u=window.location.protocol+"//"+this.a.domain+this.a.path;this.a.path=a;b&&(this.a.title=b);window.clearInterval(this.j);q(this);w(this)};f.v=function(a){this.i=a};
f.l=function(){var a=window._sf_startpt,b=window._sf_endpt;if(typeof a=="number")this.q=typeof b=="number"?b-a:y()-a;this.j=window.setInterval(n(this,this.p),15E3);this.p()};f.B=function(){var a=this.r,b=j();if(b)b._cb_cp+=(b._cb_cp?",":"")+a;else if(!window.name)window.name="_cb_cp"+a};function C(a,b){var c;c=new Image(1,1);c.onerror=a.w;c.src=b}
f.C=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,D(this)):(clearInterval(this.j),z("_SUPERFLY_nosample","1",0.0070))};function D(a){var b=a.f,b=b?Math.min(b*2,16):1;a.f=b}f.p=function(){var a;a:{a=this.c;for(var b=0;b<a.h.length;b++)if(a.b[a.d][a.h[b]]){a=!0;break a}a=!1}E(this.c);this.k<this.f&&!a?this.k++:(a?this.f=0:D(this),this.k=0,F(this),y()-this.t>=this.o&&window.clearInterval(this.j))};
function G(){var a=window,b=document.body,c=document.documentElement;return typeof a.pageYOffset=="number"?a.pageYOffset:b&&b.scrollTop?b.scrollTop:c&&c.scrollTop?c.scrollTop:0}
function F(a){function b(a,b,c){return(b=i[b]||i[c])?"&g"+a+"="+encodeURIComponent(b):""}var c=G(),d=0,e=0,l=0;H(a.c,"onkeydown")?e=1:H(a.c,"onmousemove")||H(a.c,"onscroll")?d=1:l=1;var i=a.a,m="",g="",s=window.location;if(a.m)a.m=!1,a.u?(m=a.u,g=!0):(m=document.referrer||"",g=m.indexOf("://"+s.host+"/"),g=g!=-1&&g<9),m=(g?"&v=":"&r=")+encodeURIComponent(m),g="&i="+I(i.title.slice(0,100));var M=a.q?"&b="+a.q:"",N=a.i?"&A="+a.i:"",o=h(),o=o?"&D="+o:"";a.e.push(0);a.e.length>18&&a.e.shift();var t=[],
p;for(p in a.a)p[0]=="_"&&t.push(p+"="+a.a[p]);C(a,(s.protocol||"http:")+"//"+i.pingServer+"/ping?h="+encodeURIComponent(i.domain)+"&p="+encodeURIComponent(i.path)+"&u="+a.g+"&d="+I(s.host.replace(/^www\./,""))+"&g="+i.uid+b(0,"sections","categories")+b(1,"authors","brands")+"&n="+a.A+"&c="+Math.round((y()-a.t)/600)/100+"&x="+c+"&y="+(document.body.scrollHeight||0)+"&w="+(window.innerHeight||document.body.offsetHeight||0)+"&j="+Math.round((a.f+2)*15E3/1E3)+"&R="+d+"&W="+e+"&I="+l+m+M+N+"&t="+a.r+
o+g+(t.length?"&"+t.join("&"):"")+"&_")};function B(){this.h=[];J(this,window,"onscroll");J(this,document.body,"onkeydown");J(this,document.body,"onmousemove");A(this)}function A(a){a.b=[{},{},{},{}];a.d=0;E(a)}function J(a,b,c){var d=b[c]||function(){};a.h.push(c);b[c]=function(b){d.apply(this,arguments);if(b&&c=="onkeydown"){var l=b.keyCode?b.keyCode:b.which;if(l==32||l>36&&l<41){a.b[a.d].onscroll++;return}}a.b[a.d][c]++}}function H(a,b){for(var c=0,d=0;d<a.b.length;d++)c+=a.b[d][b]||0;return c}
function E(a){a.d=(a.d+1)%a.b.length;for(var b=0;b<a.h.length;b++)a.b[a.d][a.h[b]]=0};function x(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 z(a,b,c){var d=new Date;d.setTime(y()+c*864E5);document.cookie=a+"="+b+("; expires="+d.toGMTString())+"; path=/"};function j(){if(K!==void 0)return K;try{var a=window.localStorage;if(a.removeItem)return K=a}catch(b){}return K=null}var K;function r(a,b){var c=window;c.addEventListener?c.addEventListener(a,b,!1):c.attachEvent&&c.attachEvent("on"+a,b)}function y(){return(new Date).getTime()}function I(a){return encodeURIComponent(a)};var L=new k;window.pSUPERFLY=L;k.prototype.virtualPage=k.prototype.D;k.prototype.activity=k.prototype.v;w(L);})();

