!function(s){"use strict";var e=s(window),t=s(document),i=s("#masthead.site-header"),d=s("#content"),o=(s("body"),s("#wpadminbar"),i.find(".site-header-main")),a={},h=s("#page"),r=i.attr("data-sticky-status"),n=s("#sticky-site-header"),c=!1,y=i.hasClass("site-header-layout-default")&&i.hasClass("overlap-header"),l=n.length||o.length,o=o.length?o:i;n.length?c=!0:n=i,a={init:function(){var a;i.length&&d.length&&l&&((a=this).maybeStickySiteHeader(cozystayParseInt(e.scrollTop()),!1),e.one("load",function(){a.maybeStickySiteHeader(cozystayParseInt(e.scrollTop()),!1),t.on("scrolling.cozystay.window",function(s,e){e&&a.maybeStickySiteHeader(cozystayParseInt(e.top),e.goUp)}).on("resize.cozystay.window",function(s,e){e&&(i.removeAttr("data-sticky-threhhold"),a.maybeStickySiteHeader(cozystayParseInt(e.top),e.goUp))})}))},getStickyThreshold:function(){if(i.hasClass("hide"))return 0;if(i.data("sticky-threhhold"))return i.data("sticky-threhhold");var s=parseInt(i.outerHeight(!0,!0),10)+cozystayParseInt(h.offset().top);return i.data("sticky-threhhold",s),s},maybeStickySiteHeader:function(s,e){var a,t;"disable"!=r&&(a=this.getStickyThreshold(),t=o.outerHeight(!0,!0),"always-enable"==r?!n.hasClass("sticky")&&a<=s?(n.addClass("sticky"),c?(t="",n.removeClass("hide")):y&&(t=""),d.css("padding-top",t)):n.hasClass("sticky")&&s