XylotrechusZ
!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.find("#header_meta"),_=c.length?c.outerHeight():0,m=function(){var e=i.scrollTop(),c=0,m=e;r&&(e-=_),e<0&&(e=0),h&&!d&&(e<s/2?(c=s-e,e<=0&&(c=s),a(n,"remove","header-scrolled")):(c=s/2,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?(m<=0&&(m=0),r.css({"margin-top":"-"+m+"px"})):r.css({"margin-top":"-"+_+"px"})),l&&a(n,e>50?"remove":"add","av_header_transparency")};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(),m()}),i.on("scroll",function(){window.requestAnimationFrame(m)}),m()}()})}(jQuery);