/**handles:iamyourfather-script,wphb-lazy-load,akismet-frontend**/ !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()}),781<o.width()&&(48<(e=n("#masthead").height())&&i.removeClass("masthead-fixed"),i.is(".header-image")&&(t=i.is(".admin-bar")?n("#wpadminbar").height():0,a=n("#masthead").offset().top-t,o.on("scroll.iamyourfather",function(){o.scrollTop()>a&&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="<div>"+t+"</div>";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 !function(){var M=!1;try{var e=Object.defineProperty({},"passive",{get:function(){M=!0}});window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch(e){}function t(){for(var c="",a={},s=null,i=null,m=[],h=[],f=[],o=null,u=null,p=[],l=null,r=null,d=null,v=null,g=[],t=null,w=0,b=null,k=null,E=[],n=null,y=0,L=["Backspace","Delete","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown"],T=["Shift","CapsLock"],e=document.querySelectorAll("form[method=post]"),A=0;A<e.length;A++){var D=e[A],x=D.getAttribute("action");x&&(0==x.indexOf("http://")||0==x.indexOf("https://"))&&0!=x.indexOf("http://"+window.location.hostname+"/")&&0!=x.indexOf("https://"+window.location.hostname+"/")||(D.addEventListener("submit",function(){var e=O(m),t=O(p),n=O(E),i=O(g),a={bib:c,bfs:Date.now(),bkpc:m.length,bkp:e,bmc:t,bmcc:p.length,bmk:h.join(";"),bck:f.join(";"),bmmc:g.length,btmc:w,bsc:y,bte:n,btec:E.length,bmm:i},s="ak_",o;if(this.getElementsByClassName)for(var u=this.getElementsByClassName("akismet-fields-container"),l=0;l<u.length;l++){var r=u.item(l);if(r.getAttribute("data-prefix")){s=r.getAttribute("data-prefix");break}}for(o in a){var d=document.createElement("input");d.setAttribute("type","hidden"),d.setAttribute("name",s+o),d.setAttribute("value",a[o]),this.appendChild(d)}},!!M&&{passive:!0}),D.addEventListener("keydown",function(e){var t,n;e.key in a||(t=(new Date).getTime(),a[e.key]=[t],c=c||t,(n=Math.max(i,s))&&a[e.key].push(t-n),i=t)},!!M&&{passive:!0}),D.addEventListener("keyup",function(e){var t,n,i;e.key in a&&(t=(new Date).getTime(),"TEXTAREA"!==e.target.nodeName&&"INPUT"!==e.target.nodeName||(-1!==T.indexOf(e.key)?h.push(m.length-1):-1!==L.indexOf(e.key)?f.push(m.length-1):(n=a[e.key][0],(i=[]).push(t-n),1<a[e.key].length&&i.push(a[e.key][1]),m.push(i))),delete a[e.key],s=t)},!!M&&{passive:!0}),D.addEventListener("focusin",function(e){s=i=null,a={}},!!M&&{passive:!0}),D.addEventListener("focusout",function(e){s=i=null,a={}},!!M&&{passive:!0}))}document.addEventListener("mousedown",function(e){u=(new Date).getTime()},!!M&&{passive:!0}),document.addEventListener("mouseup",function(e){var t,n;u&&(t=(new Date).getTime(),(n=[]).push(t-u),o&&n.push(u-o),p.push(n),o=t,s=i=null,a={})},!!M&&{passive:!0}),document.addEventListener("mousemove",function(e){l?(clearTimeout(l),l=null):(v=(new Date).getTime(),r=e.offsetX,d=e.offsetY),l=setTimeout(function(e,t){var n=(new Date).getTime()-500,i=[];i.push(n-t),i.push(Math.round(Math.sqrt(Math.pow(e.offsetX-r,2)+Math.pow(e.offsetY-d,2)))),0<i[1]&&g.push(i),l=v=null},500,e,v)},!!M&&{passive:!0}),document.addEventListener("touchmove",function(e){t&&clearTimeout(t),t=setTimeout(function(){w++},500)},!!M&&{passive:!0}),document.addEventListener("touchstart",function(e){k=(new Date).getTime()},!!M&&{passive:!0}),document.addEventListener("touchend",function(e){var t,n;k&&(t=(new Date).getTime(),(n=[]).push(t-k),b&&n.push(k-b),E.push(n),b=t,s=i=null,a={})},!!M&&{passive:!0}),document.addEventListener("scroll",function(e){n&&clearTimeout(n),n=setTimeout(function(){y++},500)},!!M&&{passive:!0})}function O(e,t){t=t||100;var n="";if(0<e.length)for(var i=Math.max(0,Math.floor(Math.random()*e.length-t)),a=0;a<t&&a<e.length;a++)n+=e[i+a][0],2<=e[i+a].length&&(n+=","+e[i+a][1]),n+=";";return n}"loading"!==document.readyState?t():document.addEventListener("DOMContentLoaded",t)}();