!function(o,i,e){var a="astExtSticky",d=i.document,r=(jQuery(i).outerWidth(),jQuery(i).width()),s={dependent:[],max_width:"",site_layout:"",break_point:920,admin_bar_height_lg:32,admin_bar_height_sm:46,admin_bar_height_xs:0,stick_upto_scroll:0,gutter:0,wrap:"
",body_padding_support:!0,html_padding_support:!0,shrink:{padding_top:"",padding_bottom:""},sticky_on_device:"desktop",header_style:"none",hide_on_scroll:"no"},n=0;function t(e,t){this.element=e,this.options=o.extend({},s,t),this._defaults=s,this._name=a,"1"==this.options.hide_on_scroll&&(this.navbarHeight=o(e).outerHeight()),this.lastScrollTop=0,this.delta=5,this.should_stick=!0,this.hideScrollInterval="",this.init()}t.prototype.stick_me=function(e,t){var a=jQuery(e.element);jQuery(i).outerWidth();if(stick_upto_scroll=parseInt(e.options.stick_upto_scroll),max_width=parseInt(a.parent().attr("data-stick-maxwidth")),gutter=parseInt(a.parent().attr("data-stick-gutter")),"desktop"==e.options.sticky_on_device&&jQuery("body").hasClass("ast-header-break-point"))e.stickRelease(e);else if("mobile"!=e.options.sticky_on_device||jQuery("body").hasClass("ast-header-break-point"))if(jQuery(i).scrollTop()>stick_upto_scroll){var s=a;"1"===e.options.hide_on_scroll?e.hasScrolled(e,"stick"):"none"==e.options.header_style?(a.parent().css("min-height",a.outerHeight()),a.addClass("ast-sticky-active").stop().css({"max-width":max_width,top:gutter,"padding-top":e.options.shrink.padding_top,"padding-bottom":e.options.shrink.padding_bottom}),a.addClass("ast-sticky-shrunk").stop(),o(d).trigger("addStickyClass"),s.addClass("ast-header-sticked")):"slide"==e.options.header_style?(s.css({top:gutter}),s.addClass("ast-header-slide"),s.css("visibility","visible"),s.addClass("ast-sticky-active").stop().css({transform:"translateY(0)"}),o("html").addClass("ast-header-stick-slide-active"),o(d).trigger("addStickyClass"),s.addClass("ast-header-sticked")):"fade"==e.options.header_style&&(s.css({top:gutter}),s.addClass("ast-header-fade"),s.css("visibility","visible"),s.addClass("ast-sticky-active").stop().css({opacity:"1"}),o("html").addClass("ast-header-stick-fade-active"),o(d).trigger("addStickyClass"),s.addClass("ast-header-sticked"))}else e.stickRelease(e);else e.stickRelease(e)},t.prototype.update_attrs=function(){var e=this,t=jQuery(e.element),a=parseInt(e.options.gutter),s=e.options.max_width;if("none"!=e.options.header_style||jQuery("body").hasClass("ast-sticky-toggled-off")){if(o("#masthead").length){var i=o("#masthead");d=i.offset().top+i.outerHeight()+100||0}}else var d=t.offset().top||0;"ast-box-layout"!=e.options.site_layout&&(s=jQuery("body").width()),e.options.dependent&&jQuery.each(e.options.dependent,function(e,t){jQuery(t).length&&"on"==jQuery(t).parent().attr("data-stick-support")&&(dependent_height=jQuery(t).outerHeight(),a+=parseInt(dependent_height),d-=parseInt(dependent_height))}),e.options.admin_bar_height_lg&&jQuery("#wpadminbar").length&&782";else if(""!=x)S="";o("head").append(S)}if(p||_||m){switch(o(d).on("addStickyClass",function(){var e="";"1"!=p&&"on"!=p||(e+=" ast-primary-sticky-header-active"),"1"!=_&&"on"!=_||(e+=" ast-above-sticky-header-active"),"1"!=m&&"on"!=m||(e+=" ast-below-sticky-header-active"),o("body").addClass(e)}),o(d).on("removeStickyClass",function(){var e="";"1"!=p&&"on"!=p||(e+=" ast-primary-sticky-header-active"),"1"!=_&&"on"!=_||(e+=" ast-above-sticky-header-active"),"1"!=m&&"on"!=m||(e+=" ast-below-sticky-header-active"),o("body").removeClass(e)}),v){case"ast-box-layout":l=parseInt(b)}jQuery(d).ready(function(e){if("1"==j)"1"==y&&jQuery("#ast-fixed-header").addClass("ast-sticky-shrunk").stop(),"1"!=_&&"on"!=_&&jQuery("#ast-fixed-header .ast-above-header").hide(),"1"!=p&&"on"!=p&&jQuery("#ast-fixed-header .main-header-bar").hide(),"1"!=m&&"on"!=m&&jQuery("#ast-fixed-header .ast-below-header").hide(),jQuery("#ast-fixed-header").astExtSticky({max_width:l,site_layout:v,sticky_on_device:f,header_style:"slide",hide_on_scroll:j});else if("none"==w)if("1"!=_&&"on"!=_||jQuery("#masthead .ast-above-header").astExtSticky({max_width:l,site_layout:v,sticky_on_device:f,header_style:w,hide_on_scroll:j}),"1"!=p&&"on"!=p||"1"!=m&&"on"!=m){if("1"==p||"on"==p){var t="";y&&(t={padding_top:"",padding_bottom:""}),jQuery("#masthead .main-header-bar").astExtSticky({dependent:["#masthead .ast-above-header"],max_width:l,site_layout:v,shrink:t,sticky_on_device:f,header_style:w,hide_on_scroll:j}),jQuery("#masthead .ast-custom-header").astExtSticky({max_width:l,site_layout:v,shrink:t,sticky_on_device:f,header_style:w,hide_on_scroll:j})}"1"!=m&&"on"!=m||jQuery("body").hasClass("ast-header-break-point")||jQuery("#masthead .ast-below-header").astExtSticky({dependent:["#masthead .main-header-bar","#masthead .ast-above-header"],max_width:l,site_layout:v,sticky_on_device:f,header_style:w,hide_on_scroll:j})}else jQuery("#masthead .main-header-bar-wrap").wrap(''),jQuery("#masthead .ast-below-header-wrap").prependTo(".ast-stick-primary-below-wrapper"),jQuery("#masthead .main-header-bar-wrap").prependTo(".ast-stick-primary-below-wrapper"),jQuery("#masthead .ast-stick-primary-below-wrapper").astExtSticky({dependent:["#masthead .ast-above-header"],max_width:l,site_layout:v,shrink:t,sticky_on_device:f,header_style:w,hide_on_scroll:j});else if(jQuery("#ast-fixed-header").addClass("ast-sticky-shrunk").stop(),"1"!=_&&"on"!=_&&jQuery("#ast-fixed-header .ast-above-header").hide(),"1"!=p&&"on"!=p&&jQuery("#ast-fixed-header .main-header-bar").hide(),"1"!=m&&"on"!=m&&jQuery("#ast-fixed-header .ast-below-header").hide(),"1"==_||"on"==_||"1"==p||"on"==p||"1"==m||"on"==m){t="";y&&(t={padding_top:"",padding_bottom:""}),jQuery("#ast-fixed-header").astExtSticky({max_width:l,site_layout:v,shrink:t,sticky_on_device:f,header_style:w,hide_on_scroll:j})}"mobile"!=f&&"both"!=f||(jQuery("#masthead .main-header-menu-toggle").click(function(e){if(jQuery("#masthead .main-header-menu-toggle").hasClass("toggled")){if(h.addClass("ast-sticky-toggled-off"),"none"==s.header_style&&(jQuery("#masthead .main-header-bar").hasClass("ast-sticky-active")||jQuery("#masthead .ast-stick-primary-below-wrapper").hasClass("ast-sticky-active"))){var t=jQuery(i).height(),a=0;jQuery("#masthead .ast-above-header")&&jQuery("#masthead .ast-above-header").length&&(a=jQuery("#masthead .ast-above-header").height()),"1"==j&&jQuery("html").css({overflow:"hidden"}),"1"!=y||"1"!=p&&"on"!=p||"1"!=m&&"on"!=m?jQuery("#masthead .main-header-bar.ast-sticky-active").css({"max-height":t-a+"px","overflow-y":"auto"}):jQuery("#masthead .ast-stick-primary-below-wrapper").css({"max-height":t-a+"px","overflow-y":"auto"})}}else h.addClass("ast-sticky-toggled-off"),jQuery("html").css({overflow:""}),"1"!=y||"1"!=p&&"on"!=p||"1"!=m&&"on"!=m?jQuery("#masthead .main-header-bar.ast-sticky-active").css({"max-height":"","overflow-y":""}):jQuery("#masthead .ast-stick-primary-below-wrapper").css({"max-height":"","overflow-y":""})}),jQuery("#ast-fixed-header .main-header-menu-toggle").click(function(e){if(jQuery("#ast-fixed-header .main-header-menu-toggle").hasClass("toggled")){var t=jQuery(i).height();"1"==j&&jQuery("html").css({overflow:"hidden"}),jQuery("#ast-fixed-header").css({"max-height":t+"px","overflow-y":"auto"})}else jQuery("html").css({overflow:""}),jQuery("#ast-fixed-header").css({"max-height":"","overflow-y":""})}))})}}}(jQuery,window);