{"size": 23555, "ext": "js", "max_stars_repo_path": "assets/js/scripts.min.js", "max_stars_repo_name": "klaygomes/klaygomes.github.io", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "assets/js/scripts.min.js", "max_issues_repo_name": "klaygomes/klaygomes.github.io", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "assets/js/scripts.min.js", "max_forks_repo_name": "klaygomes/klaygomes.github.io", "max_forks_repo_forks_event_min_datetime": "2015-11-18T14:48:46.000Z", "max_forks_repo_forks_event_max_datetime": "2020-03-16T23:53:08.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 2, "avg_line_length": 23555.0, "max_line_length": 23555, "alphanum_fraction": 0.6952663978}
!function(a){"use strict";a.fn.fitVids=function(e){var t,n,o={customSelector:null,ignore:null};return document.getElementById("fit-vids-style")||(t=document.head||document.getElementsByTagName("head")[0],(n=document.createElement("div")).innerHTML='<p>x</p><style id="fit-vids-style">.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}</style>',t.appendChild(n.childNodes[1])),e&&a.extend(o,e),this.each(function(){var e=["iframe[src*='player.vimeo.com']","iframe[src*='youtube.com']","iframe[src*='youtube-nocookie.com']","iframe[src*='kickstarter.com'][src*='video.html']","object","embed"];o.customSelector&&e.push(o.customSelector);var i=".fitvidsignore";o.ignore&&(i=i+", "+o.ignore);e=a(this).find(e.join(","));(e=(e=e.not("object object")).not(i)).each(function(){var e,t,n=a(this);0<n.parents(i).length||"embed"===this.tagName.toLowerCase()&&n.parent("object").length||n.parent(".fluid-width-video-wrapper").length||(n.css("height")||n.css("width")||!isNaN(n.attr("height"))&&!isNaN(n.attr("width"))||(n.attr("height",9),n.attr("width",16)),e=("object"===this.tagName.toLowerCase()||n.attr("height")&&!isNaN(parseInt(n.attr("height"),10))?parseInt(n.attr("height"),10):n.height())/(isNaN(parseInt(n.attr("width"),10))?n.width():parseInt(n.attr("width"),10)),n.attr("id")||(t="fitvid"+Math.floor(999999*Math.random()),n.attr("id",t)),n.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*e+"%"),n.removeAttr("height").removeAttr("width"))})})}}(window.jQuery||window.Zepto),function(c){function e(){}function d(e,t){f.ev.on(n+e+b,t)}function u(e,t,n,i){var o=document.createElement("div");return o.className="mfp-"+e,n&&(o.innerHTML=n),i?t&&t.appendChild(o):(o=c(o),t&&o.appendTo(t)),o}function p(e,t){f.ev.triggerHandler(n+e,t),f.st.callbacks&&(e=e.charAt(0).toLowerCase()+e.slice(1),f.st.callbacks[e]&&f.st.callbacks[e].apply(f,c.isArray(t)?t:[t]))}function m(e){return e===t&&f.currTemplate.closeBtn||(f.currTemplate.closeBtn=c(f.st.closeMarkup.replace("%title%",f.st.tClose)),t=e),f.currTemplate.closeBtn}function a(){c.magnificPopup.instance||((f=new e).init(),c.magnificPopup.instance=f)}var f,i,g,h,o,v,t,l="Close",w="BeforeClose",y="MarkupParse",C="Open",r="Change",n="mfp",b="."+n,I="mfp-ready",s="mfp-removing",x="mfp-prevent-close",k=!!window.jQuery,E=c(window);e.prototype={constructor:e,init:function(){var e=navigator.appVersion;f.isIE7=-1!==e.indexOf("MSIE 7."),f.isIE8=-1!==e.indexOf("MSIE 8."),f.isLowIE=f.isIE7||f.isIE8,f.isAndroid=/android/gi.test(e),f.isIOS=/iphone|ipad|ipod/gi.test(e),f.supportsTransition=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1}(),f.probablyMobile=f.isAndroid||f.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),h=c(document),f.popupsCache={}},open:function(e){if(g=g||c(document.body),!1===e.isObj){f.items=e.items.toArray(),f.index=0;for(var t,n=e.items,i=0;i<n.length;i++)if((t=(t=n[i]).parsed?t.el[0]:t)===e.el[0]){f.index=i;break}}else f.items=c.isArray(e.items)?e.items:[e.items],f.index=e.index||0;if(!f.isOpen){f.types=[],v="",e.mainEl&&e.mainEl.length?f.ev=e.mainEl.eq(0):f.ev=h,e.key?(f.popupsCache[e.key]||(f.popupsCache[e.key]={}),f.currTemplate=f.popupsCache[e.key]):f.currTemplate={},f.st=c.extend(!0,{},c.magnificPopup.defaults,e),f.fixedContentPos="auto"===f.st.fixedContentPos?!f.probablyMobile:f.st.fixedContentPos,f.st.modal&&(f.st.closeOnContentClick=!1,f.st.closeOnBgClick=!1,f.st.showCloseBtn=!1,f.st.enableEscapeKey=!1),f.bgOverlay||(f.bgOverlay=u("bg").on("click"+b,function(){f.close()}),f.wrap=u("wrap").attr("tabindex",-1).on("click"+b,function(e){f._checkIfClose(e.target)&&f.close()}),f.container=u("container",f.wrap)),f.contentContainer=u("content"),f.st.preloader&&(f.preloader=u("preloader",f.container,f.st.tLoading));var o=c.magnificPopup.modules;for(i=0;i<o.length;i++){var a=(a=o[i]).charAt(0).toUpperCase()+a.slice(1);f["init"+a].call(f)}p("BeforeOpen"),f.st.showCloseBtn&&(f.st.closeBtnInside?(d(y,function(e,t,n,i){n.close_replaceWith=m(i.type)}),v+=" mfp-close-btn-in"):f.wrap.append(m())),f.st.alignTop&&(v+=" mfp-align-top"),f.fixedContentPos?f.wrap.css({overflow:f.st.overflowY,overflowX:"hidden",overflowY:f.st.overflowY}):f.wrap.css({top:E.scrollTop(),position:"absolute"}),!1!==f.st.fixedBgPos&&("auto"!==f.st.fixedBgPos||f.fixedContentPos)||f.bgOverlay.css({height:h.height(),position:"absolute"}),f.st.enableEscapeKey&&h.on("keyup"+b,function(e){27===e.keyCode&&f.close()}),E.on("resize"+b,function(){f.updateSize()}),f.st.closeOnContentClick||(v+=" mfp-auto-cursor"),v&&f.wrap.addClass(v);var r=f.wH=E.height(),s={};f.fixedContentPos&&(!f._hasScrollBar(r)||(l=f._getScrollbarSize())&&(s.marginRight=l)),f.fixedContentPos&&(f.isIE7?c("body, html").css("overflow","hidden"):s.overflow="hidden");var l=f.st.mainClass;return f.isIE7&&(l+=" mfp-ie7"),l&&f._addClassToMFP(l),f.updateItemHTML(),p("BuildControls"),c("html").css(s),f.bgOverlay.add(f.wrap).prependTo(f.st.prependTo||g),f._lastFocusedEl=document.activeElement,setTimeout(function(){f.content?(f._addClassToMFP(I),f._setFocus()):f.bgOverlay.addClass(I),h.on("focusin"+b,f._onFocusIn)},16),f.isOpen=!0,f.updateSize(r),p(C),e}f.updateItemHTML()},close:function(){f.isOpen&&(p(w),f.isOpen=!1,f.st.removalDelay&&!f.isLowIE&&f.supportsTransition?(f._addClassToMFP(s),setTimeout(function(){f._close()},f.st.removalDelay)):f._close())},_close:function(){p(l);var e=s+" "+I+" ";f.bgOverlay.detach(),f.wrap.detach(),f.container.empty(),f.st.mainClass&&(e+=f.st.mainClass+" "),f._removeClassFromMFP(e),f.fixedContentPos&&(e={marginRight:""},f.isIE7?c("body, html").css("overflow",""):e.overflow="",c("html").css(e)),h.off("keyup.mfp focusin"+b),f.ev.off(b),f.wrap.attr("class","mfp-wrap").removeAttr("style"),f.bgOverlay.attr("class","mfp-bg"),f.container.attr("class","mfp-container"),!f.st.showCloseBtn||f.st.closeBtnInside&&!0!==f.currTemplate[f.currItem.type]||f.currTemplate.closeBtn&&f.currTemplate.closeBtn.detach(),f._lastFocusedEl&&c(f._lastFocusedEl).focus(),f.currItem=null,f.content=null,f.currTemplate=null,f.prevHeight=0,p("AfterClose")},updateSize:function(e){var t;f.isIOS?(t=document.documentElement.clientWidth/window.innerWidth,t=window.innerHeight*t,f.wrap.css("height",t),f.wH=t):f.wH=e||E.height(),f.fixedContentPos||f.wrap.css("height",f.wH),p("Resize")},updateItemHTML:function(){var e=f.items[f.index];f.contentContainer.detach(),f.content&&f.content.detach();var t=(e=!e.parsed?f.parseEl(f.index):e).type;p("BeforeChange",[f.currItem?f.currItem.type:"",t]),f.currItem=e,f.currTemplate[t]||(n=!!f.st[t]&&f.st[t].markup,p("FirstMarkupParse",n),f.currTemplate[t]=!n||c(n)),o&&o!==e.type&&f.container.removeClass("mfp-"+o+"-holder");var n=f["get"+t.charAt(0).toUpperCase()+t.slice(1)](e,f.currTemplate[t]);f.appendContent(n,t),e.preloaded=!0,p(r,e),o=e.type,f.container.prepend(f.contentContainer),p("AfterChange")},appendContent:function(e,t){(f.content=e)?f.st.showCloseBtn&&f.st.closeBtnInside&&!0===f.currTemplate[t]?f.content.find(".mfp-close").length||f.content.append(m()):f.content=e:f.content="",p("BeforeAppend"),f.container.addClass("mfp-"+t+"-holder"),f.contentContainer.append(f.content)},parseEl:function(e){var t,n=f.items[e];if((n=n.tagName?{el:c(n)}:(t=n.type,{data:n,src:n.src})).el){for(var i=f.types,o=0;o<i.length;o++)if(n.el.hasClass("mfp-"+i[o])){t=i[o];break}n.src=n.el.attr("data-mfp-src"),n.src||(n.src=n.el.attr("href"))}return n.type=t||f.st.type||"inline",n.index=e,n.parsed=!0,f.items[e]=n,p("ElementParse",n),f.items[e]},addGroup:function(t,n){function e(e){e.mfpEl=this,f._openClick(e,t,n)}var i="click.magnificPopup";(n=n||{}).mainEl=t,n.items?(n.isObj=!0,t.off(i).on(i,e)):(n.isObj=!1,n.delegate?t.off(i).on(i,n.delegate,e):(n.items=t).off(i).on(i,e))},_openClick:function(e,t,n){if((void 0!==n.midClick?n:c.magnificPopup.defaults).midClick||2!==e.which&&!e.ctrlKey&&!e.metaKey){var i=(void 0!==n.disableOn?n:c.magnificPopup.defaults).disableOn;if(i)if(c.isFunction(i)){if(!i.call(f))return!0}else if(E.width()<i)return!0;e.type&&(e.preventDefault(),f.isOpen&&e.stopPropagation()),n.el=c(e.mfpEl),n.delegate&&(n.items=t.find(n.delegate)),f.open(n)}},updateStatus:function(e,t){var n;f.preloader&&(i!==e&&f.container.removeClass("mfp-s-"+i),n={status:e,text:t=!t&&"loading"===e?f.st.tLoading:t},p("UpdateStatus",n),e=n.status,f.preloader.html(t=n.text),f.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),f.container.addClass("mfp-s-"+e),i=e)},_checkIfClose:function(e){if(!c(e).hasClass(x)){var t=f.st.closeOnContentClick,n=f.st.closeOnBgClick;if(t&&n)return!0;if(!f.content||c(e).hasClass("mfp-close")||f.preloader&&e===f.preloader[0])return!0;if(e===f.content[0]||c.contains(f.content[0],e)){if(t)return!0}else if(n&&c.contains(document,e))return!0;return!1}},_addClassToMFP:function(e){f.bgOverlay.addClass(e),f.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),f.wrap.removeClass(e)},_hasScrollBar:function(e){return(f.isIE7?h.height():document.body.scrollHeight)>(e||E.height())},_setFocus:function(){(f.st.focus?f.content.find(f.st.focus).eq(0):f.wrap).focus()},_onFocusIn:function(e){if(e.target!==f.wrap[0]&&!c.contains(f.wrap[0],e.target))return f._setFocus(),!1},_parseMarkup:function(o,e,t){var a;t.data&&(e=c.extend(t.data,e)),p(y,[o,e,t]),c.each(e,function(e,t){return void 0===t||!1===t||void(1<(a=e.split("_")).length?0<(n=o.find(b+"-"+a[0])).length&&("replaceWith"===(i=a[1])?n[0]!==t[0]&&n.replaceWith(t):"img"===i?n.is("img")?n.attr("src",t):n.replaceWith('<img src="'+t+'" class="'+n.attr("class")+'" />'):n.attr(a[1],t)):o.find(b+"-"+e).html(t));var n,i})},_getScrollbarSize:function(){var e;return void 0===f.scrollbarSize&&((e=document.createElement("div")).id="mfp-sbm",e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),f.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)),f.scrollbarSize}},c.magnificPopup={instance:null,proto:e.prototype,modules:[],open:function(e,t){return a(),(e=e?c.extend(!0,{},e):{}).isObj=!0,e.index=t||0,this.instance.open(e)},close:function(){return c.magnificPopup.instance&&c.magnificPopup.instance.close()},registerModule:function(e,t){t.options&&(c.magnificPopup.defaults[e]=t.options),c.extend(this.proto,t.proto),this.modules.push(e)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&times;</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},c.fn.magnificPopup=function(e){a();var t,n,i,o=c(this);return"string"==typeof e?"open"===e?(t=k?o.data("magnificPopup"):o[0].magnificPopup,n=parseInt(arguments[1],10)||0,i=t.items?t.items[n]:(i=o,(i=t.delegate?i.find(t.delegate):i).eq(n)),f._openClick({mfpEl:i},o,t)):f.isOpen&&f[e].apply(f,Array.prototype.slice.call(arguments,1)):(e=c.extend(!0,{},e),k?o.data("magnificPopup",e):o[0].magnificPopup=e,f.addGroup(o,e)),o};function T(){P&&(_.after(P.addClass(S)).detach(),P=null)}var S,_,P,M="inline";c.magnificPopup.registerModule(M,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){f.types.push(M),d(l+"."+M,function(){T()})},getInline:function(e,t){if(T(),e.src){var n,i=f.st.inline,o=c(e.src);return o.length?((n=o[0].parentNode)&&n.tagName&&(_||(S=i.hiddenClass,_=u(S),S="mfp-"+S),P=o.after(_).detach().removeClass(S)),f.updateStatus("ready")):(f.updateStatus("error",i.tNotFound),o=c("<div>")),e.inlineElement=o}return f.updateStatus("ready"),f._parseMarkup(t,{},e),t}}});function z(){B&&g.removeClass(B)}function O(){z(),f.req&&f.req.abort()}var B,L="ajax";c.magnificPopup.registerModule(L,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){f.types.push(L),B=f.st.ajax.cursor,d(l+"."+L,O),d("BeforeChange."+L,O)},getAjax:function(i){B&&g.addClass(B),f.updateStatus("loading");var e=c.extend({url:i.src,success:function(e,t,n){n={data:e,xhr:n};p("ParseAjax",n),f.appendContent(c(n.data),L),i.finished=!0,z(),f._setFocus(),setTimeout(function(){f.wrap.addClass(I)},16),f.updateStatus("ready"),p("AjaxContentAdded")},error:function(){z(),i.finished=i.loadError=!0,f.updateStatus("error",f.st.ajax.tError.replace("%url%",i.src))}},f.st.ajax.settings);return f.req=c.ajax(e),""}}});var N;c.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var e=f.st.image,t=".image";f.types.push("image"),d(C+t,function(){"image"===f.currItem.type&&e.cursor&&g.addClass(e.cursor)}),d(l+t,function(){e.cursor&&g.removeClass(e.cursor),E.off("resize"+b)}),d("Resize"+t,f.resizeImage),f.isLowIE&&d("AfterChange",f.resizeImage)},resizeImage:function(){var e,t=f.currItem;t&&t.img&&f.st.image.verticalFit&&(e=0,f.isLowIE&&(e=parseInt(t.img.css("padding-top"),10)+parseInt(t.img.css("padding-bottom"),10)),t.img.css("max-height",f.wH-e))},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,N&&clearInterval(N),e.isCheckingImgSize=!1,p("ImageHasSize",e),e.imgHidden&&(f.content&&f.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(t){function n(e){N&&clearInterval(N),N=setInterval(function(){0<o.naturalWidth?f._onImageHasSize(t):(200<i&&clearInterval(N),3===++i?n(10):40===i?n(50):100===i&&n(500))},e)}var i=0,o=t.img[0];n(1)},getImage:function(e,t){function n(){e&&(e.img[0].complete?(e.img.off(".mfploader"),e===f.currItem&&(f._onImageHasSize(e),f.updateStatus("ready")),e.hasSize=!0,e.loaded=!0,p("ImageLoadComplete")):++a<200?setTimeout(n,100):i())}function i(){e&&(e.img.off(".mfploader"),e===f.currItem&&(f._onImageHasSize(e),f.updateStatus("error",r.tError.replace("%url%",e.src))),e.hasSize=!0,e.loaded=!0,e.loadError=!0)}var o,a=0,r=f.st.image,s=t.find(".mfp-img");return s.length&&((o=document.createElement("img")).className="mfp-img",e.img=c(o).on("load.mfploader",n).on("error.mfploader",i),o.src=e.src,s.is("img")&&(e.img=e.img.clone()),0<(o=e.img[0]).naturalWidth?e.hasSize=!0:o.width||(e.hasSize=!1)),f._parseMarkup(t,{title:function(e){if(e.data&&void 0!==e.data.title)return e.data.title;var t=f.st.image.titleSrc;if(t){if(c.isFunction(t))return t.call(f,e);if(e.el)return e.el.attr(t)||""}return""}(e),img_replaceWith:e.img},e),f.resizeImage(),e.hasSize?(N&&clearInterval(N),e.loadError?(t.addClass("mfp-loading"),f.updateStatus("error",r.tError.replace("%url%",e.src))):(t.removeClass("mfp-loading"),f.updateStatus("ready"))):(f.updateStatus("loading"),e.loading=!0,e.hasSize||(e.imgHidden=!0,t.addClass("mfp-loading"),f.findImageSize(e))),t}}});var F;c.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,t,n,i,o,a,r=f.st.zoom,s=".zoom";r.enabled&&f.supportsTransition&&(t=r.duration,n=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),n="all "+r.duration/1e3+"s "+r.easing,i={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},e="transition";return i["-webkit-"+e]=i["-moz-"+e]=i["-o-"+e]=i[e]=n,t.css(i),t},i=function(){f.content.css("visibility","visible")},d("BuildControls"+s,function(){f._allowZoom()&&(clearTimeout(o),f.content.css("visibility","hidden"),(e=f._getItemToZoom())?((a=n(e)).css(f._getOffset()),f.wrap.append(a),o=setTimeout(function(){a.css(f._getOffset(!0)),o=setTimeout(function(){i(),setTimeout(function(){a.remove(),e=a=null,p("ZoomAnimationEnded")},16)},t)},16)):i())}),d(w+s,function(){if(f._allowZoom()){if(clearTimeout(o),f.st.removalDelay=t,!e){if(!(e=f._getItemToZoom()))return;a=n(e)}a.css(f._getOffset(!0)),f.wrap.append(a),f.content.css("visibility","hidden"),setTimeout(function(){a.css(f._getOffset())},16)}}),d(l+s,function(){f._allowZoom()&&(i(),a&&a.remove(),e=null)}))},_allowZoom:function(){return"image"===f.currItem.type},_getItemToZoom:function(){return!!f.currItem.hasSize&&f.currItem.img},_getOffset:function(e){var t=e?f.currItem.img:f.st.zoom.opener(f.currItem.el||f.currItem),n=t.offset(),i=parseInt(t.css("padding-top"),10),e=parseInt(t.css("padding-bottom"),10);n.top-=c(window).scrollTop()-i;i={width:t.width(),height:(k?t.innerHeight():t[0].offsetHeight)-e-i};return(F=void 0===F?void 0!==document.createElement("p").style.MozTransform:F)?i["-moz-transform"]=i.transform="translate("+n.left+"px,"+n.top+"px)":(i.left=n.left,i.top=n.top),i}}});function A(e){var t;!f.currTemplate[H]||(t=f.currTemplate[H].find("iframe")).length&&(e||(t[0].src="//about:blank"),f.isIE8&&t.css("display",e?"block":"none"))}var H="iframe";c.magnificPopup.registerModule(H,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){f.types.push(H),d("BeforeChange",function(e,t,n){t!==n&&(t===H?A():n===H&&A(!0))}),d(l+"."+H,function(){A()})},getIframe:function(e,t){var n=e.src,i=f.st.iframe;c.each(i.patterns,function(){if(-1<n.indexOf(this.index))return this.id&&(n="string"==typeof this.id?n.substr(n.lastIndexOf(this.id)+this.id.length,n.length):this.id.call(this,n)),n=this.src.replace("%id%",n),!1});var o={};return i.srcAction&&(o[i.srcAction]=n),f._parseMarkup(t,o,e),f.updateStatus("ready"),t}}});function j(e){var t=f.items.length;return t-1<e?e-t:e<0?t+e:e}function $(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)}c.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var a=f.st.gallery,e=".mfp-gallery",i=Boolean(c.fn.mfpFastClick);if(f.direction=!0,!a||!a.enabled)return!1;v+=" mfp-gallery",d(C+e,function(){a.navigateByImgClick&&f.wrap.on("click"+e,".mfp-img",function(){if(1<f.items.length)return f.next(),!1}),h.on("keydown"+e,function(e){37===e.keyCode?f.prev():39===e.keyCode&&f.next()})}),d("UpdateStatus"+e,function(e,t){t.text&&(t.text=$(t.text,f.currItem.index,f.items.length))}),d(y+e,function(e,t,n,i){var o=f.items.length;n.counter=1<o?$(a.tCounter,i.index,o):""}),d("BuildControls"+e,function(){var e,t,n;1<f.items.length&&a.arrows&&!f.arrowLeft&&(n=a.arrowMarkup,e=f.arrowLeft=c(n.replace(/%title%/gi,a.tPrev).replace(/%dir%/gi,"left")).addClass(x),t=f.arrowRight=c(n.replace(/%title%/gi,a.tNext).replace(/%dir%/gi,"right")).addClass(x),e[n=i?"mfpFastClick":"click"](function(){f.prev()}),t[n](function(){f.next()}),f.isIE7&&(u("b",e[0],!1,!0),u("a",e[0],!1,!0),u("b",t[0],!1,!0),u("a",t[0],!1,!0)),f.container.append(e.add(t)))}),d(r+e,function(){f._preloadTimeout&&clearTimeout(f._preloadTimeout),f._preloadTimeout=setTimeout(function(){f.preloadNearbyImages(),f._preloadTimeout=null},16)}),d(l+e,function(){h.off(e),f.wrap.off("click"+e),f.arrowLeft&&i&&f.arrowLeft.add(f.arrowRight).destroyMfpFastClick(),f.arrowRight=f.arrowLeft=null})},next:function(){f.direction=!0,f.index=j(f.index+1),f.updateItemHTML()},prev:function(){f.direction=!1,f.index=j(f.index-1),f.updateItemHTML()},goTo:function(e){f.direction=e>=f.index,f.index=e,f.updateItemHTML()},preloadNearbyImages:function(){for(var e=f.st.gallery.preload,t=Math.min(e[0],f.items.length),n=Math.min(e[1],f.items.length),i=1;i<=(f.direction?n:t);i++)f._preloadItem(f.index+i);for(i=1;i<=(f.direction?t:n);i++)f._preloadItem(f.index-i)},_preloadItem:function(e){var t;e=j(e),f.items[e].preloaded||((t=f.items[e]).parsed||(t=f.parseEl(e)),p("LazyLoad",t),"image"===t.type&&(t.img=c('<img class="mfp-img" />').on("load.mfploader",function(){t.hasSize=!0}).on("error.mfploader",function(){t.hasSize=!0,t.loadError=!0,p("LazyLoadError",t)}).attr("src",t.src)),t.preloaded=!0)}}});var W,R,Z="retina";function D(){E.off("touchmove"+R+" touchend"+R)}c.magnificPopup.registerModule(Z,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){var n,i;1<window.devicePixelRatio&&(n=f.st.retina,i=n.ratio,1<(i=isNaN(i)?i():i)&&(d("ImageHasSize."+Z,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/i,width:"100%"})}),d("ElementParse."+Z,function(e,t){t.src=n.replaceSrc(t,i)})))}}}),W="ontouchstart"in window,R=".mfpFastClick",c.fn.mfpFastClick=function(l){return c(this).each(function(){var t,n,i,o,a,r,s,e=c(this);W&&e.on("touchstart"+R,function(e){a=!1,s=1,r=(e.originalEvent||e).touches[0],i=r.clientX,o=r.clientY,E.on("touchmove"+R,function(e){r=(e.originalEvent||e).touches,s=r.length,r=r[0],(10<Math.abs(r.clientX-i)||10<Math.abs(r.clientY-o))&&(a=!0,D())}).on("touchend"+R,function(e){D(),a||1<s||(t=!0,e.preventDefault(),clearTimeout(n),n=setTimeout(function(){t=!1},1e3),l())})}),e.on("click"+R,function(){t||l()})})},c.fn.destroyMfpFastClick=function(){c(this).off("touchstart"+R+" click"+R),W&&E.off("touchmove"+R+" touchend"+R)},a()}(window.jQuery||window.Zepto);var changeClass=function(e,t,n){var i=new RegExp("(?:^|\\s+)"+t+"(?:\\s+|$)");return i.test(e.className)?e.className=e.className.replace(i," "+n+" "):e.className=e.className.replace(new RegExp("(?:^|\\s+)"+n+"(?:\\s+|$)")," "+t+" "),e.className},menuElements=document.getElementById("site-nav");menuElements.insertAdjacentHTML("afterBegin",'<button type="button" role="button" id="menutoggle" class="navtoggle navicon-lines-button x" aria-hidden="true"><span class="navicon-lines"></span>menu</button>'),document.getElementById("menutoggle").onclick=function(){changeClass(this,"navtoggle active","navtoggle")},document.onclick=function(e){var t=document.getElementById("menutoggle");"block"===(t.currentStyle||getComputedStyle(t,null)).display&&e.target!==t&&new RegExp(" active ").test(" "+t.className+" ")&&changeClass(t,"navtoggle active","navtoggle")},$(function(){$("article").fitVids()}),$(function(){$(".toc h3").click(function(){$("#drawer").toggleClass("js-hidden")})}),$("a[href$='.jpg'],a[href$='.jpeg'],a[href$='.JPG'],a[href$='.png'],a[href$='.gif']").addClass("image-popup"),$(document).ready(function(){$(".image-popup").magnificPopup({type:"image",tLoading:"Loading image #%curr%...",gallery:{enabled:!0,navigateByImgClick:!0,preload:[0,1]},image:{tError:'<a href="%url%">Image #%curr%</a> could not be loaded.'},removalDelay:300,mainClass:"mfp-fade"})});