!function(i){"use strict";function t(){this.$openBtn=i("#sidebar, #header").find("a[href*='#about']"),this.$closeBtn=i("#about-btn-close"),this.$blog=i("#blog"),this.$about=i("#about"),this.$aboutCard=i("#about-card")}t.prototype={run:function(){var s=this;s.$openBtn.click(function(t){t.preventDefault(),s.play()}),s.$closeBtn.click(function(t){t.preventDefault(),s.playBack()})},play:function(){var t=this;t.$blog.fadeOut(),t.$about.fadeIn(),setTimeout(function(){t.dropAboutCard()},300)},playBack:function(){var t=this;t.liftAboutCard(),setTimeout(function(){t.$blog.fadeIn()},500),setTimeout(function(){t.$about.fadeOut()},500)},dropAboutCard:function(){var t=this,s=t.$aboutCard.innerHeight(),e=i(window).height()/2-s/2+s;s+30>i(window).height()&&(e=s),t.$aboutCard.css("top","0px").css("top","-"+s+"px").show(500,function(){t.$aboutCard.animate({top:"+="+e+"px"})})},liftAboutCard:function(){var t=this,s=t.$aboutCard.innerHeight(),e=i(window).height()/2-s/2+s;s+30>i(window).height()&&(e=s),t.$aboutCard.animate({top:"-="+e+"px"},500,function(){t.$aboutCard.hide(),t.$aboutCard.removeAttr("style")})}},i(document).ready(function(){(new t).run()})}(jQuery),function(s){"use strict";function t(t){this.$form=s(t).find("#filter-form"),this.$searchInput=s(t).find("input[name=date]"),this.$archiveResult=s(t).find(".archive-result"),this.$postsYear=s(t).find(".archive-year"),this.$postsMonth=s(t).find(".archive-month"),this.$postsDay=s(t).find(".archive-day"),this.postsYear=t+" .archive-year",this.postsMonth=t+" .archive-month",this.postsDay=t+" .archive-day",this.messages={zero:this.$archiveResult.data("message-zero"),one:this.$archiveResult.data("message-one"),other:this.$archiveResult.data("message-other")}}t.prototype={run:function(){var t=this;t.$searchInput.keyup(function(){t.filter(t.sliceDate(t.getSearch()))}),t.$form.submit(function(t){t.preventDefault()})},getSearch:function(){return this.$searchInput.val().replace(/([\/|.|-])/g,"").toLowerCase()},sliceDate:function(t){return[t.slice(0,4),t.slice(4,6),t.slice(6)]},filter:function(t){var s;""===t[0]?(this.showAll(),this.showResult(-1)):(s=this.countPosts(t),this.hideAll(),this.showResult(s),0 .archive-posts > .archive-post").hide()})}),o(s).show(),o(i).show(),o(i+" > .archive-posts > .archive-post").show()},showAll:function(){this.$categories.show(),this.$posts.show(),o(this.posts+" > .archive-posts > .archive-post").show()},hideAll:function(){this.$categories.hide(),this.$posts.hide()}},o(document).ready(function(){o("#categories-archives").length&&new t("#categories-archives").run()})}(jQuery),function(o){"use strict";function t(t){this.$codeBlocks=o(t)}t.prototype={run:function(){var t=this;t.resize(),o(window).smartresize(function(){t.resize()})},resize:function(){this.$codeBlocks.each(function(){var t=o(this).find(".gutter"),s=o(this).find(".code"),e=s.width()-s.innerWidth(),i=o(this).outerWidth()-t.outerWidth()+e;s.css("width",i),s.children("pre").css("width",i)})}},o(document).ready(function(){o.fn.hasHorizontalScrollBar=function(){return this.get(0).scrollWidth>this.innerWidth()},new t("figure.highlight").run()})}(jQuery),function(e){"use strict";e(document).ready(function(){function t(){var t=!0,s=null;480 span, .fancybox-prev > span").css("visibility","visible")},400)}})}t(),e(window).smartresize(function(){t()})})}(jQuery),function(e){"use strict";function t(){this.$header=e("#header"),this.headerHeight=this.$header.height(),this.headerUpCSSClass="header-up",this.delta=5,this.lastScrollTop=0}t.prototype={run:function(){var t,s=this;e(window).scroll(function(){t=!0}),setInterval(function(){t&&(s.animate(),t=!1)},250)},animate:function(){var t=e(window).scrollTop();Math.abs(this.lastScrollTop-t)<=this.delta||(t>this.lastScrollTop&&t>this.headerHeight?this.$header.addClass(this.headerUpCSSClass):t+e(window).height()t&&(s+this.$postFooter.height()>t+e(window).height()||s',t.thumbnailImageUrl&&(e+='
',e+='',e+='',e+="",e+="
"),e+='
',e+='',e+='

'+t.title+"

",e+="
",e+='',e+='',e+=moment(t.date).locale(s).format("ll"),e+="",e+="",e+='
'+t.excerpt+"
",e+="
",e+='
',e+="
",e+=""}),this.$results.html(e)},showSearchModal:function(){this.$searchModal.fadeIn()},hideSearchModal:function(){this.$searchModal.fadeOut()},showResultsCount:function(t){var s="";t<1?(s=this.$resultsCount.data("message-zero"),this.$noResults.show()):1===t?(s=this.$resultsCount.data("message-one"),this.$noResults.hide()):1'),t(".overlay").fadeIn(),t("body").css("overflow","hidden")},hideOverlay:function(){t(".overlay").fadeOut(function(){t(this).remove(),t("body").css("overflow","auto")})}},t(document).ready(function(){"undefined"!=typeof algoliaIndex&&(new s).run()})}(jQuery),function(t){"use strict";function s(){this.$shareOptionsBar=t("#share-options-bar"),this.$openBtn=t(".btn-open-shareoptions"),this.$closeBtn=t("#btn-close-shareoptions"),this.$body=t("body")}s.prototype={run:function(){var t=this;t.$openBtn.click(function(){t.$shareOptionsBar.hasClass("opened")||(t.openShareOptions(),t.$closeBtn.show())}),t.$closeBtn.click(function(){t.$shareOptionsBar.hasClass("opened")&&(t.closeShareOptions(),t.$closeBtn.hide())})},openShareOptions:function(){var t=this;t.$shareOptionsBar.hasClass("opened")||this.$shareOptionsBar.hasClass("processing")||(t.$shareOptionsBar.addClass("processing opened"),t.$body.css("overflow","hidden"),setTimeout(function(){t.$shareOptionsBar.removeClass("processing")},250))},closeShareOptions:function(){var t=this;t.$shareOptionsBar.hasClass("opened")&&!this.$shareOptionsBar.hasClass("processing")&&(t.$shareOptionsBar.addClass("processing").removeClass("opened"),setTimeout(function(){t.$shareOptionsBar.removeClass("processing"),t.$body.css("overflow","")},250))}},t(document).ready(function(){(new s).run()})}(jQuery),function(s){"use strict";function t(){this.$sidebar=s("#sidebar"),this.$openBtn=s("#btn-open-sidebar"),this.$closeBtn=s("#header, #main, .post-header-cover"),this.$blog=s(".post-bottom-bar, #header, #main, .post-header-cover"),this.$body=s("body"),this.mediumScreenWidth=768}t.prototype={run:function(){var t=this;this.$openBtn.click(function(){t.$sidebar.hasClass("pushed")||t.openSidebar()}),this.$closeBtn.click(function(){t.$sidebar.hasClass("pushed")&&t.closeSidebar()}),s(window).resize(function(){s(window).width()>t.mediumScreenWidth?(t.resetSidebarPosition(),t.resetBlogPosition()):t.closeSidebar()})},openSidebar:function(){this.swipeBlogToRight(),this.swipeSidebarToRight()},closeSidebar:function(){this.swipeSidebarToLeft(),this.swipeBlogToLeft()},resetSidebarPosition:function(){this.$sidebar.removeClass("pushed")},resetBlogPosition:function(){this.$blog.removeClass("pushed")},swipeSidebarToRight:function(){var t=this;this.$sidebar.hasClass("pushed")||this.$sidebar.hasClass("processing")||(this.$sidebar.addClass("processing pushed"),this.$body.css("overflow-x","hidden"),setTimeout(function(){t.$sidebar.removeClass("processing")},250))},swipeSidebarToLeft:function(){this.$sidebar.hasClass("pushed")&&!this.$sidebar.hasClass("processing")&&(this.$sidebar.addClass("processing").removeClass("pushed processing"),this.$body.css("overflow-x","auto"))},swipeBlogToRight:function(){var t=this;this.$blog.hasClass("pushed")||this.$blog.hasClass("processing")||(this.$blog.addClass("processing pushed"),setTimeout(function(){t.$blog.removeClass("processing")},250))},swipeBlogToLeft:function(){var t=this;t.$blog.hasClass("pushed")&&!this.$blog.hasClass("processing")&&(t.$blog.addClass("processing").removeClass("pushed"),setTimeout(function(){t.$blog.removeClass("processing")},250))}},s(document).ready(function(){(new t).run()})}(jQuery),function(t,s){jQuery.fn[s]=function(t){return t?this.bind("resize",function(e,i,o){var a;return function(){var t=this,s=arguments;a?clearTimeout(a):o&&e.apply(t,s),a=setTimeout(function(){o||e.apply(t,s),a=null},i||100)}}(t)):this.trigger(s)}}(jQuery,"smartresize"),function(s){"use strict";function t(t){this.$tabbedCodeBlocs=s(t)}t.prototype={run:function(){this.$tabbedCodeBlocs.find(".tab").click(function(){var t=s(this).parent().parent().parent().find(".tabs-content").children("pre, .highlight");s(this).siblings().removeClass("active"),s(this).addClass("active"),t.hide(),t.eq(s(this).index()).show()})}},s(document).ready(function(){new t(".codeblock--tabbed").run()})}(jQuery),function(s){"use strict";function t(t){this.$form=s(t).find("#filter-form"),this.$inputSearch=s(t+" #filter-form input[name=tag]"),this.$archiveResult=s(t).find(".archive-result"),this.$tags=s(t).find(".tag"),this.$posts=s(t).find(".archive"),this.tags=t+" .tag",this.posts=t+" .archive",this.dataTag="tag",this.messages={zero:this.$archiveResult.data("message-zero"),one:this.$archiveResult.data("message-one"),other:this.$archiveResult.data("message-other")}}t.prototype={run:function(){var t=this;t.$inputSearch.keyup(function(){t.filter(t.getSearch())}),t.$form.submit(function(t){t.preventDefault()})},getSearch:function(){return this.$inputSearch.val().toLowerCase()},filter:function(t){""===t?(this.showAll(),this.showResult(-1)):(this.hideAll(),this.showPosts(t),this.showResult(this.countTags(t)))},showResult:function(t){-1===t?this.$archiveResult.html("").hide():0===t?this.$archiveResult.html(this.messages.zero).show():1===t?this.$archiveResult.html(this.messages.one).show():this.$archiveResult.html(this.messages.other.replace(/\{n\}/,t)).show()},countTags:function(t){return s(this.posts+"[data-"+this.dataTag+"*='"+t+"']").length},showPosts:function(t){s(this.tags+"[data-"+this.dataTag+"*='"+t+"']").show(),s(this.posts+"[data-"+this.dataTag+"*='"+t+"']").show()},showAll:function(){this.$tags.show(),this.$posts.show()},hideAll:function(){this.$tags.hide(),this.$posts.hide()}},s(document).ready(function(){s("#tags-archives").length&&new t("#tags-archives").run()})}(jQuery);