(function(){document.addEventListener("DOMContentLoaded",function(){function n(){console.log("resetHeader");var i=$(".alert-wrapper").height(),n=$("header.main-header").outerHeight();$(".alert-wrapper").css("display","none");$(".alert-wrapper").css("height","0");$("header.main-header").css("top","0");$("section:nth-of-type(1)").css("margin-top","");t.is(":visible")&&t.css("top",n)}var t=$(".mobile-drop-nav"),i,r,u,f;$(".alert-wrapper").css("display")!="none"?(i=$(".alert-wrapper").height(),$("header.main-header").css("top",i)):$("header.main-header").css("top","0");$(".fcs_ada-close").on("click keydown",function(t){t.stopPropagation();(t.which==13||t.type=="click")&&(n(),$(window).trigger("thirdPartyClosed"),$(".main-nav ul li").css("background-position-y","bottom"))});$(".main-header").on("headerScrolled",function(){n()});$(".main-header").on("headerPushed",function(){n()});if(r=$(".desktop-nutrition-nav"),r.length){u=$(".apply-btn");f=$(".filters-nutrition");u.on("keydown",function(n){n.key==="Enter"&&f.focus()})}})})()