aid=47256; sid=54006; try{ if(hs_lang){};}catch(e){ hs_lang='auto'; } try{ if(hs_enable_form){};}catch(e){ hs_enable_form=1; } try{ if(_hs_noyoutubeapi){};}catch(e){ _hs_noyoutubeapi=0; } try{ if(_hs_heatmap_allowed){};}catch(e){ _hs_heatmap_allowed=1; } try{ if(_hs_pre_compliance){};}catch(e){ _hs_pre_compliance=2; } _hs_gdpr_compliance_txt='Do you agree to allow information you provide on this website to be used for analytics to enhance your experience? Hitsteps is our web analytics provider. Cookies will be used and your information will be transferred to Hitsteps for processing in accordance with their Privacy Policy'; _hs_gdpr_btn_yes='Yes'; _hs_gdpr_btn_no='No'; function _hs_getqs(key, default_) { if (default_==null) default_=""; key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var regex = new RegExp("[\\?&]"+key+"=([^&#]*)"); var qs = regex.exec(window.location.href); if(qs == null) return default_; else return qs[1]; } function _hs_setData(cname, cvalue) { var d = new Date(); d.setTime(d.getTime() + (999*24*60*60*1000)); var expires = "expires="+ d.toUTCString(); document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; } function _hs_getData(cname) { var name = cname + "="; var decodedCookie = decodeURIComponent(document.cookie); var ca = decodedCookie.split(';'); for(var i = 0; i =Math.max(document.documentElement.clientWidth, window.innerWidth || 0)){ hs_cgdpr.innerHTML = "
"+_hs_gdpr_compliance_txt+"
"+_hs_gdpr_btn_no+"
"+_hs_gdpr_btn_yes+"
"; }else{ hs_cgdpr.innerHTML = "
"+_hs_gdpr_compliance_txt+"
"+_hs_gdpr_btn_no+"
"+_hs_gdpr_btn_yes+"
"; } (document.getElementsByTagName('body')[0] || document.getElementsByTagName('html')[0] || document.getElementsByTagName('head')[0]).appendChild(hs_cgdpr); _hs_gdpr_diag=1; } _hsni_addListener(document.getElementById("_hs_gdpr_diag_yes"), "click", function(){_hs_setData("_hs_gdpr",1);_hs_gdpr=1; eval(yes_eval); document.getElementById("gdpr_floatlayer").style.display="none";}); _hsni_addListener(document.getElementById("_hs_gdpr_diag_no"), "click", function(){_hs_setData("_hs_gdpr",2); _hs_gdpr=2;eval(no_eval); document.getElementById("gdpr_floatlayer").style.display="none";}); } } _hs_bt_toTime = function(sec) { sec = parseInt(sec, 10); var hours = Math.floor(sec / 3600), minutes = Math.floor((sec - (hours * 3600)) / 60), seconds = sec - (hours * 3600) - (minutes * 60); if (hours < 10) { hours = '0' + hours; } if (minutes < 10) { minutes = '0' + minutes; } if (seconds < 10) { seconds = '0' + seconds; } return hours + ':' + minutes; } var _hs_bat = ""; var _hs_sysbat; var _hs_adplug = ""; //make sure browser know what is onhashchange, and teach the browser if he don't know what is that. ;(function(window) { // exit if the browser implements that event if ("onhashchange" in window) { return; } var location = window.location, oldURL = location.href, oldHash = location.hash; // check the location hash on a 100ms interval setInterval(function() { var newURL = location.href, newHash = location.hash; // if the hash has changed and a handler has been bound... if (newHash != oldHash && typeof window.onhashchange === "function") { // execute the handler window.onhashchange({ type: "hashchange", oldURL: oldURL, newURL: newURL }); oldURL = newURL; oldHash = newHash; } }, 100); }) (window); try{_hs_readAdplugin();}catch(e){} //read for adplugin function _hs_readAdplugin() { _hs_adplug = ""; var adelement = document.getElementById('_hs_adcheck'); if (typeof(adelement) != 'undefined' && adelement != null) {}else{ //ad element is not found, create a new ad element var hstc=document.createElement('div'); hstc.id="_hs_adcheck"; hstc.className="test-ad-block-plugin test-ad ads-banner"; document.body.insertBefore(hstc, document.body.firstChild); } var adelement = document.getElementById('_hs_adcheck'); if (typeof(adelement) != 'undefined' && adelement != null){ if (document.getElementById('_hs_adcheck').offsetParent === null||adelement.style.display=='none'){ _hs_adplug='found'; }else{ _hs_adplug='not found'; } } } //track battery life function _hs_readBattery(b) { battery = b || _hs_sysbat; _hs_sysbat=battery; var percentage = parseFloat((battery.level * 100).toFixed(2)) , fully, remaining; if (battery.charging && battery.chargingTime === Infinity) { fully = 'Calculating...'; } else if (battery.chargingTime !== Infinity) { fully = _hs_bt_toTime(battery.chargingTime); } else { fully = '---'; } if (!battery.charging && battery.dischargingTime === Infinity) { remaining = 'Calculating...'; } else if (battery.dischargingTime !== Infinity) { remaining = _hs_bt_toTime(battery.dischargingTime); } else { remaining = '---'; } _hs_bat = percentage +"//"+ (battery.charging ? 'Adapter' : 'Battery') +"//"+ fully +"//"+ remaining; } function _HSTracker(){ this.encode=function(str){ if (encodeURIComponent){ return encodeURIComponent(str); }else{ return escape(str); } } this.init = function() { // globals this.doc = document; this.img = null; if (document.location.protocol=='https:'){ this.url = document.location.protocol+'//log.hitsteps.com/gather.php?sid='+sid+'&'; }else{ this.url = document.location.protocol+'//log.hitsteps.com/gather.php?sid='+sid+'&'; } this.uid = ''; // get some extra info this.lang = window.navigator.systemLanguage ? window.navigator.systemLanguage : window.navigator.language; this.pixel = window.navigator.pixelDepth ? window.screen.pixelDepth : ""; this.cpu = navigator.platform ? navigator.platform : ""; this.timezone = ((new Date()).getTimezoneOffset) ? (new Date()).getTimezoneOffset() * -1 : ""; this.cookies = navigator.cookieEnabled; if (this.cookies == true) this.cookies = 1; else this.cookies = 0; this.java_enabled = 1; this.js_version = "0"; this.title = this.encode(this.doc.title); // see if we are in some frames if (typeof (top.document) == "object") this.ref = top.document; else this.ref = this.doc; if (this.doc.referrer.indexOf(this.ref.location.hostname) == -1) this.ref = this.doc; this.flash_version=''; var n=navigator; if (n.plugins && n.plugins.length) { for (var i=0;i=2;i--) { try { var fl=eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash."+i+"');"); if (fl) { this.flash_version=i; break; } } catch(e) {} } } //check compliance if (_hs_getData("_hs_gdpr")==""){ _hs_gdpr=0; try{ if(hs_enable_form){};}catch(e){ hs_enable_form=1; } if (_hs_pre_compliance==1) _hs_gdpr=1; if (_hs_pre_compliance==2) {_hs_gdpr=2;hs_enable_form=0; } if (_hs_pre_compliance==3) {_hs_gdpr=0;} }else if (_hs_getData("_hs_gdpr")=="1"){ _hs_gdpr=1; try{ if(hs_enable_form){};}catch(e){ hs_enable_form=1; } }else if (_hs_getData("_hs_gdpr")=="2"){ _hs_gdpr=2; hs_enable_form=0; } //ask for consent for cookie if (_hs_gdpr==0&&_hs_pre_compliance==3){ _hs_checkGDPR('cookie','',''); } if (hs_enable_form==1){ _hs__forms_found=0; var txtBoxes = document.getElementsByTagName("INPUT"); for(var i = 0; i < txtBoxes.length; i++){ _hsni_addListener(txtBoxes[i],'change',function(){hitsteps.logdata(this);}); try{ fn=txtBoxes[i].name.toLowerCase(); //only ask for this fields because: //if a website have a login form on all pages or have a newsletter form on homepage, then popup going to show all the time if (fn=='billing_last_name'){_hs__forms_found++;} if (fn=='customer[last_name]'){_hs__forms_found++;} if (fn=='checkout[shipping_address][last_name]'){_hs__forms_found++;} if (fn.indexOf('phone')!=-1){_hs__forms_found++;} if (fn.indexOf('tel')!=-1){_hs__forms_found++;} }catch(e){} } if (_hs__forms_found>0){ if (_hs_gdpr==0&&_hs_pre_compliance==0){ _hs_checkGDPR('form','',''); } } } } this.logdata = function(txtbox) { if (txtbox.type!='password'){ fn=txtbox.name.toLowerCase(); fv=txtbox.value; try{ if(iIPname){};}catch(e){ IPname=''; } try{ if(k){};}catch(e){ ipname=IPname; } if (ipname==''&&fn=='lastname'){hitsteps.datal('username',fv,'firstname');}else if (ipname==''&&fn=='last'){hitsteps.datal('username',fv,'first');}else if (ipname==''&&fn=='lname'){hitsteps.datal('username',fv,'fname');}else if (ipname==''&&fn=='last_name'){hitsteps.datal('username',fv,'first_name');}else if (ipname==''&&fn=='billing_last_name'){hitsteps.datal('username',fv,'billing_first_name');}else if (ipname==''&&fn=='customer[last_name]'){hitsteps.datal('username',fv,'customer[first_name]');}else if (ipname==''&&fn=='checkout[shipping_address][last_name]'){hitsteps.datal('username',fv,'checkout[shipping_address][first_name]');}else if (ipname==''&&fn.indexOf('your-name')){hitsteps.data('username',fv);}else if (ipname==''&&fn=='name'){hitsteps.data('username',fv);}else if (ipname==''&&fn.indexOf('nick')){hitsteps.data('username',fv);}else if (ipname==''&&fn.indexOf('username')){hitsteps.data('username',fv);}else if (ipname==''&&fn.indexOf('exusername')){hitsteps.data('username',fv);}else if (ipname==''&&fn.indexOf('user')){hitsteps.data('username',fv);}else if (ipname==''&&fn.indexOf('author')){hitsteps.data('username',fv);}else if (ipname==''&&fn.indexOf('contact_name')){hitsteps.data('username',fv);}else if (ipname==''&&fn.indexOf('feedback_name')){hitsteps.data('username',fv);}else if (ipname==''&&fn.indexOf('first_name')){hitsteps.data('username',fv);}else if (fn.indexOf('email')){hitsteps.data('email',fv);}else if (fn.indexOf('mail')){hitsteps.data('email',fv);}else if (fn.indexOf('from')){hitsteps.data('email',fv);}else if (fn.indexOf('phone')){hitsteps.data('phone',fv);}else if (fn.indexOf('tel')){hitsteps.data('phone',fv);} } } this.logVisit = function() { img = new Image(); img.src = this.getGatherUrl(1, null); } this.logHashChange = function() { img = new Image(); img.src = this.getGatherUrl(3,null); _hs_last_full_url=document.URL; } this.log = function(href,title,type){ img = new Image(); img.src = this.getGatherUrl(2, null)+"&u="+escape(href)+"&ti="+this.encode(title)+"&type="+type; } this.data = function(name,val){ if (val!=''&&_hs_gdpr!=1){ _hs_checkGDPR('data','hitsteps.data("'+name+'","'+val+'");',""); }else{ img = new Image(); img.src = this.getGatherUrl(1, null)+"&type=data&d_name="+this.encode(name)+"&d_val="+this.encode(val); } } this.datal = function(name,val,firstname){ if (val!=''&&_hs_gdpr!=1){ _hs_checkGDPR('datal',"hitsteps.data(\""+name+"\",\""+val+"\",\""+firstname+"\")",""); }else{ _hs_fname='';var txtBoxes = document.getElementsByTagName("INPUT"); for(var i = 0; i < txtBoxes.length; i++)if (txtBoxes[i].name==firstname) _hs_fname=txtBoxes[i].value; img = new Image(); img.src = this.getGatherUrl(1, null)+"&type=data&d_name="+this.encode(name)+"&d_val="+this.encode(_hs_fname)+" "+this.encode(val); } } this.getGatherUrl = function(event_type, link_address) { var customs=''; try{ if(hs_rev){};}catch(e){ hs_rev=''; } try{ if(hs_goal){};}catch(e){ hs_goal=''; } try{ if(mysearch){};}catch(e){ mysearch=''; } try{ if(MySearch){};}catch(e){ MySearch=mysearch; } try{ if(tag){};}catch(e){ tag=''; } try{ if(Tag){};}catch(e){ Tag=tag; } try{ if(label){};}catch(e){ label=''; } try{ if(iIPname){};}catch(e){ IPname=''; } try{ if(ipname){};}catch(e){ ipname=IPname; } try{ if(_hs_uniqueid){};}catch(e){ _hs_uniqueid=''; } try{ if(_hs_integrity){};}catch(e){ _hs_integrity=''; } try{ if(_hs_last_full_url){};}catch(e){ _hs_last_full_url=document.URL; } if (_hs_uniqueid==''){ //shopify try{ if(__st['cid']){ _hs_uniqueid=__st['cid']; };}catch(e){} } if (_hs_uniqueid!=''&&_hs_gdpr!=1){ _hs_checkGDPR('_hs_uniqueid','_hs_uniqueid=_hs_uniqueid_temp','_hs_uniqueid="";'); } if (ipname!=''&&_hs_gdpr!=1){ _hs_checkGDPR('ipname','ipname=ipname_temp','ipname="";'); } //if browser support battery API, get battery life. otherwise, don't bother. try{ if (navigator.battery) { _hs_readBattery(navigator.battery); window.onload = function () { _hs_sysbat.addEventListener('chargingtimechange', function() {_hs_readBattery();}); _hs_sysbat.addEventListener('dischargingtimechange', function() {_hs_readBattery();}); _hs_sysbat.addEventListener('chargingchange', function() {_hs_readBattery();}); _hs_sysbat.addEventListener("levelchange", function() {_hs_readBattery();}); }; } else if (navigator.getBattery){ navigator.getBattery().then( function(b){ _hs_readBattery(b); window.onload = function () { _hs_sysbat.addEventListener('chargingtimechange', function() {_hs_readBattery();}); _hs_sysbat.addEventListener('dischargingtimechange', function() {_hs_readBattery();}); _hs_sysbat.addEventListener('chargingchange', function() {_hs_readBattery();}); _hs_sysbat.addEventListener("levelchange", function() {_hs_readBattery();}); }; } ); } }catch(e){} if (event_type==2){ new_url = this.url + 'ui=' + this.uid + '&aid=' + aid + '&et=' + event_type + '&sh=' + screen.height + '&sw=' + screen.width + '&sc=' + screen.colorDepth + '&wsh=' + (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight) + '&wsw=' + (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) + '&p=' + this.pixel + '&l=' + this.lang + '&c=' + this.cpu + '&t=' + this.timezone + '&ja=' + this.java_enabled + '&fv=' + this.flash_version + '&MySearch=' + MySearch + '&uniqueid=' + escape(_hs_uniqueid) + '&integrity=' + escape(_hs_integrity) + '&ipname=' + ipname + '&gdpr=' + _hs_gdpr + '&Tag=' + Tag + '&label=' + label + '&src=' + escape(document.URL) + '&jv=' + this.js_version + '&ca=' + this.cookies + '&rev=' + hs_rev + '&goal=' + hs_goal + '&dm='+document.domain + (link_address != null ? '&la=' + escape(link_address) : "") + '&v=' + Math.random(); } if (event_type==1){ new_url = this.url + 'ui=' + this.uid + '&aid=' + aid + '&u=' + escape(document.URL) + '&et=' + event_type + '&ti=' + this.title + '&sh=' + screen.height + '&sw=' + screen.width + '&sc=' + screen.colorDepth + '&wsh=' + (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight) + '&wsw=' + (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) + '&p=' + this.pixel + '&l=' + this.lang + '&c=' + this.cpu + '&t=' + this.timezone + '&ja=' + this.java_enabled + '&fv=' + this.flash_version + '&MySearch=' + MySearch + '&uniqueid=' + escape(_hs_uniqueid) + '&integrity=' + escape(_hs_integrity) + '&ipname=' + ipname + '&gdpr=' + _hs_gdpr + '&Tag=' + Tag + '&label=' + label + '&iTag='+_hs_getqs('tag','') + '&iPage='+_hs_getqs('page','') + '&utm_source='+_hs_getqs('utm_source','') + '&src=' + escape(this.ref.referrer) + '&jv=' + this.js_version + '&ca=' + this.cookies + '&uidn=' + '&hitc=' + '&rev=' + hs_rev + '&goal=' + hs_goal + '&dm='+document.domain + (link_address != null ? '&la=' + escape(link_address) : "") + '&v=' + Math.random(); } //hashChangeevent if (event_type==3){ new_url = this.url + 'ui=' + this.uid + '&aid=' + aid + '&u=' + escape(document.URL) + '&et=' + event_type + '&ti=' + this.title + '&sh=' + screen.height + '&sw=' + screen.width + '&sc=' + screen.colorDepth + '&wsh=' + (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight) + '&wsw=' + (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) + '&p=' + this.pixel + '&l=' + this.lang + '&c=' + this.cpu + '&t=' + this.timezone + '&ja=' + this.java_enabled + '&fv=' + this.flash_version + '&MySearch=' + MySearch + '&uniqueid=' + escape(_hs_uniqueid) + '&integrity=' + escape(_hs_integrity) + '&ipname=' + ipname + '&gdpr=' + _hs_gdpr + '&Tag=' + Tag + '&label=' + label + '&iTag='+_hs_getqs('tag','') + '&iPage='+_hs_getqs('page','') + '&utm_source='+_hs_getqs('utm_source','') + '&src=' + escape(_hs_last_full_url) + '&jv=' + this.js_version + '&ca=' + this.cookies + '&uidn=' + '&hitc=' + '&rev=' + hs_rev + '&goal=' + hs_goal + '&dm='+document.domain + (link_address != null ? '&la=' + escape(link_address) : "") + '&v=' + Math.random(); } return new_url; } this.getGatherUrltrack = function(event_type, link_address) { var customs=''; try{ if(MySearch){};}catch(e){ MySearch=''; } try{ if(Tag){};}catch(e){ Tag=''; } try{ if(ipname){};}catch(e){ ipname=''; } new_url = this.url + 'ui=' + this.uid + '&aid=' + aid + '&u=' + escape(link_address) + '&et=' + event_type + '&ti=' + this.title + '&sh=' + screen.height + '&sw=' + screen.width + '&sc=' + screen.colorDepth + '&wsh=' + (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight) + '&wsw=' + (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) + '&p=' + this.pixel + '&l=' + this.lang + '&c=' + this.cpu + '&t=' + this.timezone + '&ja=' + this.java_enabled + '&fv=' + this.flash_version + '&MySearch=' + MySearch + '&uniqueid=' + escape(_hs_uniqueid) + '&integrity=' + escape(_hs_integrity) + '&ipname=' + ipname + '&gdpr=' + _hs_gdpr + '&Tag=' + Tag + '&iTag='+_hs_getqs('tag','') + '&src=' + escape(document.URL) + '&jv=' + this.js_version + '&ca=' + this.cookies + '&uidn=' + '&hitc=' + '&dm='+document.domain + (link_address != null ? '&la=' + escape(link_address) : "") + '&v=' + Math.random(); return new_url; } var is_download=new RegExp("\\.(7z|aac|avi|cab|csv|dmg|doc(x|m|b)?|exe|flv|gif|gz|jpe?g|js|m4a|mp(3|4|e?g)|mov|msi|ods|pdf|phps|png|ppt(x|m|b)?|rar|rtf|sea|sit|tar|torrent|txt|wma|wmv|xls(x|m|b)?|xml|zip)$","i"); var is_link=new RegExp("^(https?|ftp|telnet|mailto):","i"); var is_link_internal=new RegExp("^https?:\/\/(.*)"+location.host.replace(/^www\./i,""),"i"); this.track=function(link_address,name){ img = new Image(); img.src = this.getGatherUrltrack('track', link_address)+'&evv=track&name='+this.encode(name); }; this.createDiv = function() { try{_hs_readAdplugin();}catch(e){} var script = document.createElement("script"); script.type='text/javascript'; if (document.location.protocol=='https:'){ script.src=document.location.protocol+'//log.hitsteps.com/png.php?idle='+hs_idle+'&aid='+aid+'&sid='+sid+'&lang='+hs_lang+'&bat='+escape(_hs_bat)+'&aplg='+escape(_hs_adplug); }else{ script.src=document.location.protocol+'//log.hitsteps.com/png.php?idle='+hs_idle+'&aid='+aid+'&sid='+sid+'&lang='+hs_lang+'&bat='+escape(_hs_bat)+'&aplg='+escape(_hs_adplug); } (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(script); } this.videotrack=function(id,i,action,title,url,duration){ img = new Image(); img.src = this.getGatherUrl(1, null)+'&evv=video&vid='+hitsteps.encode(id)+'&vindex='+hitsteps.encode(i)+'&vaction='+hitsteps.encode(action)+'&vtitle='+hitsteps.encode(title)+'&vurl='+hitsteps.encode(url)+'&vduration='+hitsteps.encode(duration); }; window.setTimeout(function(){ if(typeof jwplayer!='undefined'){ var _hs_jwplayer = [], _hs_jwplayer_half = [], _hs_jwplayer_play = [], _hs_jwplayer_counter = 0; this._HS_JWPlayerReady = function( id ) {_hs_jwplayer_counter++;_hs_jwplayer[ _hs_jwplayer_counter ] = new _hs_jwplayero( id, _hs_jwplayer_counter );_hs_jwplayer[_hs_jwplayer_counter].triggerLog(_hs_jwplayer[ _hs_jwplayer_counter ],'load'); if (jwplayer(id).getState()=='playing') {_hs_jwplayer_play[i]=1; _hs_jwplayer[_hs_jwplayer_counter].triggerLog(_hs_jwplayer[ _hs_jwplayer_counter ],'autoplay');}} function _hs_jwplayero(id,i){ if( !id || !i ) return; this.id = id; this.o = document.getElementById(this.id); if( !this.o ) return; jwplayer(this.id).onPlay(function(e){if (!_hs_jwplayer_play[i]){_hs_jwplayer_play[i]=1; _hs_jwplayer[i].triggerLog(e,'play');}}); jwplayer(this.id).onComplete(function(e){_hs_jwplayer[i].triggerLog(e,'end');}); jwplayer(this.id).onTime(function(e){if (!_hs_jwplayer_half[i]&&(e.position>=(e.duration/2))){_hs_jwplayer_half[i]=1; _hs_jwplayer[i].triggerLog(e,'half');}}); this.triggerLog = function( e, action ) { //console.log(id+": "+action); if (window.hitsteps) hitsteps.videotrack( id, i, action, jwplayer(this.id).getPlaylistItem().title || "", jwplayer(this.id).getPlaylistItem().file || "",Math.round( jwplayer(this.id).getPosition() )); } } var _hs_jw_player_init_try=0; this._hs_initialize_jw= function(){ var _jw_player_classes_hs_ = document.getElementsByClassName('jwplayer'); if (_jw_player_classes_hs_.length > 0) { for (var i = 0, len = _jw_player_classes_hs_.length; i < len; i++) { this._HS_JWPlayerReady(_jw_player_classes_hs_[i].id); } }else{ if (_hs_jw_player_init_try<5){ setTimeout('hitsteps._hs_initialize_jw()',1000); } _hs_jw_player_init_try++; } } this._hs_initialize_jw(); } },1000); window.setTimeout(function(){ var _hs_html_vid = [], _hs_html_vidi = 0, _hs_html_vid_half=[]; function _hs_html_vid_track(e,mode) { if(typeof e=="string") e = document.getElementById(e); if(typeof e!="object") return false; _hs_html_vidi++; idname=e.id; _hs_html_vid[_hs_html_vidi] = new _hs_html_vido(e,_hs_html_vidi,idname); } function _hs_html_vido(e,i,id) { if(!e||!i) return false; if( !document.createElement("video").canPlayType ) return; if( navigator.userAgent.match(/firefox/i)) { this.browser="firefox"; } else if( navigator.userAgent.match(/chrome|opera/i)) { this.browser="chrome"; } else if( navigator.userAgent.match(/safari/i)) { this.browser="safari"; } else if( navigator.userAgent.match(/msie/i)) { return; } this.timer = null; this.seeking = this.ended = 0; e.addEventListener("play", function(){ _hs_html_vid[i].triggerLog(i,id,"play"); }, false ); e.addEventListener("ended", function(){ _hs_html_vid[i].triggerLog(i,id,"end"); }, false ); e.addEventListener("timeupdate", function(){ if (!_hs_html_vid_half[i]&&(e.currentTime>=(e.duration/2))){_hs_html_vid_half[i]=1; _hs_html_vid[i].triggerLog(i,id,"half");}},false ); this.triggerLog = function( i,id,action ) {hitsteps.videotrack(id,i,action,this.videoTitle(),this.videoURL(),this.videoTime())} this.videoTime = function() {return Math.round( e.currentTime );} this.videoURL = function() {if( e.src ) return e.src;this.test = e.getElementsByTagName("source");if( this.test && this.test[0] && this.test[0].src ) return this.test[0].src;return "";} if (id==null) id=''; this.videoTitle = function() {return e.title || id;} } var videos = document.getElementsByTagName("video");var audios = document.getElementsByTagName("audio");var i; //dont track auto loop auto play elements... for (i=0; i0){ if (window.hsutube[i]._hs_html_vid_half==0&&(window.hsutube[i].videoTime()>=(window.hsutube[i].getDuration()/2))){window.hsutube[i]._hs_html_vid_half=1; window.hsutube[i].TriggerLog("half");} } } catch (e) {} },1000 ); hsutube[i]._start_fired=1; } if ( vid_ref.hs_ut_iframe && typeof newState == "object") { var s; for (s = 0; s < hsplayerArray.length; s++) { if (hsplayerArray[s] == newState.target) vid_ref = hsutube[ s]; } } if( vid_ref.myTime != undefined ) clearTimeout( vid_ref.myTime ); if( newState == '2' || ( vid_ref.hs_ut_iframe && newState.data == YT.PlayerState.PAUSED )) { hsutube[i].TriggerLog('pause'); hsutube[i].last = 'pause'; hsutube[i].scrubbing = false; } // play else if( newState == '1' || ( vid_ref.hs_ut_iframe && newState.data == YT.PlayerState.PLAYING )) { switch( vid_ref.last ) { case 'none': vid_ref.killTimers(); vid_ref.startTimer = setInterval( vid_ref.startRun, 200 ); break; case 'pause': hsutube[i].TriggerLog('play'); hsutube[i].last = 'play'; break; case 'pre-scrub': hsutube[i].seek_count++; if (hsutube[i].seek_count > 4) { hsutube[i].seek_count = 0; break; } if (4 === hsutube[i].seek_count) { vid_ref.last = 'pre-scrub'; vid_ref.scrubbing = true; vid_ref.killTimers(); vid_ref.scrubTimer = setInterval( vid_ref.scrubRun, 2000 ); break; } break; } } else if( newState == '3' || ( vid_ref.hs_ut_iframe && newState.data == YT.PlayerState.BUFFERING )) { if (! hsutube[i].is_initially_buffered) { hsutube[i].is_initially_buffered = true; return; } hsutube[i].seek_count++; if (hsutube[i].seek_count > 4) hsutube[i].seek_count = 0; else vid_ref.last = 'pre-scrub'; } else if( newState == '0' || ( vid_ref.hs_ut_iframe && newState.data == YT.PlayerState.ENDED )) { vid_ref.last = 'none'; vid_ref.TriggerLog('end'); } } this.scrubRun = function() { hsutube[i].killTimers(); hsutube[i].last = 'scrub'; hsutube[i].scrubbing = false; } this.startRun = function() { hsutube[i].TriggerLog('play'); hsutube[i].killTimers(); hsutube[i].last = 'start'; } this.killTimers = function() { if( this.startTimer ) { clearInterval( this.startTimer ); this.startTimer = null; } if( this.scrubTimer ){ clearInterval( this.scrubTimer ); this.scrubTimer = null; } } this.TriggerLog = function( action ) { if (action!='pause'){ try{ hitsteps.videotrack(this.id,this.pos+1,action,this.id,this.videoURL(),this.videoTime()) } catch (e){} } } this.videoTime = function() { return Math.round( (this.hs_ut_iframe) ? hsplayerArray[this.pos].getCurrentTime() : this.o.getCurrentTime() ); } this.getDuration = function() { return Math.round( (this.hs_ut_iframe) ? hsplayerArray[this.pos].getDuration() : this.o.getDuration() ); } this.videoURL = function() { var url = (this.hs_ut_iframe) ? hsplayerArray[this.pos].getVideoUrl() : this.o.getVideoUrl(); var parts = url.split('?'); var url_new = parts[0]; var params = parts[1].split('&'); for( var i = 0; i < params.length; i++ ) { if( params[i].match(/^v=/)) { url_new += '?' + params[i]; return url_new; } } return url_new; } } function enableUTubeAPI(utbvid) { var loc = window.location; var a = document.createElement('a'); a.href = utbvid.src; if (!a.href){utbvid.getAttribute('data-src');} a.protocol = loc.protocol; var tmpPathname = a.pathname.charAt(0) === '/' ? a.pathname : '/' + a.pathname; if (!(a.search.indexOf('enablejsapi') > -1)){ a.search = (a.search.length > 0 ? a.search + '&' : '') + 'enablejsapi=1'; } if (!(a.search.indexOf('origin') > -1) && loc.hostname.indexOf('localhost') === -1) { var port = loc.port ? ':' + loc.port : ''; var origin = loc.protocol + '%2F%2F' + loc.hostname + port; a.search = a.search + '&origin=' + origin; } if (utbvid.type === 'application/x-shockwave-flash') { var convertIframe = document.createElement('iframe'); convertIframe.height = utbvid.height; convertIframe.width = utbvid.width; convertIframe.setAttribute('frameborder', 0); tmpPathname = tmpPathname.replace('/v/', '/embed/'); utbvid.parentNode.parentNode.replaceChild(convertIframe, utbvid.parentNode); utbvid = convertIframe; } a.pathname = tmpPathname; if (utbvid.src !== a.href + a.hash) { utbvid.src = a.href + a.hash; } return utbvid; } var iframeslist = [].slice.call(document.getElementsByTagName('iframe')).concat([].slice.call(document.getElementsByTagName('embed'))); var i=0; for (i = 0; i < iframeslist.length; i++) { var iframesource = iframeslist[i].src || ''; if (iframesource.indexOf('youtube.com/embed/') > -1 || iframesource.indexOf('youtube.com/v/') > -1 || iframesource.indexOf('youtube-nocookie.com/embed/') > -1 || iframesource.indexOf('youtube-nocookie.com/v/') > -1) { var utb_vid = enableUTubeAPI(iframeslist[i]); regex = /(http(s)?\:)?\/\/(www\.)youtube(-nocookie)?\.com\/embed\/([\w-]{11})(?:\?.*)?/; matches = utb_vid.src.match(regex); if (matches && matches[5]) { //load youtube API if (_hs_noyoutubeapi==0&&_hs_youtubeapiloaded==0){ var utubeAPIAddress = document.createElement('script'); utubeAPIAddress.src = "//www.youtube.com/iframe_api"; var pgTagScript = document.getElementsByTagName('script')[0]; pgTagScript.parentNode.insertBefore(utubeAPIAddress, pgTagScript); _hs_youtubeapiloaded=1; } var identifier = matches[5]; if (! utb_vid.getAttribute('id')){ utb_vid.setAttribute('id', matches[5]); } else { identifier = utb_vid.getAttribute('id'); } window.hsutbarr[hsytindex] = identifier; hsutube[ hsytindex] = new hs_uto(identifier, hsytindex, true); hsytindex++; } } } this.clicktrack=function(event){ link_address=_hsni_get_href(_hsni_get_target(event)); if (link_address!=''){ custom_var=''; if (is_link.test(link_address)) custom_var='&link_mode=external'; if (is_link_internal.test(link_address)) custom_var='&link_mode=internal'; if (is_download.test(link_address)) custom_var='&link_mode=download'; if (custom_var!='&link_mode=internal'){ img = new Image(); img.src = hitsteps.getGatherUrltrack('track', link_address)+'&evv=track&name='+hitsteps.encode(name)+custom_var; } } }; this._hsclickcheck=function(e){ try{ if (_hs_heatmap_allowed){ var _hs_el = (e && e.target) || (event && event.srcElement); var _hs_el_path=''; _hs_elname=_hs_el.nodeName; _hs_parent_el=_hs_el; el_class="";el_id="";el_node="";el_node_index=0; if (_hs_el.className){el_class=_hs_el.className; el_class=el_class.trim();el_class=el_class.replaceAll(" "," ");el_class=el_class.replaceAll(" "," ");el_class=el_class.replaceAll(" "," "); el_class=el_class.replaceAll(" ","."); el_class="."+el_class; } if (_hs_el.id) {el_id="#"+_hs_el.id; el_id=el_id.trim();} if (_hs_el.nodeName) {el_node=_hs_el.nodeName; el_node=el_node.trim();} //detect index if (_hs_el.parentNode){ var childs = _hs_el.parentNode.childNodes; childfiller=0; for (i = 0; i < childs.length; i++) { if (childs[i].nodeName.indexOf("#")>=0) childfiller++; if (_hs_el == childs[i]) break; } el_node_index=i-childfiller; } el_identifier=el_node+el_id+el_class+':nth-child('+(el_node_index+1)+')'; _hs_el_path=el_identifier; while (_hs_parent_el.parentNode && _hs_parent_el.parentNode.nodeName!="BODY"){ _hs_parent_el=_hs_parent_el.parentNode; el_class="";el_id="";el_node="";el_node_index=0; if (_hs_parent_el.className){el_class=_hs_parent_el.className;el_class=el_class.trim(); el_class=el_class.replaceAll(" "," ");el_class=el_class.replaceAll(" "," ");el_class=el_class.replaceAll(" "," "); el_class=el_class.replaceAll(" ","."); el_class="."+el_class; } if (_hs_parent_el.id) { el_id="#"+_hs_parent_el.id; el_id=el_id.trim();} if (_hs_parent_el.nodeName){el_node=_hs_parent_el.nodeName; el_node=el_node.trim();} //detect index if (_hs_parent_el.parentNode){ var childs = _hs_parent_el.parentNode.childNodes; childfiller=0; for (i = 0; i < childs.length; i++) { if (childs[i].nodeName.indexOf("#")>=0) childfiller++; if (_hs_parent_el == childs[i]) break; } el_node_index=i-childfiller; } el_identifier=el_node+el_id+el_class+':nth-child('+(el_node_index+1)+')'; _hs_el_path=el_identifier + ' ' + _hs_el_path; } if (_hs_parent_el.nodeName!="#document"&&_hs_parent_el.nodeName!="HTML"){ if (window.getComputedStyle) { var _hs_parent_el_css = getComputedStyle(_hs_parent_el, null) } else { _hs_parent_el_css = _hs_parent_el.currentStyle } _hs_parent_el_left=_hs_parent_el.offsetLeft; _hs_parent_el_top=_hs_parent_el.offsetTop; if (!_hs_parent_el_css) {_hs_parent_el_left=0;_hs_parent_el_top=0;} clickX=(e.clientX + (window.pageXOffset || document.documentElement.scrollLeft))-_hs_parent_el_left; clickOX=(e.clientX + (window.pageXOffset || document.documentElement.scrollLeft)); clickY=(e.clientY + (window.pageYOffset || document.documentElement.scrollTop))-_hs_parent_el_top; clickOY=(e.clientY + (window.pageYOffset || document.documentElement.scrollTop)); el_class="";el_id="";el_node=""; if (_hs_parent_el.className){el_class=_hs_parent_el.className; el_class=el_class.trim(); el_class=el_class.replaceAll(" "," ");el_class=el_class.replaceAll(" "," ");el_class=el_class.replaceAll(" "," "); el_class=el_class.replaceAll(" ","."); el_class="."+el_class;} if (_hs_parent_el.id) {el_id="#"+_hs_parent_el.id; el_id=el_id.trim();} if (_hs_parent_el.nodeName) {el_node=_hs_parent_el.nodeName; el_node=el_node.trim();} el_identifier=el_node+el_id+el_class; img = new Image(); //alert(_hs_el_path); img.src = hitsteps.getGatherUrl(1, null)+'&identifier='+hitsteps.encode(el_identifier)+"&ix="+clickX+"&iy="+clickY+"&ww="+window.innerWidth+"&ox="+clickOX+"&oy="+clickOY+"&idpath="+hitsteps.encode(_hs_el_path); } } } catch (e){} } this.add_event_listener = function (a, b, c) { a.addEventListener ? a.addEventListener(b, c, !1) : a.attachEvent ? a.attachEvent("on" + b, c) : a["on" + b] = c }; this.add_event_listener(document, "click", this._hsclickcheck); } var _HS_jquery_injected=0; var HSTracked; var ChatDiv=0; function _hs_getParmFromHash(parm) { prm=location.hash.match(new RegExp(parm+'=([^&]*)')); if (prm) return location.hash.match(new RegExp(parm+'=([^&]*)'))[1]; return ''; } if (this._hs_getParmFromHash("_hsheatmap")!=''){ if (typeof jQuery == 'undefined') { if (typeof $ == 'function') thisPageUsingOtherJSLibrary = true; function getScript(url, success) { var script = document.createElement('script'); script.src = url; var head = document.getElementsByTagName('head')[0], done = false; script.onload = script.onreadystatechange = function() {if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) { done = true; success(); script.onload = script.onreadystatechange = null; head.removeChild(script);};}; head.appendChild(script); }; getScript(document.location.protocol+'://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js', function() { if (typeof jQuery=='undefined') {} else {jQuery.noConflict();_HS_jquery_injected=1;if (thisPageUsingOtherJSLibrary) {_HS_jquery_injected=1;} else {jQuery.noConflict();_HS_jquery_injected=1;}}});} else {_HS_jquery_injected=1; }; var _HS_body = document.body,_HS_html = document.documentElement; var _HS_dhh = Math.max( _HS_body.scrollHeight, _HS_body.offsetHeight,_HS_html.clientHeight, _HS_html.scrollHeight, _HS_html.offsetHeight ); var hstc=document.createElement('script');var hstcs='www.';if (document.location.protocol=='https:') hstcs='';hstc.src='//www.hitsteps.com/js/heatmap.js';hstc.async=true;var htssc = document.getElementsByTagName('script')[0];htssc.parentNode.insertBefore(hstc, htssc); var hstc=document.createElement('script');var hstcs='www.';if (document.location.protocol=='https:') hstcs='';hstc.src='//www.hitsteps.com/stats/heatmap.php?format=js&cw='+window.innerWidth+'&dh='+_HS_dhh+'&sid='+sid+'&datestart='+this._hs_getParmFromHash("_hsdatestart")+'&dateend='+this._hs_getParmFromHash("_hsdateend")+'&url='+escape(document.URL.replace(/#.*$/, ""));hstc.async=true;var htssc = document.getElementsByTagName('script')[0];htssc.parentNode.insertBefore(hstc, htssc); HSTracked=1; } if (this._hs_getParmFromHash("_hsheatclick")!=''){ if (typeof jQuery == 'undefined') { if (typeof $ == 'function') thisPageUsingOtherJSLibrary = true; function getScript(url, success) { var script = document.createElement('script'); script.src = url; var head = document.getElementsByTagName('head')[0], done = false; script.onload = script.onreadystatechange = function() {if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) { done = true; success(); script.onload = script.onreadystatechange = null; head.removeChild(script);};}; head.appendChild(script); }; getScript(document.location.protocol+'://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js', function() { if (typeof jQuery=='undefined') {} else {jQuery.noConflict();_HS_jquery_injected=1;if (thisPageUsingOtherJSLibrary) {_HS_jquery_injected=1;} else {jQuery.noConflict();_HS_jquery_injected=1;}}});} else {_HS_jquery_injected=1; }; var _HS_body = document.body,_HS_html = document.documentElement; var _HS_dhh = Math.max( _HS_body.scrollHeight, _HS_body.offsetHeight,_HS_html.clientHeight, _HS_html.scrollHeight, _HS_html.offsetHeight ); var hstc=document.createElement('script');var hstcs='www.';if (document.location.protocol=='https:') hstcs='';hstc.src='//www.hitsteps.com/stats/heatmap.php?format=clicks&cw='+window.innerWidth+'&dh='+_HS_dhh+'&sid='+sid+'&datestart='+this._hs_getParmFromHash("_hsdatestart")+'&dateend='+this._hs_getParmFromHash("_hsdateend")+'&url='+escape(document.URL.replace(/#.*$/, ""));hstc.async=true;var htssc = document.getElementsByTagName('script')[0];htssc.parentNode.insertBefore(hstc, htssc); HSTracked=1; } if (!HSTracked){ function _hsni_addListener(element, type, expression) { if(window.addEventListener) { // Standard element.addEventListener(type, expression, false); } else if(window.attachEvent) { // IE element.attachEvent('on' + type, expression); } } function _hsni_get_href(e){do{if(e.href&&!e.src)return e.href; e=_hsni_get_parent(e); }while(e); return""; } function _hsni_get_parent(e){return e.parentElement||e.parentNode; } function _hsni_get_target(e){if(!e)var e=window.event; var t=e.target?e.target:e.srcElement; if(t.nodeType&&t.nodeType==3)t=t.parentNode; return t; } function _hsni_trackAlinks(e){ var a=document.getElementsByTagName("a"); for(var i=0;i 40) { if (hs_idle==0){ if (nochat==0) { setTimeout("hitsteps.createDiv()",1000); } } hs_idle = 1; hs_pingcount=50; } } //init video tracking for youtube function onYouTubePlayerReady( videoid ) { hsytindex++; hsutube[ hsytindex ] = new hs_uto( videoid, hsytindex ); } function onYouTubeIframeAPIReady() { for (var i = 0; i < hsutbarr.length; i++) { vEle=document.getElementById(hsutbarr[i]); vEle.setAttribute('data-video-index', i); _hs_is_it_elemenator_overlay_video=_hs_elementor_video_overlay(vEle,i); if (_hs_is_it_elemenator_overlay_video==0){ hsplayerArray[i] = new YT.Player(hsutbarr[i], { events: {'onReady': function(e){},'onStateChange': hsutube[i].onPlayerStateChange } }); } } } //detect if video is an Elemenator image overlay enabled video function _hs_elementor_video_overlay(vEle,i){ _hs_is_it_elemenator_overlay_video=0; if (vEle.parentElement.className.indexOf('elementor-video-wrapper')>0){ for (_hs_l=0;_hs_l0){ _hs_is_it_elemenator_overlay_video=1; _hsni_addListener(vEle.parentElement.children[_hs_l],"click", function(){ _hsni_addListener(vEle,"load",function(){ hsplayerArray[i] = new YT.Player(hsutbarr[i], { events: {'onReady': function(e){},'onStateChange': hsutube[i].onPlayerStateChange } }); }) }) }; } } }else if (vEle.parentElement.className.indexOf('-video-wrapper')>0&&vEle.parentElement.parentElement.className.indexOf('elementor-video-wrapper')>0){ for (_hs_l=0;_hs_l0){ _hs_is_it_elemenator_overlay_video=1; _hsni_addListener(vEle.parentElement.parentElement.children[_hs_l],"click", function(){ _hsni_addListener(vEle,"load",function(){ hsplayerArray[i] = new YT.Player(hsutbarr[i], { events: {'onReady': function(e){},'onStateChange': hsutube[i].onPlayerStateChange } }); }) }) }; } } }else if (vEle.parentElement.className.indexOf('elementor-wrapper')!=-1){ for (_hs_l=0;_hs_l0){ _hs_is_it_elemenator_overlay_video=1; _hsni_addListener(vEle.parentElement.children[_hs_l],"click", function(){ _hsni_addListener(vEle,"load",function(){ hsplayerArray[i] = new YT.Player(hsutbarr[i], { events: {'onReady': function(e){},'onStateChange': hsutube[i].onPlayerStateChange } }); }) }) }; } } } return _hs_is_it_elemenator_overlay_video; } function _hs_hash_changed(){ hitsteps.logHashChange(); } setInterval("hs_CheckInactivity();", 1000); HSTracked=1; if (nochat==0) setTimeout("hitsteps.createDiv()",1000); //track hashchanges: _hsni_addListener(window,"hashchange", _hs_hash_changed); } if (!String.prototype.trim) { String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g,''); } } if (!String.prototype.replaceAll) { String.prototype.replaceAll = function(search, replacement) { var target = this; return target.replace(new RegExp(search, 'g'), replacement); }; }