jQuery(document).ready(function(){var prevScrollpos=window.pageYOffset;var headerDiv=document.querySelector("header#masthead");var headerBottom=headerDiv.offsetTop+headerDiv.offsetHeight;window.onscroll=function(){var currentScrollPos=window.pageYOffset;if (prevScrollpos>currentScrollPos || currentScrollPos < headerBottom){headerDiv.style.top="0"}else{headerDiv.style.top="-23.2rem"}prevScrollpos=currentScrollPos}});