var elements=document.getElementsByTagName("script");Array.prototype.forEach.call(elements,function(e){if(-1!==e.type.indexOf("math/tex")){var t=e.innerText||e.textContent;t=t.replace(/%.*/g,"");var n=document.createElement("span");-1!==e.type.indexOf("mode=display")?(n.className+="math-display",t="\\displaystyle {"+t+"}"):n.className+="math-inline",katex.render(t,n,{displayMode:!1}),e.parentNode.insertBefore(n,e)}});try{var elem=document.querySelector(".grid"),msnry=new Masonry(elem,{itemSelector:".grid-item",columnWidth:".grid-sizer",gutter:".gutter-sizer",percentPosition:!0}),imgLoad=imagesLoaded(elem);imgLoad.on("progress",function(e,t){msnry.layout()})}catch(e){if(!(e instanceof ReferenceError))throw e}document.addEventListener("DOMContentLoaded",function(e){var t=document.getElementById("pull"),n=document.querySelector("nav ul");["click","touch"].forEach(function(e){t.addEventListener(e,function(e){n.classList.toggle("hide")},!1)}),window.addEventListener("scroll",function(){var e=window.pageYOffset||document.body.scrollTop;document.getElementById("main").style.backgroundPosition="100% "+parseInt(-e/3)+"px, 0%, center top"})});