function ez_attachEvent(element, evt, func) { if (element.addEventListener) { element.addEventListener(evt, func, false); } else { element.attachEvent("on" + evt, func); } } function ez_attachEventWithCapture(element, evt, func, useCapture) { if (element.addEventListener) { element.addEventListener(evt, func, useCapture); } else { element.attachEvent("on" + evt, func); } } function ez_detachEvent(element, evt, func) { if(element.removeEventListener) { element.removeEventListener(evt, func); } else { element.detachEvent("on"+evt, func); } } function ez_getQueryString(field, url) { var href = url ? url : window.location.href; var reg = new RegExp('[?&]' + field + '=([^&#]*)', 'i'); var string = reg.exec(href); return string ? string[1] : null; }if(typeof ct !== "undefined" && ct !== null) { ct.destroy(); } var ct = { DEBUG : false, frameTimeoutId : -1, frameLoadCount : 0, frameElements : [], frameData : [], currentFrame : null, currentFrameIndex : -1, stopLoadFrames : false, loadFramesTimeoutMs : 800, ilLoadIntervalId : -1, ilLoadCount : 0, stopIlLoad : false, oldBrowser : false, eventLoopTimeoutId : -1, eventLoopRateMs : 100, lastActiveElement : null, windowHasFocus : false, documentHasFocus : false, activeFrameIndex : false, activeFrame : null, twoClickEventTimeoutId : null, clickTimeoutMs : 800, windowBlurFunc : null, windowFocusFunc : null, windowBeforeUnloadFunc : null, isInitialized : false, selectors : [ [".ezoic_ad > .ezoic_ad", 2], [".ez_sa_ad", 2], [".ezo_ad > center > .ezoic-ad > .ezoic-ad", 2], [".ezoic-ad > .ezoic-ad", 2], [".ezo_link_unit_a", 5], [".ezo_link_unit_m", 38], [".ezo_link_unit_unknown", 0], [".ezoic-ad > .OUTBRAIN > .ob-widget", 41], [".ezoic-ad > div[id *= 'taboola-'] > .trc_rbox_container", 37], [".ezflad", 46], [".ezflad-47", 47] ], init : function() { this.log("Init Func called"); if(this.isInitialized === true) { this.log("Initialized already called before. Not running again."); return; } this.initVars(); this.loadFrames(); var self = this; this.ilLoadIntervalId = setInterval(function(){self.loadILTrack()}, 500); this.startEventLoop(); this.attachWindowEvents(); this.isInitialized = true; }, destroy : function() { this.log("Destroy Func called"); this.unloadFrames(); this.unloadIlTrack(); this.unsetClickEvents(); this.stopEventLoop(); this.detachWindowEvents(); this.isInitialized = false; }, initVars : function() { this.log("Initialize Vars"); this.frameTimeoutId = -1; this.frameLoadCount = 0; this.frameElements = []; this.frameData = []; this.currentFrame = null; this.currentFrameIndex = -1; this.stopLoadFrames = false; this.ilLoadIntervalId = -1; this.ilLoadCount = 0; this.stopIlLoad = false; this.oldBrowser = this.isUndefined(document.hasFocus); this.eventLoopTimeoutId = -1; this.eventLoopRateMs = 100; this.lastActiveElement = null; this.windowHasFocus = false; this.documentHasFocus = false; this.activeFrameIndex = false; this.activeFrame = null; this.twoClickEventTimeoutId = null; this.clickTimeoutMs = 800; this.windowBlurFunc = null; this.windowFocusFunc = null; this.windowBeforeUnloadFunc = null; this.isInitialized = false; }, loadFrames : function() { this.log("Loading Frames"); this.frameLoadCount++; for(var i = 0; i < this.selectors.length; i++) { var elems = document.querySelectorAll(this.selectors[i][0]); var statSourceId = this.selectors[i][1]; for(var j = 0; j < elems.length; j++) { this.setClickEvents(elems[j], statSourceId); } } if(this.frameLoadCount > 40) { this.stopLoadFrames = true; } var self = this; if (this.stopLoadFrames == false) { this.frameTimeoutId = setTimeout(function(){self.loadFrames();}, this.loadFramesTimeoutMs); } }, unloadFrames : function() { this.log("Unloading frames"); this.stopLoadFrames = true; clearTimeout(this.frameTimeoutId); }, setClickEvents : function(elem, statSourceId) { // Return if already set if(this.isUndefined(elem.ezo_flag) === false) { return; } this.log("Set Click Events for elem : " + elem.id); this.frameElements.push(elem); this.frameData.push({ statSourceId: statSourceId, twoClickRecorded: false, navigationsRecorded: 0 }); var self = this; var index = this.frameElements.length - 1; elem.ezo_flag = true; elem.mouseOverFunc = function() { self.log("Mouse Over Func"); self.currentFrame = this; self.currentFrameIndex = index; }; elem.mouseOutFunc = function() { self.log("Mouse Out Func"); self.currentFrame = null; self.currentFrameIndex = -1; }; elem.clickFunc = function() { self.log("Click Func"); self.currentFrame = this; self.currentFrameIndex = index; self.ezAwesomeClick(false, index); }; ez_attachEvent(elem, "mouseover", elem.mouseOverFunc); ez_attachEvent(elem, "mouseout", elem.mouseOutFunc); if(statSourceId == 46) { ez_attachEventWithCapture(elem, "click", elem.clickFunc, true); } if(statSourceId === 4) { elem.mouseOverFuncIl = function() { self.log("Mouse Over Il Func"); if(self.ilLoadCount > 30) { self.ilLoadCount -= 30; } clearInterval(self.ilLoadIntervalId); self.ilLoadIntervalId = setInterval(function(){self.loadILTrack()}, 500); }; ez_attachEvent(elem, "mouseover", elem.mouseOverFuncIl); } this.log("Finished Set Click Events"); }, unsetClickEvents : function() { this.log("Unset Click Events"); while(this.frameElements.length) { var elem = this.frameElements.pop(); if(this.isUndefined(elem) === false) { delete elem.ezo_flag; ez_detachEvent(elem, "mouseover", elem.mouseOverFunc); delete elem.mouseOverFunc; ez_detachEvent(elem, "mouseout", elem.mouseOutFunc); delete elem.mouseOutFunc; if(this.isUndefined(elem.mouseOverFuncIl) === false) { ez_detachEvent(elem, "mouseover", elem.mouseOverFuncIl); delete elem.mouseOverFuncIl; } } this.frameData.pop(); } this.log("Finished unset Click Events"); }, loadILTrack : function() { this.ilLoadCount++; var elems = document.querySelectorAll("span.IL_AD, .IL_BASE"); for(var i = 0; i < elems.length; i++) { var elem = elems[i]; if(this.isUndefined(elem.ezo_flag) == false) { continue; } if(this.findParentsWithClass(elem, ["IL_AD", "IL_BASE"]) !== false) { this.setClickEvents(elem, 4); } } if(this.ilLoadCount > 55) { this.log("Il Load Count is over 55. Stopping."); this.stopIlLoad = true; } if(this.stopIlLoad === true) { this.log("Clearing ilLoadInterval"); clearInterval(this.ilLoadIntervalId); } }, unloadIlTrack : function() { this.log("Unloading Il Track"); this.stopIlLoad = true; clearInterval(this.ilLoadIntervalId); }, startEventLoop : function() { this.log("Starting Event Loop"); if(this.oldBrowser === true) { return; } var self = this; this.eventLoopTimeoutId = setTimeout(function() {self.doEventLoop()}, this.eventLoopRateMs); }, doEventLoop : function() { if(this.oldBrowser === true) { return; } var docNowHasFocus = document.hasFocus() && !document.hidden; if (this.lastActiveElement !== document.activeElement) { if(this.windowHasFocus === false) { this.fixedWindowBlur(); } this.lastActiveElement = document.activeElement; // If the active element switched, we know the document was momentarily focused on this.documentHasFocus = true; } if(this.documentHasFocus === true && docNowHasFocus === false) { this.documentBlur(); } this.documentHasFocus = docNowHasFocus; var self = this; this.eventLoopTimeoutId = setTimeout(function() {self.doEventLoop()}, this.eventLoopRateMs); }, stopEventLoop : function() { this.log("Stopping event loop"); if(this.oldBrowser === true) { return; } clearTimeout(this.eventLoopTimeoutId); }, documentBlur : function() { this.log("Document Blur"); if(this.twoClickEventTimeoutId !== null) { clearTimeout(this.twoClickEventTimeoutId); } if(this.activeFrameIndex != -1 && this.activeFrameIndex == this.currentFrameIndex) { this.ezAwesomeClick(false, this.activeFrameIndex); } }, fixedWindowBlur : function() { this.log("Fixed Window Blur"); this.activeFrameIndex = this.searchFrames(document.activeElement); if(this.activeFrameIndex < 0) { this.activeFrame = null; return; } this.activeFrame = this.frameElements[this.activeFrameIndex]; var self = this; var frameIndex = this.activeFrameIndex; this.twoClickEventTimeoutId = setTimeout(function() { self.ezAwesomeClick(true, frameIndex); }, this.clickTimeoutMs); }, searchFrames : function(frameToFind) { for(var i = 0; i < this.frameElements.length; i++) { if (this.frameElements[i] === frameToFind || this.frameElements[i].contains(frameToFind)) { return i; } } return -1; }, findParentsWithClass : function(elem, classNameList) { var parent = elem.parentNode; do { var classes = parent.className.split(/\s+/); for(var i = 0; i < classes.length; i++) { for(var j = 0; j < classNameList.length; j++) { if(classes[i] == classNameList[j]) { return parent; } } } } while((parent = parent.parentNode) && this.isUndefined(parent.className) == false); return false; }, ezAwesomeClick : function(isTwoClick, frameIndex) { this.log("EzAwesomeClick isTwoClick : ", isTwoClick, " and frame index : ", frameIndex); this.log(this.frameElements); var frameElem = this.frameElements[frameIndex]; var data = this.frameData[frameIndex]; var statSourceId = 0; if(typeof data != 'undefined') { statSourceId = data.statSourceId; } var adUnitName = this.getAdUnitFromElement(frameElem, statSourceId); this.log("adUnitName is: ",adUnitName); var paramsObj = null; if(adUnitName != "") { paramsObj = _ezim_d[adUnitName]; } else { paramsObj = { position_id : 0, sub_position_id : 0, full_id : "0", width: 0, height: 0 }; } // For dfp ads, check if this is ox or adsense if(statSourceId == 2) { var iframes = frameElem.querySelectorAll("iframe"); if(iframes.length > 0 && iframes[0].id.substring(0,3) == "ox_") { statSourceId = 33; } else { statSourceId = 5; } } if(this.isUndefined(window._ezaq) === true) { this.log("_ezaq not defined"); return; } // check if clicks have been recorded for this element -- only save one two-click and up to 5 normal clicks if(isTwoClick === true) { data.twoClickRecorded = true; } else { // Save to sqs __ez.ck.setByCat("ezoawesome_" + _ezaq.domain_id + "=" + paramsObj.full_id + ' ' + Date.now() + "; path=/;",3); if(data.navigationsRecorded >= 5) { return; } data.navigationsRecorded += 1; } if(this.isUndefined(window.ezoTemplate) === true || ezoTemplate === "pub_site_noads" || ezoTemplate === "pub_site_mobile_noads" || ezoTemplate === "pub_site_tablet_noads") { this.log("no click ezoTemplate is : ", ezoTemplate); return; } if (isTwoClick === false) { this.clickRequest("/utilcave_com/awesome.php", { url : _ezaq.url, width : paramsObj.width, height : paramsObj.height, did : _ezaq.domain_id, sourceid : statSourceId, uid : _ezaq.user_id, template : ezoTemplate }); } this.clickRequest("/ezoic_awesome/", { url : _ezaq.url, width : paramsObj.width, height : paramsObj.height, did : _ezaq.domain_id, sourceid : statSourceId, uid : _ezaq.user_id, ff : _ezaq.form_factor_id, tid : _ezaq.template_id, apid : paramsObj.position_id, sapid : paramsObj.sub_position_id, iuid : paramsObj.full_id, creative : (this.isUndefined(paramsObj.creative_id) === false ? paramsObj.creative_id : ""), template : ezoTemplate, country : _ezaq.country, sub_ad_positions : _ezaq.sub_page_ad_positions, twoclick : (isTwoClick === true ? 1 : 0), max_ads : _ezaq.max_ads, word_count : _ezaq.word_count, user_agent : _ezaq.user_agent }); if(isTwoClick === false) { this.loadUUIDScript(); } }, loadUUIDScript : function() { if(typeof ezosuigenerisc != "undefined" || ((typeof window.isAmp != 'undefined') && isAmp === true)) { return; } this.log("Load UUID Script"); (function() { var el = document.createElement("script"); el.async = true; el.type = 'text/javascript'; el.src = "//g.ezoic.net/ezosuigenerisc.js"; var node = document.getElementsByTagName('script')[0]; node.parentNode.insertBefore(el, node); })(); }, clickRequest : function(url, data) { this.log("Click Request with url : ", url, " and data : ", data); if((this.isUndefined(window.ezJsu) === false && ezJsu === true) || (this.isUndefined(window._ez_sa) === false && _ez_sa === true) || (this.isUndefined(window.isAmp) === false && isAmp == true) || (this.isUndefined(window.ezWp) === false && ezWp === true)){ url = "//g.ezoic.net" + url; } else { url = window.location.protocol + "//" + window.location.host + url; } var request = new XMLHttpRequest(); var request_type = true; // Make request async on desktop and synchronous on mobile/tablet if(this.isMobileOperatingSystem() === true ) { request_type = false; } request.open('POST', url, request_type); request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"); var queryData = []; for(var param in data) { queryData.push(param + "=" + encodeURIComponent(data[param])); } request.send(queryData.join("&")); }, getAdUnitFromElement : function(elem, statSourceId) { if(this.isUndefined(window._ezim_d) === true) { this.log("_ezim_d not found"); return ""; } if(statSourceId == 4) { for(key in _ezim_d) { if(key.indexOf("inline-1") != -1) { this.log("found inline"); return key; } } } else if (this.isUndefined(elem.adunitname) === false) { this.log("found ad unit from elem.adunitname field"); return elem.adunitname; } else if (elem.getAttribute('adunitname') != null) { this.log("found ad unit from property field: ",elem.getAttribute('adunitname')); return elem.getAttribute('adunitname'); } else { var widgetWrapParent = this.findParentsWithClass(elem, ["ezoic-ad"]); if(widgetWrapParent !== false) { if(this.isUndefined(_ezim_d[widgetWrapParent.getAttribute("data-ez-name")]) === false) { return widgetWrapParent.getAttribute("data-ez-name"); } } } return ""; }, attachWindowEvents : function() { this.log("Attaching window events"); var self = this; this.windowBlurFunc = function() { self.log("Window Blur Func"); self.windowHasFocus = false; if(self.lastActiveElement !== document.activeElement && self.oldBrowser === false) { self.fixedWindowBlur(); self.lastActiveElement = document.activeElement; } else if (self.currentFrame !== null) { self.ezAwesomeClick(false, self.currentFrameIndex); } }; this.windowFocusFunc = function() { self.log("Window Focus Func"); self.windowHasFocus = true; self.activeFrame = null; self.activeFrameIndex = -1; }; this.windowBeforeUnloadFunc = function() { self.log("Window Before Unload Func"); if(self.twoClickEventTimeoutId !== null) { clearTimeout(self.twoClickEventTimeoutId); } // We don't have some events being called // We can account for that here if( self.isMobileOperatingSystem() ) { self.fixedWindowBlur(); } if(self.currentFrameIndex != -1 && self.activeFrameIndex == self.currentFrameIndex && self.frameData[self.activeFrameIndex].navigationsRecorded == 0) { self.ezAwesomeClick(false, self.activeFrameIndex); } }; ez_attachEvent(window, "blur", this.windowBlurFunc); ez_attachEvent(window, "focus", this.windowFocusFunc); ez_attachEvent(window, "beforeunload", this.windowBeforeUnloadFunc); if(this.isIosUserAgent() === true) { this.log("Attaching pagehide"); ez_attachEvent(window, "pagehide", this.windowBeforeUnloadFunc); } }, detachWindowEvents : function() { this.log("Detaching window events."); ez_detachEvent(window, "blur", this.windowBlurFunc); ez_detachEvent(window, "focus", this.windowFocusFunc); ez_detachEvent(window, "beforeunload", this.windowBeforeUnloadFunc); if(this.isIosUserAgent() === true) { ez_detachEvent(window, "pagehide", this.windowBeforeUnloadFunc); } }, isUndefined : function() { for (var i = 0; i < arguments.length; i++) { if (typeof arguments[i] === 'undefined' || arguments[i] === null) { return true; } } return false; }, log : function() { if(this.DEBUG) { console.log.apply(console, arguments); } }, isMobileOperatingSystem : function() { return typeof ezoFormfactor !== "undefined" && (ezoFormfactor == "2" || ezoFormfactor == "3"); }, isIosUserAgent : function() { return navigator.userAgent.indexOf("iPad") != -1 || navigator.userAgent.indexOf("iPhone") != -1 || navigator.userAgent.indexOf("iPod") != -1; } }; ct.init(); var ezdent=ezdent||{};ezdent.msgs=[];ezdent.debug=function(){if(!ezDenty.processed){return;}if(ezdent.msgs.length>0){for(var ll=0,imax=ezdent.msgs.length;ll iframe','iframe.switch_request_frame'];this.nativeQ=['.OUTBRAIN > .ob-widget','div[id*="taboola-"] > .trc_rbox_container','div.rc-wc.rc-bp'];this.initArrays();this.processed=false;};ezdent.Denty.prototype.Process=function(){this.setSizes();this.getDisplay();this.getNative();this.fire();this.processed=true;ezdent.log(this);};ezdent.Denty.prototype.addA=function(el,type){if(typeof el==="undefined"||el===null){return;}if(!this.alreadyFound(el,5)&&el.clientWidth>0&&el.clientHeight>0){this.as.push(new ezdent.Item(el,type));}};ezdent.Denty.prototype.alreadyFound=function(el,numElsToCheck){if(typeof el.parentNode!=="undefined"){var parent=el.parentNode;for(var ll=0,imax=numElsToCheck;ll0){for(var l11 in p){if(p.hasOwnProperty(l11)===false)continue;pxArr.push(new __ezDotData(l11,p[l11]));}__ez.bit.Add(l1l,pxArr);__ez.bit.Fire();ezdent.log(p);}};ezdent.Denty.prototype.getDisplay=function(){this.getDisplayDfp();if(this.displayQ.length<1){return;}for(var ll=0,imax=this.displayQ.length;ll0){for(var l1I=0,jmax=els.length;l1I0){for(var l1I=0,jmax=els.length;l1I0){for(var ll=0,imax=this.as.length;ll0){for(var ll=0,imax=this.as.length;llwindow.innerHeight){l1ll=window.innerHeight-this.coords.top;}var l1l1=this.width;if((this.coords.left+this.width)>window.innerWidth){l1l1=window.innerWidth-this.coords.left;}ezdent.log(this.el);ezdent.log('usable '+l1ll+' * '+l1l1);ezdent.log(l1l1*l1ll);return l1l1*l1ll;};ezdent.Item.prototype.ios=function(){return(this.coords.top<=window.innerHeight&&this.coords.left>=0&&this.coords.left<=window.innerWidth);};var ezDenty=new ezdent.Denty();setTimeout(function(){ezDenty.Process();},7500);// minified riveted.js using https://jscompress.com/ !function(e,t){"function"==typeof define&&define.amd?define("ezRiveted",[],t):"object"==typeof module&&module.exports?module.exports=t():e.riveted=t()}(this,function(){return function(){var t,d,f,m,n=!1,i=!1,o=!1,e=0,u=new Date,c=null,r=null,l=0,a=0;function s(){0=t-50))if(!(50<=e.clientY))e.relatedTarget||e.toElement||p.unload(e)}},load:function(e){C(),function(){if("undefined"!=typeof performance&&null!==performance){var e=performance.getEntriesByType("paint"),t=e.find(function(e){return"first-paint"===e.name}),n=e.find(function(e){return"first-contentful-paint"===e.name});if(null!=t){var a=Math.round(t.startTime);__ez.bit.Add(m,[new __ezDotData("first_paint",a)]),S("first_paint: "+a)}if(null!=n){var o=Math.round(n.startTime);__ez.bit.Add(m,[new __ezDotData("first_contentful_paint",o)]),S("first_contentful_paint: "+o)}A()}}(),function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(null!=e){var t=e.effectiveType,n=e.downlink,a=e.rtt;null!=t&&(__ez.bit.Add(m,[new __ezDotData("connection_effective_type",t)]),S("connection_effective_type: "+t)),null!=n&&(__ez.bit.Add(m,[new __ezDotData("connection_downlink",n)]),S("connection_downlink: "+n)),null!=a&&(__ez.bit.Add(m,[new __ezDotData("connection_rtt",a)]),S("connection_rtt: "+a)),A()}}()},unload:function(e){var t=(new Date).getTime();(0===i.unloadTime||t>i.unloadTime+s)&&(!function(){var e=b("ezux_et"),t=b("ezux_tos"),n=o.getTime()-l.engagedAdded,a=T()-l.tosAdded;n==i.engagedTime&&(n=0);r.et=parseInt(n)+parseInt(""==r.et?0:r.et),r.tos=parseInt(a)+parseInt(""==r.tos?0:r.tos),S("[Times] Total Engaged: "+r.et+" (+"+n+")"),S("[Times] Total TOS: "+r.tos+" (+"+a+")"),__ez.ck.setByCat(e+"="+r.et,3),__ez.ck.setByCat(t+"="+r.tos,3),l.engagedAdded+=n,l.tosAdded+=a}(),C(),g.unloadAll(e),i.unloadTime=t)},pageshow:function(e){var t,n=b("ezoawesome"),a=z(n);0d&&(S("Turning off auto"),clearInterval(e))},t)}function v(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n}function w(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):delete e["on"+t]}function y(){var e,t;return void 0!==document.hidden?(e="hidden",t="visibilitychange"):void 0!==document.msHidden?(e="msHidden",t="msvisibilitychange"):void 0!==document.webkitHidden&&(e="webkitHidden",t="webkitvisibilitychange"),{hiddenPropName:e,visibilityChangeEventName:t}}function D(){var e=[];return e.push.apply(e,document.querySelectorAll('a[href*="facebook.com/sharer/sharer.php"]')),e.push.apply(e,document.querySelectorAll('a[href*="facebook.com/sharer.php"]')),e.push.apply(e,document.querySelectorAll('a[href*="facebook.com/share.php"]')),e.push.apply(e,document.querySelectorAll('div[class*="fb-share-button"]')),e.push.apply(e,document.querySelectorAll('a[href*="twitter.com/share"]')),e.push.apply(e,document.querySelectorAll('a[href*="twitter.com/intent/tweet"]')),e.push.apply(e,document.querySelectorAll('iframe[class*="twitter-share-button"]')),e.push.apply(e,document.querySelectorAll('a[href*="plus.google.com/share"]')),e.push.apply(e,document.querySelectorAll('iframe[src*="apis.google.com/u/0/se/0/_/+1/sharebutton"]')),e.push.apply(e,document.querySelectorAll('a[href*="linkedin.com/cws/share"]')),e.push.apply(e,document.querySelectorAll('a[href*="linkedin.com/shareArticle"]')),e.push.apply(e,document.querySelectorAll('a[href*="pinterest.com/pin/create/button"]')),e.push.apply(e,document.querySelectorAll('a[href*="pinterest.com/pin/create/bookmarklet"]')),e.push.apply(e,document.querySelectorAll('a[href*="tumblr.com/share/link"]')),e.push.apply(e,document.querySelectorAll('a[href*="reddit.com/submit"]')),e}function z(e){for(var t=e+"=",n=decodeURIComponent(document.cookie).split(";"),a=0;a=d&&(S("Turning off timer"),p.unload({type:"max"}),o.off())}})}function C(){if(S("[Performance] Store performance"),1!=f&&window.performance&&window.performance.timing){var e=performance.timing.navigationStart,t=performance.timing.connectEnd,n=performance.timing.responseStart,a=performance.timing.responseEnd,o=performance.timing.domInteractive,i=performance.timing.domContentLoadedEventEnd,r=performance.timing.domComplete;if(0n;n++)e[n][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){t.Context.refreshAll();for(var e in i)i[e].enabled=!0;return this},t.refreshAll=function(){t.Context.refreshAll()},t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=n.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+i,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,o[t.waypointContextKey]=this,i+=1,n.windowContext||(n.windowContext=!0,n.windowContext=new e(window)),this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var i=0,o={},n=window.Waypoint,r=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical),i=this.element==this.element.window;t&&e&&!i&&(this.adapter.off(".waypoints"),delete o[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didResize||(e.didResize=!0,n.requestAnimationFrame(t))})},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){(!e.didScroll||n.isTouch)&&(e.didScroll=!0,n.requestAnimationFrame(t))})},e.prototype.handleResize=function(){n.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var i in e){var o=e[i],n=o.newScroll>o.oldScroll,r=n?o.forward:o.backward;for(var s in this.waypoints[i]){var a=this.waypoints[i][s];if(null!==a.triggerPoint){var l=o.oldScroll=a.triggerPoint,p=l&&h,u=!l&&!h;(p||u)&&(a.queueTrigger(r),t[a.group.id]=a.group)}}}for(var c in t)t[c].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},e.prototype.innerHeight=function(){return this.element==this.element.window?n.viewportHeight():this.adapter.innerHeight()},e.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},e.prototype.innerWidth=function(){return this.element==this.element.window?n.viewportWidth():this.adapter.innerWidth()},e.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var i in this.waypoints[e])t.push(this.waypoints[e][i]);for(var o=0,n=t.length;n>o;o++)t[o].destroy()},e.prototype.refresh=function(){var t,e=this.element==this.element.window,i=e?void 0:this.adapter.offset(),o={};this.handleScroll(),t={horizontal:{contextOffset:e?0:i.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:i.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};for(var r in t){var s=t[r];for(var a in this.waypoints[r]){var l,h,p,u,c,d=this.waypoints[r][a],f=d.options.offset,w=d.triggerPoint,y=0,g=null==w;d.element!==d.element.window&&(y=d.adapter.offset()[s.offsetProp]),"function"==typeof f?f=f.apply(d):"string"==typeof f&&(f=parseFloat(f),d.options.offset.indexOf("%")>-1&&(f=Math.ceil(s.contextDimension*f/100))),l=s.contextScroll-s.contextOffset,d.triggerPoint=Math.floor(y+l-f),h=w=s.oldScroll,u=h&&p,c=!h&&!p,!g&&u?(d.queueTrigger(s.backward),o[d.group.id]=d.group):!g&&c?(d.queueTrigger(s.forward),o[d.group.id]=d.group):g&&s.oldScroll>=d.triggerPoint&&(d.queueTrigger(s.forward),o[d.group.id]=d.group)}}return n.requestAnimationFrame(function(){for(var t in o)o[t].flushTriggers()}),this},e.findOrCreateByElement=function(t){return e.findByElement(t)||new e(t)},e.refreshAll=function(){for(var t in o)o[t].refresh()},e.findByElement=function(t){return o[t.waypointContextKey]},window.onload=function(){r&&r(),e.refreshAll()},n.requestAnimationFrame=function(e){var i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t;i.call(window,e)},n.Context=e}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}function i(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),o[this.axis][this.name]=this}var o={vertical:{},horizontal:{}},n=window.Waypoint;i.prototype.add=function(t){this.waypoints.push(t)},i.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},i.prototype.flushTriggers=function(){for(var i in this.triggerQueues){var o=this.triggerQueues[i],n="up"===i||"left"===i;o.sort(n?e:t);for(var r=0,s=o.length;s>r;r+=1){var a=o[r];(a.options.continuous||r===o.length-1)&&a.trigger([i])}}this.clearTriggerQueues()},i.prototype.next=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints),o=i===this.waypoints.length-1;return o?null:this.waypoints[i+1]},i.prototype.previous=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints);return i?this.waypoints[i-1]:null},i.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},i.prototype.remove=function(t){var e=n.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},i.prototype.first=function(){return this.waypoints[0]},i.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},i.findOrCreate=function(t){return o[t.axis][t.name]||new i(t)},n.Group=i}(),function(){"use strict";function t(t){this.$element=e(t)}var e=$ezJQuery,i=window.Waypoint;e.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(e,i){t.prototype[i]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[i].apply(this.$element,t)}}),e.each(["extend","inArray","isEmptyObject"],function(i,o){t[o]=e[o]}),i.adapters.push({name:"jquery",Adapter:t}),i.Adapter=t}(),function(){"use strict";function t(t){return function(){var i=[],o=arguments[0];return t.isFunction(arguments[0])&&(o=t.extend({},arguments[1]),o.handler=arguments[0]),this.each(function(){var n=t.extend({},o,{element:this});"string"==typeof n.context&&(n.context=t(this).closest(n.context)[0]),i.push(new e(n))}),i}}var e=window.Waypoint;$ezJQuery&&($ezJQuery.fn.waypoint=t($ezJQuery)),window.Zepto&&(window.Zepto.fn.waypoint=t(window.Zepto))}(); !function(){"use strict";function t(s){this.options=e.extend({},i.defaults,t.defaults,s),this.element=this.options.element,this.$element=e(this.element),this.createWrapper(),this.createWaypoint()}var e=$ezJQuery,i=window.Waypoint;t.prototype.createWaypoint=function(){var t=this.options.handler;this.waypoint=new i(e.extend({},this.options,{element:this.wrapper,handler:e.proxy(function(e){var i=this.options.direction.indexOf(e)>-1,s=i?this.$element.outerHeight(!0):"";this.$wrapper.height(s),this.$element.toggleClass(this.options.stuckClass,i),t&&t.call(this,e)},this)}))},t.prototype.createWrapper=function(){this.options.wrapper&&this.$element.wrap(this.options.wrapper),this.$wrapper=this.$element.parent(),this.wrapper=this.$wrapper[0]},t.prototype.destroy=function(){this.$element.parent()[0]===this.wrapper&&(this.waypoint.destroy(),this.$element.removeClass(this.options.stuckClass),this.options.wrapper&&this.$element.unwrap())},t.defaults={wrapper:'
',stuckClass:"stuck",direction:"down right"},i.Sticky=t}(); if ( !!$ezJQuery('#ez-sticky-ad-1').length && !$ezJQuery('#ez-sticky-ad-1').is(':empty')) { __JASS.onWindowLoad(run); } function run() { var stickyElement = function (stickyAdPosition) { var stickyEl = document.querySelector("#ez-sticky-ad-" + stickyAdPosition); var stopEl = document.querySelector('.ezoic-sticky-cutoff'); if (stickyEl == null || stopEl == null) return; var stickyElExtraOffset = ezGetTopPositionForAd(stickyEl); var stopElWP = new Waypoint({ element: stopEl, handler: function (direction) { if (direction == 'down') { var footerOffset = $ezJQuery(stopEl).offset(); $ezJQuery(stickyEl).css({ position: 'absolute', top: footerOffset.top - stickyElExtraOffset - $ezJQuery(stickyEl).outerHeight() }); } else if (direction == 'up') { $ezJQuery(stickyEl).attr('style', ''); } }, offset: function () { return $ezJQuery(stickyEl).outerHeight(); } }); var myStickyEl = new Waypoint.Sticky({ element: stickyEl, wrapper: false, stuckClass: 'ez-sticky-class' }); }; var ezGetTopPositionForAd = function (docEl) { var stickyElExtraTop = 0; var el = $ezJQuery(docEl); if (el.offsetParent()) { el = el.offsetParent(); var maxLoops = 10; var currentLoop = 1; do { stickyElExtraTop += el[0].offsetTop; currentLoop++; if (currentLoop > maxLoops || el.prop('tagName') == 'HTML') break; } while (el = el.offsetParent()); } return stickyElExtraTop; }; var ezCheckWayRefresh = function () { var changed = false; var height = ezStickyHeightEl.height(); var sidebarHeight = ezSidebarHeightEl.height(); height = Math.floor(height); sidebarHeight = Math.floor(sidebarHeight); if (height != ezStickyCurrentHeight) { ezStickyCurrentHeight = height; changed = true; } if (sidebarHeight != ezSidebarCurrentHeight) { ezSidebarCurrentHeight = sidebarHeight; changed = true; } if (changed == true) { Waypoint.refreshAll(); } }; var ezStickyHeightEl = $ezJQuery('#stylesheet_body'); var ezStickyCurrentHeight = ezStickyHeightEl.height(); var ezSidebarHeightEl = $ezJQuery('.ezSidebar'); var ezSidebarCurrentHeight = ezSidebarHeightEl.height(); if ($ezJQuery(".ezoic-sticky-cutoff").offset().top > ($ezJQuery("#ez-sticky-ad-1").offset().top + $ezJQuery('#ez-sticky-ad-1').height())) { stickyElement(1); $ezJQuery(window).on("scroll", function () { ezCheckWayRefresh(); }); window.setInterval(function () { ezCheckWayRefresh(); }, 5000); } } } })();