text: (function(glob){glob.helpers={fadeOut:function(el,r){if(!r)el.style.opacity=1;el.style.opacity-=.03;var d=function(){this.fadeOut(el,true)}.bind(this);if(el.style.opacity<0){el.style.display="none"}else{requestAnimationFrame(d)}},fadeIn:function(el,r){el.style.opacity+=.3;var d=function(){this.fadeIn(el,true)}.bind(this);if(el.style.opacity>=1){cancelAnimationFrame(d)}else{requestAnimationFrame(d)}}}})(window);var HeaderNavigation=function(element){"use strict";var doc=document;var defaultSection=doc.querySelector(".posts-list");var headerNavigation={start:function(){this._el=document.querySelector(element);if(!this._el)return false;this._activeSection=defaultSection;this._activeItem=doc.querySelector('[data-link="posts-list"]');this.toggleActive(this._activeItem);this._el.addEventListener("click",this.clickHandler.bind(this))},clickHandler:function(e){if(window.location.pathname!=="/")return window.location="/";var target=e?e.target:window.event.srcElement,action="";e.preventDefault();if(target.nodeName.toLowerCase()==="a"){action=target.attributes["data-link"].value;this.navigateTo(action);this.toggleActive(target)}},toggleActive:function(item){this._activeItem.classList.remove("is-selected");item.classList.add("is-selected");this._activeItem=item},navigateTo:function(action){this._activeSection.style.display="none";this._activeSection=doc.querySelector("."+action);this._activeSection.style.display="block"}};return headerNavigation};window.HeaderNavigation=HeaderNavigation;var ScrollTop=function(){"use strict";var doc=document;var ScrollToTop={start:function(el){this._el=doc.getElementById(el);if(!this._el)return false;this._elOffset=this._el.offsetTop+this._el.offsetHeight;this._el.addEventListener("click",this.scrollToTop.bind(this));window.addEventListener("scroll",this.toggleFixed.bind(this))},scrollToTop:function(e){this._frameID=requestAnimationFrame(this.scrollToTop.bind(this));var scrollTop=document.documentElement.scrollTop||document.body.scrollTop;var rate=scrollTop/100*10;if(scrollTop>0){var el=doc.documentElement.scrollTop===0?doc.body:doc.documentElement;el.scrollTop=scrollTop-rate}else{cancelAnimationFrame(this._frameID)}},toggleFixed:function(e){var height=Math.max(document.documentElement.clientHeight,window.innerHeight||0);var toTop=(window.pageYOffset||document.scrollTop)-(document.clientTop||0);if(toTop>this._elOffset){this._el.classList.remove("is-hidden");this._el.classList.add("is-visible")}else{this._el.classList.remove("is-visible");this._el.classList.add("is-hidden")}}};return ScrollToTop};window.ScrollTop=ScrollTop;(function(win){function Blog(){}Blog.prototype.initialize=function(){var headerNav=new HeaderNavigation("#header-nav").start();var scrollTop=(new ScrollTop).start("c-scrollTop")};console.log("Hi!");var blog=new Blog;blog.initialize()})(window);