if(!pSUPERFLY){var pSUPERFLY={version:2.5,ready:false,readyList:[],query:{},interval:15*1000,newToSite:0,count:0,scrolls:0,keydowns:0,useIframe:0,mousemoves:0,pagehash:"",domain:"",uid:"",started:0,titleLength:100,staticRoot:(("https:"==document.location.protocol)?"https://s3.amazonaws.com/static.chartbeat.net/":"http://static.chartbeat.net/"),agg:{scrolls:0,keydowns:0,mousemoves:0},init:function(){if(pSUPERFLY.readCookie("_SUPERFLY_nosample")){return}this.started=(new Date()).getTime();var e=document.getElementsByTagName("script");for(i=0;i<e.length;i++){if(e[i].src.match(/(chartbeat|chartbeatdev).js/)){var d=e[i];break}}if(d){this.query=this.parseQueryString(d.src.split("?")[1])}if(this.query){this.uid=pSUPERFLY.query.uid;this.domain=this.query.domain||location.host;this.titleLength=parseInt(this.query.titleLength)||this.titleLength}else{this.domain=location.host}var b=window._sf_async_config;if(b){this.uid=b.uid;this.domain=b.domain||this.domain;this.titleLength=b.titleLength||this.titleLength;this.useIframe=b.useIframe||this.useIframe}this.pageSession=this.uuid();this.host=location.host;this.host=this.host.replace(/^www./,"");this.domain=this.domain.replace(/^www./,"");this.pathname=location.pathname+location.search;this.pathname=this.pathname.replace(/PHPSESSID=[^&]+/,"");this.pathname=this.pathname.replace(/\/$/,"");var c=this.readCookie("_chartbeat");if(!c){this.newToSite=1;if(this.deleteCookie("_SUPERFLY")||this.deleteCookie("_sfu")){this.newToSite=0}}this.persistentUser=c||this.uuid();if(!c){this.createCookie("_chartbeat",this.persistentUser,365)}var a=(window.onscroll)?window.onscroll:function(){};window.onscroll=function(){a();pSUPERFLY.scrolls++;pSUPERFLY.agg.scrolls++};var a=(document.body.onkeydown)?document.body.onkeydown:function(){};document.body.onkeydown=function(){a();pSUPERFLY.keydowns++;pSUPERFLY.agg.keydowns++};var a=(document.body.onmousemove)?document.body.onmousemove:function(){};document.body.onmousemove=function(){a();pSUPERFLY.mousemoves++;pSUPERFLY.agg.mousemoves++};if(!b){if(typeof(window.addEventListener)!="undefined"){window.addEventListener("load",this.onPageLoad,false)}else{if(typeof(document.addEventListener)!="undefined"){document.addEventListener("load",this.onPageLoad,false)}else{if(typeof window.attachEvent!="undefined"){window.attachEvent("onload",this.onPageLoad)}}}}else{this.onPageLoad()}this.defer(function(){pSUPERFLY.intervalTimer=setInterval(pSUPERFLY.checkLog,15*1000);pSUPERFLY.timer=setTimeout(pSUPERFLY.logAndReschedule,500)})},parseQueryString:function(g){var a={};if(g==undefined){g=location.search?location.search:""}if(g.charAt(0)=="?"){g=g.substring(1)}g=g.replace("+"," ");var d=g.split(/[&;]/g);for(var c=0;c<d.length;c++){var f=d[c].split("=");var b=decodeURIComponent(f[0]);var e=decodeURIComponent(f[1]);a[b]=e}return a},uuid:function(){var a,c,b;a="";for(b=0;b<16;b++){c=Math.floor(Math.random()*36).toString(36);a=a+c}return a},deleteCookie:function(a){if(this.readCookie(a)){pSUPERFLY.createCookie(a,"",-1);return true}return false},createCookie:function(c,d,f,e){if(!e){e="/"}if(f){var b=new Date();b.setTime(b.getTime()+(f*24*60*60*1000));var a="; expires="+b.toGMTString()}else{var a=""}document.cookie=c+"="+d+a+"; path="+e},readCookie:function(b){var e=b+"=";var a=document.cookie.split(";");for(var d=0;d<a.length;d++){var f=a[d];while(f.charAt(0)==" "){f=f.substring(1,f.length)}if(f.indexOf(e)==0){return f.substring(e.length,f.length)}}return null},checkLog:function(){var a=new Date();if(pSUPERFLY.nextRun-a.getTime()>15*1000&&(pSUPERFLY.mousemoves||pSUPERFLY.keydowns||pSUPERFLY.scrolls)){pSUPERFLY.interval=15000;pSUPERFLY.logAndReschedule()}},logAndReschedule:function(){clearTimeout(pSUPERFLY.timer);if(((new Date()).getTime()-pSUPERFLY.started)>60*60*1000){return}pSUPERFLY.interval=pSUPERFLY.interval*2;if(pSUPERFLY.interval>240000){pSUPERFLY.interval=15000}pSUPERFLY.log();pSUPERFLY.nextRun=(new Date()).getTime()+pSUPERFLY.interval;pSUPERFLY.timer=setTimeout(pSUPERFLY.logAndReschedule,pSUPERFLY.interval)},log:function(){pSUPERFLY.lastRun=(new Date()).getTime();var d=[0,0];if(typeof(window.pageYOffset)=="number"){d=[window.pageXOffset,window.pageYOffset]}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){d=[document.body.scrollLeft,document.body.scrollTop]}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){d=[document.documentElement.scrollLeft,document.documentElement.scrollTop]}}}if(d[1]=="undefined"){d[1]=0}var e=location.pathname;if(location.search){e+=location.search}var c=write=idle=0;if(pSUPERFLY.agg.keydowns>0){write=1}else{if(pSUPERFLY.agg.mousemoves>0||pSUPERFLY.agg.scrolls>0){c=1}else{idle=1}}var a=(location.protocol||"http:")+"//ping.chartbeat.net/ping?h="+encodeURIComponent(pSUPERFLY.domain);a+="&p="+encodeURIComponent(e);if(pSUPERFLY.count==0){if(document.referrer.indexOf(document.domain)!=-1){a+="&v="+encodeURIComponent(document.referrer||"")}else{a+="&r="+encodeURIComponent(document.referrer||"")}}a+="&u="+pSUPERFLY.persistentUser;a+="&d="+encodeURIComponent(location.host.replace(/^www./,""));a+="&g="+pSUPERFLY.uid;a+="&i="+encodeURIComponent(document.title.slice(0,pSUPERFLY.titleLength));a+="&n="+pSUPERFLY.newToSite;a+="&s="+pSUPERFLY.agg.scrolls;a+="&k="+pSUPERFLY.agg.keydowns;a+="&m="+pSUPERFLY.agg.mousemoves;a+="&t="+pSUPERFLY.pageSession;a+="&c="+pSUPERFLY.count++;a+="&x="+d[1];a+="&y="+(document.body.scrollHeight||0);a+="&w="+(window.innerHeight||document.body.offsetHeight||0);a+="&j="+((pSUPERFLY.interval/1000)+15);a+="&R="+c;a+="&W="+write;a+="&I="+idle;a+="&ts="+(new Date()).getTime();if(pSUPERFLY.pagetimer){a+="&b="+pSUPERFLY.pagetimer}var b=[-pSUPERFLY.scrolls,-pSUPERFLY.keydowns,-pSUPERFLY.mousemoves];setTimeout(function(){pSUPERFLY.agg.scrolls+=b[0];pSUPERFLY.agg.keydowns+=b[1];pSUPERFLY.agg.mousemoves+=b[2]},60*1000);pSUPERFLY.scrolls=pSUPERFLY.keydowns=pSUPERFLY.mousemoves=0;if(pSUPERFLY.useIframe&&navigator.userAgent.indexOf("Firefox")>-1){pSUPERFLY.requestViaIframe(a)}else{pSUPERFLY.requestViaImage(a)}if(pSUPERFLY.count>=360){clearInterval(pSUPERFLY.intervalTimer)}},requestViaIframe:function(b){var a=document.getElementById("cbIframe");if(a){a.contentWindow.location.replace(b)}else{var c=document.createElement("iframe");c.style.height="1px";c.style.width="1px";c.style.visibility="hidden";c.style.position="absolute";c.id="cbIframe";document.body.appendChild(c);c.contentDocument.location.replace(b)}},requestViaImage:function(a){var b=new Image(1,1);b.onerror=pSUPERFLY.onPingError;b.src=a},onPingError:function(){clearTimeout(pSUPERFLY.timer);clearInterval(pSUPERFLY.intervalTimer);pSUPERFLY.createCookie("_SUPERFLY_nosample",1,0.007)},defer:function(a){if(this.ready){a.apply(document,[pSUPERFLY])}else{this.readyList.push(function(){return a.apply(this,[pSUPERFLY])})}},onPageLoad:function(){pSUPERFLY.ready=true;if(typeof(_sf_startpt)=="number"){if(typeof(_sf_endpt)=="number"){pSUPERFLY.pagetimer=_sf_endpt-_sf_startpt}else{pSUPERFLY.pagetimer=(new Date()).getTime()-_sf_startpt}}for(var a=0;a<pSUPERFLY.readyList.length;++a){pSUPERFLY.readyList[a].apply(document,[pSUPERFLY])}}};pSUPERFLY.init()};