!function(e){"use strict";function a(e,a,t){e[0].classList?"add"==a?e[0].classList.add(t):e[0].classList.remove(t):"add"==a?e.addClass(t):e.removeClass(t)}e((function(){!function(){var t=e(window),n=e(".html_header_top.html_header_sticky #header"),i=e(".av_header_unstick_top");if(!n.length&&!i.length)return;var r=e("#header_main .container .logo img, #header_main .container .logo svg, #header_main .container .logo a"),o=e("#header_main .container:not(#header_main_alternate>.container), #header_main .main_menu ul:first-child > li > a:not(.avia_mega_div a, #header_main_alternate a), #header_main #menu-item-shop .cart_dropdown_link"),d=e(o).first().height(),s=e.avia_utilities.isMobile,h=(e("#scroll-top-link"),n.is(".av_header_transparency")),l=n.is(".av_header_shrinking"),_=n.data("av_shrink_factor"),c=d/2,m=d/2,g=n.find("#header_meta"),u=g.length?g.outerHeight():0,v=n.find("#header_main_alternate"),f=v.length?v.outerHeight():0,p=function(){var _=t.scrollTop(),g=0,v=_;if(i&&(_-=u),_<0&&(_=0),l&&!s){_<c?(g=d-_,_<=0&&(g=d),a(n,"remove","header-scrolled")):(g=m,a(n,"add","header-scrolled")),a(n,_-30<d?"remove":"add","header-scrolled-full"),o.css({height:g+"px",lineHeight:g+"px"}),r.css({maxHeight:g+"px"});let t=g+f;n.length&&(i.length?_<=u&&(t=t+u-v):t+=u),e(":root")[0].style.setProperty("--enfold-header-height",Math.round(t)+"px")}i.length&&(_<=0?(v<=0&&(v=0),i.css({"margin-top":"-"+v+"px"})):i.css({"margin-top":"-"+u+"px"})),h&&a(n,_>50?"remove":"add","av_header_transparency")};if(void 0!==_){const e=parseInt(_);isNaN(e)||(m=d-(c=d*(e/100)))}e("body").is(".avia_deactivate_menu_resize")&&(l=!1);if(!h&&!l&&!i.length)return;t.on("debouncedresize",(function(){d=e(o).attr("style","").first().height(),p()})),t.on("scroll",(function(){window.requestAnimationFrame(p)})),p()}()}))}(jQuery);