/**handles:iamyourfather-script,wphb-lazy-load,slidebars,custom-script**/ !function(n){var i=n("body"),o=n(window),e,t,a;(e=n("#primary-navigation"))&&(t=e.find(".menu-toggle"))&&((a=e.find(".nav-menu"))&&a.children().length?n(".menu-toggle").on("click.iamyourfather",function(){e.toggleClass("toggled-on")}):t.hide()),o.on("hashchange.iamyourfather",function(){var e=location.hash.substring(1),t;e&&(t=document.getElementById(e))&&(/^(?:a|select|input|button|textarea)$/i.test(t.tagName)||(t.tabIndex=-1),t.focus(),window.scrollBy(0,-80))}),n(function(){var e,t,a;n(".search-toggle").on("click.iamyourfather",function(e){var t=n(this),a=n(".search-box-wrapper");t.toggleClass("active"),a.toggleClass("hide"),!t.is(".active")&&n(".search-toggle .screen-reader-text")[0]!==e.target||a.find(".search-field").focus()}),781a&&e<49?i.addClass("masthead-fixed"):i.removeClass("masthead-fixed")}))),n(".primary-navigation, .secondary-navigation").find("a").on("focus.iamyourfather blur.iamyourfather",function(){n(this).parents().toggleClass("focus")})}),o.load(function(){n.isFunction(n.fn.masonry)&&n("#footer-sidebar").masonry({itemSelector:".widget",columnWidth:function(e){return e/4},gutterWidth:0,isResizable:!0,isRTL:n("body").is(".rtl")}),i.is(".slider")&&n(".featured-content").featuredslider({selector:".featured-content-inner > article",controlsContainer:".featured-content"})})}(jQuery); !function(){"use strict";var t={commentsFormLoading:!1,commentsLoading:!1,commentsLoadComplete:!1,commentsLoaded:0,loadOnScroll:!1,loadCommentFormOnScroll:!1,commentLoadingMethod:"click",pageCommentsOption:0,totalCommentsPages:1,commentsPageOrder:"newest",cpageNum:1,postId:0,commentNonce:"",commentsContainer:null,commentList:null,loadCommentsButton:null,loadCommentsButtonWrap:null,commentsEndIndicator:null,commentsLoadSpinnerWrap:null,ajaxurl:null,preloadComment:!1,init:function(){wphbGlobal?this.ajaxurl=wphbGlobal.ajaxurl:this.ajaxurl=ajaxurl,document.getElementById("wphb-comments-wrap")&&this.initCommentLazyLoader()},initCommentLazyLoader:function(){this.commentLoadingMethod=document.getElementById("wphb-load-comments-method").value,this.pageCommentsOption=parseInt(document.getElementById("wphb-page-comments-option").value),this.totalCommentsPages=parseInt(document.getElementById("wphb-total-comments-pages").value),this.commentsPageOrder=document.getElementById("wphb-comments-page-order").value,this.cpageNum=parseInt(document.getElementById("wphb-cpage-num").value),this.preloadComment=Boolean(wphbGlobal.preloadComment),!0===this.preloadComment&&(this.cpageNum="newest"===this.commentsPageOrder?this.cpageNum-1:this.cpageNum+1),this.postId=parseInt(document.getElementById("wphb-post-id").value),this.commentNonce=document.getElementById("comment-template-nonce").value,this.commentsContainer=document.getElementById("wphb-comments-container"),this.commentsEndIndicator=document.getElementById("wphb-comments-end-indicator"),this.commentsLoadSpinnerWrap=document.getElementById("wphb-load-comments-spinner-wrap"),"click"===this.commentLoadingMethod&&(this.loadCommentsButton=document.getElementById("wphb-load-comments"),this.loadCommentsButtonWrap=document.getElementById("wphb-load-comments-button-wrap")),!0===this.preloadComment&&(this.cpageNum<1||this.cpageNum>t.totalCommentsPages?t.finishCommentLoad():t.enableCommentLoad(),t.putCommentContent(wphbGlobal.commentForm,!1)),"click"===this.commentLoadingMethod&&(this.loadCommentsButton.addEventListener("click",(function(){return t.loadComments()})),!0!==this.preloadComment&&(this.loadCommentFormOnScroll=!0,window.addEventListener("scroll",t.handleScrollingForLoadForm),t.handleScrollingForLoadForm())),"scroll"===this.commentLoadingMethod&&(this.loadOnScroll=!0,window.addEventListener("scroll",(function(){return t.handleScrolling()})),t.handleScrolling())},enableCommentLoad:function(){this.loadCommentsButton&&this.loadCommentsButton.removeAttribute("disabled"),this.loadOnScroll=!0},disableCommentLoad:function(){this.loadCommentsButton&&this.loadCommentsButton.setAttribute("disabled","disabled"),this.loadOnScroll=!1,this.loadCommentFormOnScroll=!1},moveLoadButton:function(){this.loadCommentsButton&&this.insertAfter(this.loadCommentsButtonWrap,this.commentList)},moveCommentsEndIndicator:function(){this.insertAfter(this.commentsEndIndicator,this.commentList)},moveCommentForm:function(){var t=document.getElementById("respond");t&&this.insertBefore(t,this.commentList)},hideLoadButton:function(){this.loadCommentsButton&&(this.loadCommentsButton.style.display="none")},showCommentLoadSpinner:function(){this.commentsLoadSpinnerWrap.style.display="block"},hideCommentLoadSpinner:function(){this.commentsLoadSpinnerWrap.style.display="none"},moveCommentLoadSpinner:function(){this.insertAfter(this.commentsLoadSpinnerWrap,this.commentList)},finishCommentLoad:function(){this.commentsLoading=!1,this.disableCommentLoad(),this.hideLoadButton()},handleScrolling:function(){if(!this.loadOnScroll||!this.isInViewport(this.commentsEndIndicator))return null;this.loadComments()},handleScrollingForLoadForm:function(){if(!t.loadCommentFormOnScroll||!t.isInViewport(t.commentsEndIndicator))return null;window.removeEventListener("scroll",t.handleScrollingForLoadForm),t.loadCommentsForm()},loadCommentsForm:function(){this.commentsFormLoading=!0,this.loadComments()},loadComments:function(){if(this.commentsLoadComplete||this.commentsLoading)return!1;this.getCommentsTemplate()},getCommentsTemplate:function(){this.disableCommentLoad(),this.showCommentLoadSpinner();var e=new XMLHttpRequest;this.commentsLoading=!0,e.open("GET",t.ajaxurl+"?action=get_comments_template&id="+t.postId+"&cpage_num="+t.cpageNum+"&_nonce="+t.commentNonce),e.onload=function(){if(200===e.status){var n=JSON.parse(e.responseText);void 0!==n.data?(!0===t.commentsFormLoading?t.enableCommentLoad():(t.commentsLoaded++,t.cpageNum="newest"===t.commentsPageOrder?t.cpageNum-1:t.cpageNum+1,t.cpageNum<1||t.cpageNum>t.totalCommentsPages?t.finishCommentLoad():t.enableCommentLoad()),t.putCommentContent(n.data.content),!0===t.commentsFormLoading&&(t.commentsFormLoading=!1)):t.enableCommentLoad()}else t.enableCommentLoad();t.commentsLoading=!1,t.hideCommentLoadSpinner()},e.send()},putCommentContent:function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=this.stringToHTML(e),m=o.querySelector(".comment");if(null===m&&(m=o.querySelector(".review")),m){var i=m.parentNode;!0===t.commentsFormLoading&&(i.innerHTML=""),!0===n&&(this.commentsLoaded>1||"click"===this.commentLoadingMethod&&!1===t.commentsFormLoading)?this.commentList.innerHTML+=i.innerHTML:(this.commentsContainer.appendChild(o),this.commentList=i,this.moveCommentsEndIndicator(),this.moveCommentLoadSpinner(),this.moveLoadButton(),"scroll"===this.commentLoadingMethod&&this.moveCommentForm()),!0!==n&&t.commentsLoaded++}},stringToHTML:function(t){t="
"+t+"
";var e=function(){if(!window.DOMParser)return!1;var t=new DOMParser;try{t.parseFromString("x","text/html")}catch(t){return!1}return!0}();if(e)return(new DOMParser).parseFromString(t,"text/html").body.firstChild;var n=document.createElement("div");return n.innerHTML=t,n.firstChild},insertAfter:function(t,e){e.parentNode.insertBefore(t,e.nextSibling)},insertBefore:function(t,e){e.parentNode.insertBefore(t,e)},isInViewport:function(t){var e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)}};wphbGlobal.preloadComment?t.init():document.addEventListener("DOMContentLoaded",(function(){t.init()}))}(); //# sourceMappingURL=wphb-lazy-load.min.js.map // Slidebars 0.10.2 (http://plugins.adchsm.me/slidebars/) written by Adam Smith (http://www.adchsm.me/) released under MIT License (http://plugins.adchsm.me/slidebars/license.txt) !function(t){t.slidebars=function(s){function e(){!c.disableOver||"number"==typeof c.disableOver&&c.disableOver>=T?(y=!0,t("html").addClass("sb-init"),c.hideControlClasses&&k.removeClass("sb-hide"),i()):"number"==typeof c.disableOver&&c.disableOverb||v&&5>v)&&t("html").addClass("sb-static");var g=t("#sb-site, .sb-site-container");if(t(".sb-left").length)var m=t(".sb-left"),C=!1;if(t(".sb-right").length)var p=t(".sb-right"),w=!1;var y=!1,T=t(window).width(),k=t(".sb-toggle-left, .sb-toggle-right, .sb-open-left, .sb-open-right, .sb-close"),O=t(".sb-slide");e(),t(window).resize(function(){var s=t(window).width();T!==s&&(T=s,e(),C&&o("left"),w&&o("right"))});var x;d&&f?(x="translate",b&&4.4>b&&(x="side")):x="jQuery",this.slidebars={open:o,close:a,toggle:l,init:function(){return y},active:function(t){return"left"===t&&m?C:"right"===t&&p?w:void 0},destroy:function(t){"left"===t&&m&&(C&&a(),setTimeout(function(){m.remove(),m=!1},400)),"right"===t&&p&&(w&&a(),setTimeout(function(){p.remove(),p=!1},400))}},t(".sb-toggle-left").on("touchend click",function(s){r(s,t(this)),l("left")}),t(".sb-toggle-right").on("touchend click",function(s){r(s,t(this)),l("right")}),t(".sb-open-left").on("touchend click",function(s){r(s,t(this)),o("left")}),t(".sb-open-right").on("touchend click",function(s){r(s,t(this)),o("right")}),t(".sb-close").on("touchend click",function(s){if(t(this).is("a")||t(this).children().is("a")){if("click"===s.type){s.preventDefault();var e=t(this).is("a")?t(this).attr("href"):t(this).find("a").attr("href");a(e)}}else r(s,t(this)),a()}),g.on("touchend click",function(s){c.siteClose&&(C||w)&&(r(s,t(this)),a())})}}(jQuery); !function(p){var e={topSpacing:0,bottomSpacing:0,className:"is-sticky",wrapperClassName:"sticky-wrapper",center:!1,getWidthFrom:""},l=p(window),d=p(document),h=[],m=l.height(),t=function(){for(var t=l.scrollTop(),e=d.height(),i=e-m,n=i").attr("id",e+"-sticky-wrapper").addClass(i.wrapperClassName);t.wrapAll(e);var e=t.parent();e.css("height",t.outerHeight()),h.push({topSpacing:i.topSpacing,bottomSpacing:i.bottomSpacing,stickyElement:t,currentTop:null,stickyWrapper:e,className:i.className,getWidthFrom:i.getWidthFrom})})},update:t};window.addEventListener?(window.addEventListener("scroll",t,!1),window.addEventListener("resize",i,!1)):window.attachEvent&&(window.attachEvent("onscroll",t),window.attachEvent("onresize",i)),p.fn.sticky=function(t){return n[t]?n[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void p.error("Method "+t+" does not exist on jQuery.sticky"):n.init.apply(this,arguments)},p(function(){setTimeout(t,0)})}(jQuery);