!function(e){"use strict";function a(e,a,i){e[0].classList?"add"==a?e[0].classList.add(i):e[0].classList.remove(i):"add"==a?e.addClass(i):e.removeClass(i)}e((function(){!function(){var i=e(window),n=e(".html_header_top.html_header_sticky #header"),r=e(".av_header_unstick_top");if(!n.length&&!r.length)return;var t=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"),s=e(o).first().height(),d=e.avia_utilities.isMobile,l=(e("#scroll-top-link"),n.is(".av_header_transparency")),h=n.is(".av_header_shrinking"),c=n.data("av_shrink_factor"),_=s/2,m=s/2,u=n.find("#header_meta"),g=u.length?u.outerHeight():0,v=function(){var e=i.scrollTop(),c=0,u=e;r&&(e-=g),e<0&&(e=0),h&&!d&&(e<_?(c=s-e,e<=0&&(c=s),a(n,"remove","header-scrolled")):(c=m,a(n,"add","header-scrolled")),a(n,e-30<s?"remove":"add","header-scrolled-full"),o.css({height:c+"px",lineHeight:c+"px"}),t.css({maxHeight:c+"px"})),r.length&&(e<=0?(u<=0&&(u=0),r.css({"margin-top":"-"+u+"px"})):r.css({"margin-top":"-"+g+"px"})),l&&a(n,e>50?"remove":"add","av_header_transparency")};if(void 0!==c){const e=parseInt(c);isNaN(e)||(m=s-(_=s*(e/100)))}e("body").is(".avia_deactivate_menu_resize")&&(h=!1);if(!l&&!h&&!r.length)return;i.on("debouncedresize",(function(){s=e(o).attr("style","").first().height(),v()})),i.on("scroll",(function(){window.requestAnimationFrame(v)})),v()}()}))}(jQuery);