(function(){var e=true,g,h=this;function k(a){var b={};if(a){a.charAt(0)=="?"&&(a=a.substring(1));for(var a=a.replace("+"," "),a=a.split(/[&;]/g),c=0;c<a.length;c++){var d=a[c].split("=");b[decodeURIComponent(d[0])]=decodeURIComponent(d[1])}}return b}function m(a,b,c){var d="",f=h.location.href.split("?");f.length&&(f=k(f[1]),b=c||b,f[b]&&(d="&"+a+"="+f[b]));return d};function q(a,b,c,d){return(a=a[c]||a[d])?"&g"+b+"="+encodeURIComponent(a):""};function r(){if(s!==void 0)return s;try{var a=h.localStorage;if(a.removeItem)return s=a}catch(b){}return s=null}var s;function t(){var a="",b,c;for(c=0;c<16;c++)b=Math.floor(Math.random()*36).toString(36),a+=b;return a}function u(a,b){return function(){a.apply(b,arguments)}}function v(a,b){var c=h;c.addEventListener?c.addEventListener(a,b,false):c.attachEvent&&c.attachEvent("on"+a,b)}function w(){return(x("_chartbeat2")||"").split(".")}function y(){return(new Date).getTime()};function z(a){this.a=h._sf_async_config||{};this.A=u(this.G,this);this.f=[];this.d=a;this.b();v("unload",u(this.F,this));for(var a=u(this.H,this),b=h._cbq||[];b.length;)a(b.shift());h._cbq={push:a}}g=z.prototype;g.b=function(){this.m=this.g=0;this.u=y();this.o=t();this.n=e;this.s=72E5;this.d.b();var a=+this.a.sessionLength;if(!isNaN(a))this.s=a*6E4};g.H=function(a){this.a[a[0]]=a[1];this.g=0};
g.p=function(){var a=h._sf_startpt,b=h._sf_endpt;if(typeof a=="number")this.t=typeof b=="number"?b-a:y()-a;this.l=setInterval(u(this.j,this),15E3);this.j()};g.G=function(){this.f.push(1);for(var a=0,b=0;b<this.f.length;++b)a+=this.f[b];a<3?(this.n=e,A(this)):(clearInterval(this.l),B("_SUPERFLY_nosample","1",0.0070))};function C(a){if(!x("_SUPERFLY_nosample"))a.C?a.p():(a.C=e,!h._sf_async_config&&!h._cbq?v("load",u(a.p,a)):a.p())}
g.F=function(){var a=this.o,b=r();if(b)b._cb_cp+=(b._cb_cp?",":"")+a;else if(!h.name)h.name="_cb_cp"+a};function A(a){var b=a.g,b=b?Math.min(b*2,16):1;a.g=b}g.I=function(a,b){this.w=h.location.protocol+"//"+this.a.domain+this.a.path;this.a.path=a;b&&(this.a.title=b);clearInterval(this.l);this.b();C(this)};
g.j=function(){var a=this.a.reading&&+this.a.reading||D(this.d);E(this.d);if(this.m<this.g&&!a)this.m++;else{a?this.g=0:A(this);this.m=0;this.f.push(0);this.f.length>18&&this.f.shift();var a=this.a,b=F(),c=Math.round((y()-this.u)/600)/100,d=0,f=0,j=0;G(this.d,"onkeydown")?f=1:this.a.reading&&+this.a.reading||G(this.d,"onmousemove")||G(this.d,"onscroll")||c<0.1?d=1:j=1;var n="",i="",I=h.location;if(this.n)this.n=false,this.w?(n=this.w,i=e):(n=document.referrer||"",i=n.indexOf("://"+I.host+"/"),i=i!=
-1&&i<9),n=(i?"&v=":"&r=")+encodeURIComponent(n),i=a.title.slice(0,100),i="&i="+encodeURIComponent(i);var Q=this.t?"&b="+this.t:"",R=this.k?"&A="+this.k:"",S=this.r?"&f="+this.r:"",o,l=r();if(l)o=l._cb_cp,l._cb_cp="";else if(/_cb_cp[a-z0-9]{16}/.test(h.name))o=h.name.substr(6),h.name="";o=o?"&D="+o:"";var l=[],p;for(p in a)p.charAt(0)=="_"&&l.push(p+"="+a[p]);p=(I.protocol||"http:")+"//"+a.pingServer+"/ping?h="+encodeURIComponent(a.domain)+"&p="+encodeURIComponent(a.path)+"&u="+(w()[0]||this.o)+"&d="+
encodeURIComponent(this.B)+"&g="+a.uid+q(a,0,"sections","categories")+q(a,1,"authors","brands")+(a.noCookies?"":"&n="+this.D)+S+"&c="+c+"&x="+b+"&y="+(document.body.scrollHeight||0)+"&w="+(h.innerHeight||document.body.offsetHeight||0)+"&j="+Math.round((this.g+2)*15E3/1E3)+"&R="+d+"&W="+f+"&I="+j+"&E="+this.q+n+Q+R+m("C","utm_campaign",a.campaignTag)+m("M","utm_medium",a.mediumTag)+"&t="+this.o+"&V=8"+o+i+(l.length?"&"+l.join("&"):"")+"&_";a=new Image(1,1);a.onerror=this.A;a.src=p;y()-this.u>=this.s&&
clearInterval(this.l)}};function H(a,b){var c=Math;return c.abs(c.floor((+b-+a)/864E5))}function J(a,b){for(;b--;)a+=b==0?1:0;return a};function F(){var a=document.body,b=document.documentElement;if(typeof h.pageYOffset=="number")return h.pageYOffset;else if(a&&a.scrollTop)return a.scrollTop;else if(b&&b.scrollTop)return b.scrollTop;return 0};function K(a){z.call(this,a)}(function(){var a=z;function b(){}b.prototype=a.prototype;K.v=a.prototype;K.prototype=new b})();
K.prototype.b=function(){K.v.b.call(this);this.q=0;this.k=null;for(var a=this.a,b=document.getElementsByTagName("script"),c=0;c<b.length;++c)if(b[c].src.match(/chartbeat.js/)){b=k(b[c].src.split("?")[1]);a.uid=a.uid||b.uid;a.domain=a.domain||b.domain;break}a=h.location;b=this.a;b.pingServer=b.pingServer||"ping.chartbeat.net";b=this.a;b.title=b.title||document.title;b=this.a;b.domain=b.domain||a.host;b=this.a;a:{c=null;if(this.a.useCanonical){for(var c=null,d=document.getElementsByTagName("link"),
f=0;f<d.length;++f)if(d[f].rel=="canonical")c=d[f].href,c=c.substring(c.indexOf("/",9));if(c)break a}f=h.location;c=f.pathname+(f.search||"");c=c.replace(/PHPSESSID=[^&]+/,"");d=/&utm_[^=]+=[^&]+/ig;(f=d.exec(f.search))&&(c=c.replace(d,""));d=/\?utm_[^=]+=[^&]+(.*)/i;(f=d.exec(c))&&(c=c.replace(d,f[1]!=""?"?"+f[1]:""))}b.path=b.path||c;this.B=a.host.replace(/^www\./,"");this.a.domain=this.a.domain.replace(/^www\./,"");this.h=x("_chartbeat2");a=y()-+((this.h||"").split(".")[1]||0);d=y();f=w();b=J("",
14);f&&(c=f[3],(d=H(f[2],d))&&d<14&&(b=J(c.substr(d),d)));this.D=this.h&&a>18E5?0:1;this.h?(a=w(),a[2]=y(),a[3]=b,this.h=a.join(".")):this.h=t()+"."+y()+"."+y()+"."+b;B("_chartbeat2",this.h,30);var j;a=w();if(b=a[3])H(a[1],a[2])<14&&(b=b.substr(b.indexOf("1"))),j=Math.round(b.length/b.replace(/0/g,"").length*10)/10;this.r=j};K.prototype.z=function(a){this.k=a};K.prototype.j=function(){D(this.d)&&(this.q+=15);K.v.j.call(this)};function L(){this.i=[];M(this,h,"onscroll");M(this,document.body,"onkeydown");M(this,document.body,"onmousemove");this.b()}L.prototype.b=function(){this.c=[{},{},{},{}];this.e=0;E(this)};function D(a){for(var b=0;b<a.i.length;b++)if(a.c[a.e][a.i[b]])return e;return false}function M(a,b,c){var d=b[c]||function(){};a.i.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.c[a.e].onscroll++;return}}a.c[a.e][c]++}}
function G(a,b){for(var c=0,d=0;d<a.c.length;d++)c+=a.c[d][b]||0;return c}function E(a){a.e=(a.e+1)%a.c.length;for(var b=0;b<a.i.length;b++)a.c[a.e][a.i[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 B(a,b,c){var d=h._sf_async_config;if(!d||!d.noCookies)d=new Date,d.setTime(y()+c*864E5),document.cookie=a+"="+b+("; expires="+d.toGMTString())+"; path=/"};var N=(document.location.protocol=="https:"?"https://a248.e.akamai.net/chartbeat.download.akamai.com/102508/":"http://static.chartbeat.com/")+"js/inpage.js";function O(){var a=document.createElement("script");a.async=e;a.src=N;var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b)}function P(a){if(/[\/|\.]chartbeat.com$/.test(a.origin)){var b=r(),c=String(a.data);if(b&&c.indexOf("_cb_ip")==0)b._cb_ip=1,a.source.postMessage(1,a.origin),O()}};if(!h.pSUPERFLY){var T=new L,U=new K(T);h.pSUPERFLY=U;K.prototype.virtualPage=K.prototype.I;K.prototype.activity=K.prototype.z;C(U);var V=r();V&&(v("message",P),V._cb_ip&&O())};})();
