/* wc-header-scroll: transparent topbar at rest, blurred once the page is scrolled */ (function () { var THRESHOLD = 8; function update() { var bar = document.querySelector('.wc-fixed-topbar'); if (!bar) return; var y = window.pageYOffset || document.documentElement.scrollTop || 0; bar.classList.toggle('wc-scrolled', y > THRESHOLD); } window.addEventListener('scroll', update, { passive: true }); window.addEventListener('resize', update, { passive: true }); window.addEventListener('load', update); document.addEventListener('DOMContentLoaded', update); var n = 0, iv = setInterval(function () { update(); if (++n > 60) clearInterval(iv); }, 200); update(); })();