window.REBELMOUSE_ACTIVE_TASKS_QUEUE.push(function(){
window.REBELMOUSE_STDLIB.loadExternalScript("https://securepubads.g.doubleclick.net/tag/js/gpt.js", function() {
});
});
window.REBELMOUSE_ACTIVE_TASKS_QUEUE.push(function(){
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l="+l:"';j.async=true;j.src="https://www.googletagmanager.com/gtm.js?id="+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-TBZ76RQ');
var gotag = document.createElement('iframe'); gotag.src = "https://www.googletagmanager.com/ns.html?id=GTM-TBZ76RQ"; gotag.style.height = 0; gotag.style.width = 0; gotag.style.display = 'none';
document.body.appendChild(gotag); console.log('gtag appended')
});
window.REBELMOUSE_ACTIVE_TASKS_QUEUE.push(function(){
console.log("script runs"); const subscribeForm = document.getElementById("mc-embedded-subscribe-form");
subscribeForm && subscribeForm.addEventListener("submit", (event) => { const errorTarget = document.getElementsByClassName('mce_inline_error'); const responseTarget = document.getElementsByClassName('response');
if (errorTarget.length > 0) { console.log("errors test"); for (let i = 0; i { errorTarget[i].style.display = 'none'; }, 4000); } } } if (responseTarget) { setTimeout(() => { for (let i = 0; i = 0) && (elemBottom = 0; // Partially visible elements return true: //isVisible = elemTop = 0; return isVisible; }
var lastScrollTop = 0;
document.querySelector('.email-wrapper').parentNode.classList.add('sidebar-sticky');
window.addEventListener('scroll',function(){ var st = window.pageYOffset || document.documentElement.scrollTop; if(isInViewport(latestStories, false) && st > lastScrollTop){ console.log('I see it!'); document.querySelector('.email-wrapper').parentNode.classList.add('sidebar-unfixed');
} else if(isInViewport(latestStories, false) && st 900 ? (( offsetElement.getBoundingClientRect().left-80 )): 20; var setSharePosition = Ithrottle(function() { //console.log("top:"+ stickySahreContainer.getBoundingClientRect().top+"---- bottom:"+ stickySahreContainer.getBoundingClientRect().bottom ) if(offsetElement.getBoundingClientRect().top bottomValuetoCheck) { stickyShareElement.style.position="fixed"; stickyShareElement.style.top= topValueToCheck+"px"; stickyShareElement.style.left= leftShareOffsetValue +"px";
} else if(offsetElement.getBoundingClientRect().top 768){ window.addEventListener("scroll", setSharePosition); window.addEventListener("resize" ,function(){ leftShareOffsetValue =window.innerWidth > 900 ? (( offsetElement.getBoundingClientRect().left-80 )): 20; }) } }
});