!function(h){"use strict";etTheme.autoinit.fixedHeader=etTheme.fixedHeader=function(){let o=h("#header");if(o.hasClass("sticky")){switch(h(o).data("type")){case"smart":{var i=o;let e=0,s=h(i).outerHeight();h(window).on("scroll",function(){var t;h("html").hasClass("et-mini-content-opened")||((t=h(this).scrollTop())<e&&t>s?h(i).css("height",s).addClass("sticky-on"):h(i).attr("style","").removeClass("sticky-on"),e=t)})}break;case"custom":{var s=o;let t=h(s).data("start"),e=h(s).outerHeight();h(window).on("scroll",function(){h("html").hasClass("et-mini-content-opened")||(h(this).scrollTop()>t?h(s).css("height",e).addClass("sticky-on"):h(s).attr("style","").removeClass("sticky-on"))})}break;default:var t=o,n=[];h(t).find(".sticky").each(function(){n.push({top:h(this).offset().top,top_offset:0,height:h(this).outerHeight()})});for(let t=0;t<=n.length-1;t++)n[t+1]&&(n[t+1].top_offset=n[t].height,n[t-1]&&(n[t+1].top_offset+=n[t-1].height),n[t+1].top=n[t+1].top-n[t].height,n[t-1])&&(n[t+1].top-=n[t-1].height);var a=h(t).outerHeight(),l=0;h("body").hasClass("bordered")&&1200<etTheme.et_global.w_width&&(l=20),h(window).on("scroll",function(){if(!h("html").hasClass("et-mini-content-opened")){var o=0;let s=h(this).scrollTop();h(t).find(".sticky").each(function(){a=h(this).outerHeight();var t=n[o].top_offset+l,e=n[o].top-l;s>e?(h(this).css({height:a}).addClass("sticky-on"),h(this).find("> div").css({top:t})):(h(this).find("> div").css({top:"auto"}),h(this).attr("style","").removeClass("sticky-on")),o++})}})}h(window).on("orientationchange",function(){h(o).find(".sticky").attr("style",null).removeClass("sticky-on").find("> div").attr("style",null),h(o).removeClass("sticky-on").attr("style",null),h(window).off("scroll"),setTimeout(function(){etTheme.fixedHeader(),h(window).trigger("scroll")},300)})}}}(jQuery);