hacks-guide-minimal-mistake.../assets/js/main.min.js
Michael Rose c7a7a5d707 Enable sticky sidebar
- Hide sidebar on small screens
2016-03-14 21:30:03 -04:00

2 lines
31 KiB
JavaScript

$(document).ready(function(){$("#main").fitVids(),$(".sticky").Stickyfill(),$("a").smoothScroll({offset:-20}),$("a[href$='.jpg'],a[href$='.jpeg'],a[href$='.JPG'],a[href$='.png'],a[href$='.gif']").addClass("image-popup"),$(".image-popup").magnificPopup({disableOn:function(){return!($(window).width()<500)},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:500,mainClass:"mfp-zoom-in",callbacks:{beforeOpen:function(){this.st.image.markup=this.st.image.markup.replace("mfp-figure","mfp-figure mfp-with-anim")}},closeOnContentClick:!0,midClick:!0})}),function(t){"use strict";t.fn.fitVids=function(e){var i={customSelector:null,ignore:null};if(!document.getElementById("fit-vids-style")){var o=document.head||document.getElementsByTagName("head")[0],n=".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%;}",r=document.createElement("div");r.innerHTML='<p>x</p><style id="fit-vids-style">'+n+"</style>",o.appendChild(r.childNodes[1])}return e&&t.extend(i,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"];i.customSelector&&e.push(i.customSelector);var o=".fitvidsignore";i.ignore&&(o=o+", "+i.ignore);var n=t(this).find(e.join(","));n=n.not("object object"),n=n.not(o),n.each(function(e){var i=t(this);if(!(i.parents(o).length>0||"embed"===this.tagName.toLowerCase()&&i.parent("object").length||i.parent(".fluid-width-video-wrapper").length)){i.css("height")||i.css("width")||!isNaN(i.attr("height"))&&!isNaN(i.attr("width"))||(i.attr("height",9),i.attr("width",16));var n="object"===this.tagName.toLowerCase()||i.attr("height")&&!isNaN(parseInt(i.attr("height"),10))?parseInt(i.attr("height"),10):i.height(),r=isNaN(parseInt(i.attr("width"),10))?i.width():parseInt(i.attr("width"),10),s=n/r;if(!i.attr("id")){var a="fitvid"+e;i.attr("id",a)}i.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*s+"%"),i.removeAttr("height").removeAttr("width")}})})}}(window.jQuery||window.Zepto),function(t){var e,i,o,n,r,s,a,l="Close",c="BeforeClose",d="AfterClose",p="BeforeAppend",u="MarkupParse",f="Open",m="Change",h="mfp",g="."+h,v="mfp-ready",y="mfp-removing",w="mfp-prevent-close",b=function(){},C=!!window.jQuery,S=t(window),k=function(t,i){e.ev.on(h+t+g,i)},x=function(e,i,o,n){var r=document.createElement("div");return r.className="mfp-"+e,o&&(r.innerHTML=o),n?i&&i.appendChild(r):(r=t(r),i&&r.appendTo(i)),r},I=function(i,o){e.ev.triggerHandler(h+i,o),e.st.callbacks&&(i=i.charAt(0).toLowerCase()+i.slice(1),e.st.callbacks[i]&&e.st.callbacks[i].apply(e,t.isArray(o)?o:[o]))},E=function(i){return i===a&&e.currTemplate.closeBtn||(e.currTemplate.closeBtn=t(e.st.closeMarkup.replace("%title%",e.st.tClose)),a=i),e.currTemplate.closeBtn},T=function(){t.magnificPopup.instance||(e=new b,e.init(),t.magnificPopup.instance=e)},O=function(){var t=document.createElement("p").style,e=["ms","O","Moz","Webkit"];if(void 0!==t.transition)return!0;for(;e.length;)if(e.pop()+"Transition"in t)return!0;return!1};b.prototype={constructor:b,init:function(){var i=navigator.appVersion;e.isIE7=-1!==i.indexOf("MSIE 7."),e.isIE8=-1!==i.indexOf("MSIE 8."),e.isLowIE=e.isIE7||e.isIE8,e.isAndroid=/android/gi.test(i),e.isIOS=/iphone|ipad|ipod/gi.test(i),e.supportsTransition=O(),e.probablyMobile=e.isAndroid||e.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),n=t(document),e.popupsCache={}},open:function(i){o||(o=t(document.body));var r;if(i.isObj===!1){e.items=i.items.toArray(),e.index=0;var a,l=i.items;for(r=0;r<l.length;r++)if(a=l[r],a.parsed&&(a=a.el[0]),a===i.el[0]){e.index=r;break}}else e.items=t.isArray(i.items)?i.items:[i.items],e.index=i.index||0;if(e.isOpen)return void e.updateItemHTML();e.types=[],s="",i.mainEl&&i.mainEl.length?e.ev=i.mainEl.eq(0):e.ev=n,i.key?(e.popupsCache[i.key]||(e.popupsCache[i.key]={}),e.currTemplate=e.popupsCache[i.key]):e.currTemplate={},e.st=t.extend(!0,{},t.magnificPopup.defaults,i),e.fixedContentPos="auto"===e.st.fixedContentPos?!e.probablyMobile:e.st.fixedContentPos,e.st.modal&&(e.st.closeOnContentClick=!1,e.st.closeOnBgClick=!1,e.st.showCloseBtn=!1,e.st.enableEscapeKey=!1),e.bgOverlay||(e.bgOverlay=x("bg").on("click"+g,function(){e.close()}),e.wrap=x("wrap").attr("tabindex",-1).on("click"+g,function(t){e._checkIfClose(t.target)&&e.close()}),e.container=x("container",e.wrap)),e.contentContainer=x("content"),e.st.preloader&&(e.preloader=x("preloader",e.container,e.st.tLoading));var c=t.magnificPopup.modules;for(r=0;r<c.length;r++){var d=c[r];d=d.charAt(0).toUpperCase()+d.slice(1),e["init"+d].call(e)}I("BeforeOpen"),e.st.showCloseBtn&&(e.st.closeBtnInside?(k(u,function(t,e,i,o){i.close_replaceWith=E(o.type)}),s+=" mfp-close-btn-in"):e.wrap.append(E())),e.st.alignTop&&(s+=" mfp-align-top"),e.fixedContentPos?e.wrap.css({overflow:e.st.overflowY,overflowX:"hidden",overflowY:e.st.overflowY}):e.wrap.css({top:S.scrollTop(),position:"absolute"}),(e.st.fixedBgPos===!1||"auto"===e.st.fixedBgPos&&!e.fixedContentPos)&&e.bgOverlay.css({height:n.height(),position:"absolute"}),e.st.enableEscapeKey&&n.on("keyup"+g,function(t){27===t.keyCode&&e.close()}),S.on("resize"+g,function(){e.updateSize()}),e.st.closeOnContentClick||(s+=" mfp-auto-cursor"),s&&e.wrap.addClass(s);var p=e.wH=S.height(),m={};if(e.fixedContentPos&&e._hasScrollBar(p)){var h=e._getScrollbarSize();h&&(m.marginRight=h)}e.fixedContentPos&&(e.isIE7?t("body, html").css("overflow","hidden"):m.overflow="hidden");var y=e.st.mainClass;return e.isIE7&&(y+=" mfp-ie7"),y&&e._addClassToMFP(y),e.updateItemHTML(),I("BuildControls"),t("html").css(m),e.bgOverlay.add(e.wrap).prependTo(e.st.prependTo||o),e._lastFocusedEl=document.activeElement,setTimeout(function(){e.content?(e._addClassToMFP(v),e._setFocus()):e.bgOverlay.addClass(v),n.on("focusin"+g,e._onFocusIn)},16),e.isOpen=!0,e.updateSize(p),I(f),i},close:function(){e.isOpen&&(I(c),e.isOpen=!1,e.st.removalDelay&&!e.isLowIE&&e.supportsTransition?(e._addClassToMFP(y),setTimeout(function(){e._close()},e.st.removalDelay)):e._close())},_close:function(){I(l);var i=y+" "+v+" ";if(e.bgOverlay.detach(),e.wrap.detach(),e.container.empty(),e.st.mainClass&&(i+=e.st.mainClass+" "),e._removeClassFromMFP(i),e.fixedContentPos){var o={marginRight:""};e.isIE7?t("body, html").css("overflow",""):o.overflow="",t("html").css(o)}n.off("keyup"+g+" focusin"+g),e.ev.off(g),e.wrap.attr("class","mfp-wrap").removeAttr("style"),e.bgOverlay.attr("class","mfp-bg"),e.container.attr("class","mfp-container"),!e.st.showCloseBtn||e.st.closeBtnInside&&e.currTemplate[e.currItem.type]!==!0||e.currTemplate.closeBtn&&e.currTemplate.closeBtn.detach(),e._lastFocusedEl&&t(e._lastFocusedEl).focus(),e.currItem=null,e.content=null,e.currTemplate=null,e.prevHeight=0,I(d)},updateSize:function(t){if(e.isIOS){var i=document.documentElement.clientWidth/window.innerWidth,o=window.innerHeight*i;e.wrap.css("height",o),e.wH=o}else e.wH=t||S.height();e.fixedContentPos||e.wrap.css("height",e.wH),I("Resize")},updateItemHTML:function(){var i=e.items[e.index];e.contentContainer.detach(),e.content&&e.content.detach(),i.parsed||(i=e.parseEl(e.index));var o=i.type;if(I("BeforeChange",[e.currItem?e.currItem.type:"",o]),e.currItem=i,!e.currTemplate[o]){var n=e.st[o]?e.st[o].markup:!1;I("FirstMarkupParse",n),n?e.currTemplate[o]=t(n):e.currTemplate[o]=!0}r&&r!==i.type&&e.container.removeClass("mfp-"+r+"-holder");var s=e["get"+o.charAt(0).toUpperCase()+o.slice(1)](i,e.currTemplate[o]);e.appendContent(s,o),i.preloaded=!0,I(m,i),r=i.type,e.container.prepend(e.contentContainer),I("AfterChange")},appendContent:function(t,i){e.content=t,t?e.st.showCloseBtn&&e.st.closeBtnInside&&e.currTemplate[i]===!0?e.content.find(".mfp-close").length||e.content.append(E()):e.content=t:e.content="",I(p),e.container.addClass("mfp-"+i+"-holder"),e.contentContainer.append(e.content)},parseEl:function(i){var o,n=e.items[i];if(n.tagName?n={el:t(n)}:(o=n.type,n={data:n,src:n.src}),n.el){for(var r=e.types,s=0;s<r.length;s++)if(n.el.hasClass("mfp-"+r[s])){o=r[s];break}n.src=n.el.attr("data-mfp-src"),n.src||(n.src=n.el.attr("href"))}return n.type=o||e.st.type||"inline",n.index=i,n.parsed=!0,e.items[i]=n,I("ElementParse",n),e.items[i]},addGroup:function(t,i){var o=function(o){o.mfpEl=this,e._openClick(o,t,i)};i||(i={});var n="click.magnificPopup";i.mainEl=t,i.items?(i.isObj=!0,t.off(n).on(n,o)):(i.isObj=!1,i.delegate?t.off(n).on(n,i.delegate,o):(i.items=t,t.off(n).on(n,o)))},_openClick:function(i,o,n){var r=void 0!==n.midClick?n.midClick:t.magnificPopup.defaults.midClick;if(r||2!==i.which&&!i.ctrlKey&&!i.metaKey){var s=void 0!==n.disableOn?n.disableOn:t.magnificPopup.defaults.disableOn;if(s)if(t.isFunction(s)){if(!s.call(e))return!0}else if(S.width()<s)return!0;i.type&&(i.preventDefault(),e.isOpen&&i.stopPropagation()),n.el=t(i.mfpEl),n.delegate&&(n.items=o.find(n.delegate)),e.open(n)}},updateStatus:function(t,o){if(e.preloader){i!==t&&e.container.removeClass("mfp-s-"+i),o||"loading"!==t||(o=e.st.tLoading);var n={status:t,text:o};I("UpdateStatus",n),t=n.status,o=n.text,e.preloader.html(o),e.preloader.find("a").on("click",function(t){t.stopImmediatePropagation()}),e.container.addClass("mfp-s-"+t),i=t}},_checkIfClose:function(i){if(!t(i).hasClass(w)){var o=e.st.closeOnContentClick,n=e.st.closeOnBgClick;if(o&&n)return!0;if(!e.content||t(i).hasClass("mfp-close")||e.preloader&&i===e.preloader[0])return!0;if(i===e.content[0]||t.contains(e.content[0],i)){if(o)return!0}else if(n&&t.contains(document,i))return!0;return!1}},_addClassToMFP:function(t){e.bgOverlay.addClass(t),e.wrap.addClass(t)},_removeClassFromMFP:function(t){this.bgOverlay.removeClass(t),e.wrap.removeClass(t)},_hasScrollBar:function(t){return(e.isIE7?n.height():document.body.scrollHeight)>(t||S.height())},_setFocus:function(){(e.st.focus?e.content.find(e.st.focus).eq(0):e.wrap).focus()},_onFocusIn:function(i){return i.target===e.wrap[0]||t.contains(e.wrap[0],i.target)?void 0:(e._setFocus(),!1)},_parseMarkup:function(e,i,o){var n;o.data&&(i=t.extend(o.data,i)),I(u,[e,i,o]),t.each(i,function(t,i){if(void 0===i||i===!1)return!0;if(n=t.split("_"),n.length>1){var o=e.find(g+"-"+n[0]);if(o.length>0){var r=n[1];"replaceWith"===r?o[0]!==i[0]&&o.replaceWith(i):"img"===r?o.is("img")?o.attr("src",i):o.replaceWith('<img src="'+i+'" class="'+o.attr("class")+'" />'):o.attr(n[1],i)}}else e.find(g+"-"+t).html(i)})},_getScrollbarSize:function(){if(void 0===e.scrollbarSize){var t=document.createElement("div");t.id="mfp-sbm",t.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(t),e.scrollbarSize=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return e.scrollbarSize}},t.magnificPopup={instance:null,proto:b.prototype,modules:[],open:function(e,i){return T(),e=e?t.extend(!0,{},e):{},e.isObj=!0,e.index=i||0,this.instance.open(e)},close:function(){return t.magnificPopup.instance&&t.magnificPopup.instance.close()},registerModule:function(e,i){i.options&&(t.magnificPopup.defaults[e]=i.options),t.extend(this.proto,i.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..."}},t.fn.magnificPopup=function(i){T();var o=t(this);if("string"==typeof i)if("open"===i){var n,r=C?o.data("magnificPopup"):o[0].magnificPopup,s=parseInt(arguments[1],10)||0;r.items?n=r.items[s]:(n=o,r.delegate&&(n=n.find(r.delegate)),n=n.eq(s)),e._openClick({mfpEl:n},o,r)}else e.isOpen&&e[i].apply(e,Array.prototype.slice.call(arguments,1));else i=t.extend(!0,{},i),C?o.data("magnificPopup",i):o[0].magnificPopup=i,e.addGroup(o,i);return o};var _,P,L,z="inline",M=function(){L&&(P.after(L.addClass(_)).detach(),L=null)};t.magnificPopup.registerModule(z,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){e.types.push(z),k(l+"."+z,function(){M()})},getInline:function(i,o){if(M(),i.src){var n=e.st.inline,r=t(i.src);if(r.length){var s=r[0].parentNode;s&&s.tagName&&(P||(_=n.hiddenClass,P=x(_),_="mfp-"+_),L=r.after(P).detach().removeClass(_)),e.updateStatus("ready")}else e.updateStatus("error",n.tNotFound),r=t("<div>");return i.inlineElement=r,r}return e.updateStatus("ready"),e._parseMarkup(o,{},i),o}}});var F,B="ajax",H=function(){F&&o.removeClass(F)},N=function(){H(),e.req&&e.req.abort()};t.magnificPopup.registerModule(B,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){e.types.push(B),F=e.st.ajax.cursor,k(l+"."+B,N),k("BeforeChange."+B,N)},getAjax:function(i){F&&o.addClass(F),e.updateStatus("loading");var n=t.extend({url:i.src,success:function(o,n,r){var s={data:o,xhr:r};I("ParseAjax",s),e.appendContent(t(s.data),B),i.finished=!0,H(),e._setFocus(),setTimeout(function(){e.wrap.addClass(v)},16),e.updateStatus("ready"),I("AjaxContentAdded")},error:function(){H(),i.finished=i.loadError=!0,e.updateStatus("error",e.st.ajax.tError.replace("%url%",i.src))}},e.st.ajax.settings);return e.req=t.ajax(n),""}}});var A,j=function(i){if(i.data&&void 0!==i.data.title)return i.data.title;var o=e.st.image.titleSrc;if(o){if(t.isFunction(o))return o.call(e,i);if(i.el)return i.el.attr(o)||""}return""};t.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 t=e.st.image,i=".image";e.types.push("image"),k(f+i,function(){"image"===e.currItem.type&&t.cursor&&o.addClass(t.cursor)}),k(l+i,function(){t.cursor&&o.removeClass(t.cursor),S.off("resize"+g)}),k("Resize"+i,e.resizeImage),e.isLowIE&&k("AfterChange",e.resizeImage)},resizeImage:function(){var t=e.currItem;if(t&&t.img&&e.st.image.verticalFit){var i=0;e.isLowIE&&(i=parseInt(t.img.css("padding-top"),10)+parseInt(t.img.css("padding-bottom"),10)),t.img.css("max-height",e.wH-i)}},_onImageHasSize:function(t){t.img&&(t.hasSize=!0,A&&clearInterval(A),t.isCheckingImgSize=!1,I("ImageHasSize",t),t.imgHidden&&(e.content&&e.content.removeClass("mfp-loading"),t.imgHidden=!1))},findImageSize:function(t){var i=0,o=t.img[0],n=function(r){A&&clearInterval(A),A=setInterval(function(){return o.naturalWidth>0?void e._onImageHasSize(t):(i>200&&clearInterval(A),i++,void(3===i?n(10):40===i?n(50):100===i&&n(500)))},r)};n(1)},getImage:function(i,o){var n=0,r=function(){i&&(i.img[0].complete?(i.img.off(".mfploader"),i===e.currItem&&(e._onImageHasSize(i),e.updateStatus("ready")),i.hasSize=!0,i.loaded=!0,I("ImageLoadComplete")):(n++,200>n?setTimeout(r,100):s()))},s=function(){i&&(i.img.off(".mfploader"),i===e.currItem&&(e._onImageHasSize(i),e.updateStatus("error",a.tError.replace("%url%",i.src))),i.hasSize=!0,i.loaded=!0,i.loadError=!0)},a=e.st.image,l=o.find(".mfp-img");if(l.length){var c=document.createElement("img");c.className="mfp-img",i.img=t(c).on("load.mfploader",r).on("error.mfploader",s),c.src=i.src,l.is("img")&&(i.img=i.img.clone()),c=i.img[0],c.naturalWidth>0?i.hasSize=!0:c.width||(i.hasSize=!1)}return e._parseMarkup(o,{title:j(i),img_replaceWith:i.img},i),e.resizeImage(),i.hasSize?(A&&clearInterval(A),i.loadError?(o.addClass("mfp-loading"),e.updateStatus("error",a.tError.replace("%url%",i.src))):(o.removeClass("mfp-loading"),e.updateStatus("ready")),o):(e.updateStatus("loading"),i.loading=!0,i.hasSize||(i.imgHidden=!0,o.addClass("mfp-loading"),e.findImageSize(i)),o)}}});var R,W=function(){return void 0===R&&(R=void 0!==document.createElement("p").style.MozTransform),R};t.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(t){return t.is("img")?t:t.find("img")}},proto:{initZoom:function(){var t,i=e.st.zoom,o=".zoom";if(i.enabled&&e.supportsTransition){var n,r,s=i.duration,a=function(t){var e=t.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),o="all "+i.duration/1e3+"s "+i.easing,n={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},r="transition";return n["-webkit-"+r]=n["-moz-"+r]=n["-o-"+r]=n[r]=o,e.css(n),e},d=function(){e.content.css("visibility","visible")};k("BuildControls"+o,function(){if(e._allowZoom()){if(clearTimeout(n),e.content.css("visibility","hidden"),t=e._getItemToZoom(),!t)return void d();r=a(t),r.css(e._getOffset()),e.wrap.append(r),n=setTimeout(function(){r.css(e._getOffset(!0)),n=setTimeout(function(){d(),setTimeout(function(){r.remove(),t=r=null,I("ZoomAnimationEnded")},16)},s)},16)}}),k(c+o,function(){if(e._allowZoom()){if(clearTimeout(n),e.st.removalDelay=s,!t){if(t=e._getItemToZoom(),!t)return;r=a(t)}r.css(e._getOffset(!0)),e.wrap.append(r),e.content.css("visibility","hidden"),setTimeout(function(){r.css(e._getOffset())},16)}}),k(l+o,function(){e._allowZoom()&&(d(),r&&r.remove(),t=null)})}},_allowZoom:function(){return"image"===e.currItem.type},_getItemToZoom:function(){return e.currItem.hasSize?e.currItem.img:!1},_getOffset:function(i){var o;o=i?e.currItem.img:e.st.zoom.opener(e.currItem.el||e.currItem);var n=o.offset(),r=parseInt(o.css("padding-top"),10),s=parseInt(o.css("padding-bottom"),10);n.top-=t(window).scrollTop()-r;var a={width:o.width(),height:(C?o.innerHeight():o[0].offsetHeight)-s-r};return W()?a["-moz-transform"]=a.transform="translate("+n.left+"px,"+n.top+"px)":(a.left=n.left,a.top=n.top),a}}});var Y="iframe",D="//about:blank",X=function(t){if(e.currTemplate[Y]){var i=e.currTemplate[Y].find("iframe");i.length&&(t||(i[0].src=D),e.isIE8&&i.css("display",t?"block":"none"))}};t.magnificPopup.registerModule(Y,{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(){e.types.push(Y),k("BeforeChange",function(t,e,i){e!==i&&(e===Y?X():i===Y&&X(!0))}),k(l+"."+Y,function(){X()})},getIframe:function(i,o){var n=i.src,r=e.st.iframe;t.each(r.patterns,function(){return n.indexOf(this.index)>-1?(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):void 0});var s={};return r.srcAction&&(s[r.srcAction]=n),e._parseMarkup(o,s,i),e.updateStatus("ready"),o}}});var $=function(t){var i=e.items.length;return t>i-1?t-i:0>t?i+t:t},q=function(t,e,i){return t.replace(/%curr%/gi,e+1).replace(/%total%/gi,i)};t.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 i=e.st.gallery,o=".mfp-gallery",r=Boolean(t.fn.mfpFastClick);return e.direction=!0,i&&i.enabled?(s+=" mfp-gallery",k(f+o,function(){i.navigateByImgClick&&e.wrap.on("click"+o,".mfp-img",function(){return e.items.length>1?(e.next(),!1):void 0}),n.on("keydown"+o,function(t){37===t.keyCode?e.prev():39===t.keyCode&&e.next()})}),k("UpdateStatus"+o,function(t,i){i.text&&(i.text=q(i.text,e.currItem.index,e.items.length))}),k(u+o,function(t,o,n,r){var s=e.items.length;n.counter=s>1?q(i.tCounter,r.index,s):""}),k("BuildControls"+o,function(){if(e.items.length>1&&i.arrows&&!e.arrowLeft){var o=i.arrowMarkup,n=e.arrowLeft=t(o.replace(/%title%/gi,i.tPrev).replace(/%dir%/gi,"left")).addClass(w),s=e.arrowRight=t(o.replace(/%title%/gi,i.tNext).replace(/%dir%/gi,"right")).addClass(w),a=r?"mfpFastClick":"click";n[a](function(){e.prev()}),s[a](function(){e.next()}),e.isIE7&&(x("b",n[0],!1,!0),x("a",n[0],!1,!0),x("b",s[0],!1,!0),x("a",s[0],!1,!0)),e.container.append(n.add(s))}}),k(m+o,function(){e._preloadTimeout&&clearTimeout(e._preloadTimeout),e._preloadTimeout=setTimeout(function(){e.preloadNearbyImages(),e._preloadTimeout=null},16)}),void k(l+o,function(){n.off(o),e.wrap.off("click"+o),e.arrowLeft&&r&&e.arrowLeft.add(e.arrowRight).destroyMfpFastClick(),e.arrowRight=e.arrowLeft=null})):!1},next:function(){e.direction=!0,e.index=$(e.index+1),e.updateItemHTML()},prev:function(){e.direction=!1,e.index=$(e.index-1),e.updateItemHTML()},goTo:function(t){e.direction=t>=e.index,e.index=t,e.updateItemHTML()},preloadNearbyImages:function(){var t,i=e.st.gallery.preload,o=Math.min(i[0],e.items.length),n=Math.min(i[1],e.items.length);for(t=1;t<=(e.direction?n:o);t++)e._preloadItem(e.index+t);for(t=1;t<=(e.direction?o:n);t++)e._preloadItem(e.index-t)},_preloadItem:function(i){if(i=$(i),!e.items[i].preloaded){var o=e.items[i];o.parsed||(o=e.parseEl(i)),I("LazyLoad",o),"image"===o.type&&(o.img=t('<img class="mfp-img" />').on("load.mfploader",function(){o.hasSize=!0}).on("error.mfploader",function(){o.hasSize=!0,o.loadError=!0,I("LazyLoadError",o)}).attr("src",o.src)),o.preloaded=!0}}}});var Z="retina";t.magnificPopup.registerModule(Z,{options:{replaceSrc:function(t){return t.src.replace(/\.\w+$/,function(t){return"@2x"+t})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var t=e.st.retina,i=t.ratio;i=isNaN(i)?i():i,i>1&&(k("ImageHasSize."+Z,function(t,e){e.img.css({"max-width":e.img[0].naturalWidth/i,width:"100%"})}),k("ElementParse."+Z,function(e,o){o.src=t.replaceSrc(o,i)}))}}}}),function(){var e=1e3,i="ontouchstart"in window,o=function(){S.off("touchmove"+r+" touchend"+r)},n="mfpFastClick",r="."+n;t.fn.mfpFastClick=function(n){return t(this).each(function(){var s,a=t(this);if(i){var l,c,d,p,u,f;a.on("touchstart"+r,function(t){p=!1,f=1,u=t.originalEvent?t.originalEvent.touches[0]:t.touches[0],c=u.clientX,d=u.clientY,S.on("touchmove"+r,function(t){u=t.originalEvent?t.originalEvent.touches:t.touches,f=u.length,u=u[0],(Math.abs(u.clientX-c)>10||Math.abs(u.clientY-d)>10)&&(p=!0,o())}).on("touchend"+r,function(t){o(),p||f>1||(s=!0,t.preventDefault(),clearTimeout(l),l=setTimeout(function(){s=!1},e),n())})})}a.on("click"+r,function(){s||n()})})},t.fn.destroyMfpFastClick=function(){t(this).off("touchstart"+r+" click"+r),i&&S.off("touchmove"+r+" touchend"+r)}}(),T()}(window.jQuery||window.Zepto),!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(t){var e="1.7.2",i={},o={exclude:[],excludeWithin:[],offset:0,direction:"top",delegateSelector:null,scrollElement:null,scrollTarget:null,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficient:2,preventDefault:!0},n=function(e){var i=[],o=!1,n=e.dir&&"left"===e.dir?"scrollLeft":"scrollTop";return this.each(function(){var e=t(this);return this!==document&&this!==window?!document.scrollingElement||this!==document.documentElement&&this!==document.body?void(e[n]()>0?i.push(this):(e[n](1),o=e[n]()>0,o&&i.push(this),e[n](0))):(i.push(document.scrollingElement),!1):void 0}),i.length||this.each(function(){this===document.documentElement&&"smooth"===t(this).css("scrollBehavior")&&(i=[this]),i.length||"BODY"!==this.nodeName||(i=[this])}),"first"===e.el&&i.length>1&&(i=[i[0]]),i};t.fn.extend({scrollable:function(t){var e=n.call(this,{dir:t});return this.pushStack(e)},firstScrollable:function(t){var e=n.call(this,{el:"first",dir:t});return this.pushStack(e)},smoothScroll:function(e,i){if(e=e||{},"options"===e)return i?this.each(function(){var e=t(this),o=t.extend(e.data("ssOpts")||{},i);t(this).data("ssOpts",o)}):this.first().data("ssOpts");var o=t.extend({},t.fn.smoothScroll.defaults,e),n=function(e){var i=function(t){return t.replace(/(:|\.|\/)/g,"\\$1")},n=this,r=t(this),s=t.extend({},o,r.data("ssOpts")||{}),a=o.exclude,l=s.excludeWithin,c=0,d=0,p=!0,u={},f=t.smoothScroll.filterPath(location.pathname),m=t.smoothScroll.filterPath(n.pathname),h=location.hostname===n.hostname||!n.hostname,g=s.scrollTarget||m===f,v=i(n.hash);if(v&&!t(v).length&&(p=!1),s.scrollTarget||h&&g&&v){for(;p&&c<a.length;)r.is(i(a[c++]))&&(p=!1);for(;p&&d<l.length;)r.closest(l[d++]).length&&(p=!1)}else p=!1;p&&(s.preventDefault&&e.preventDefault(),t.extend(u,s,{scrollTarget:s.scrollTarget||v,link:n}),t.smoothScroll(u))};return null!==e.delegateSelector?this.undelegate(e.delegateSelector,"click.smoothscroll").delegate(e.delegateSelector,"click.smoothscroll",n):this.unbind("click.smoothscroll").bind("click.smoothscroll",n),this}}),t.smoothScroll=function(e,o){if("options"===e&&"object"==typeof o)return t.extend(i,o);var n,r,s,a,l,c=0,d="offset",p="scrollTop",u={},f={};"number"==typeof e?(n=t.extend({link:null},t.fn.smoothScroll.defaults,i),s=e):(n=t.extend({link:null},t.fn.smoothScroll.defaults,e||{},i),n.scrollElement&&(d="position","static"===n.scrollElement.css("position")&&n.scrollElement.css("position","relative"))),p="left"===n.direction?"scrollLeft":p,n.scrollElement?(r=n.scrollElement,/^(?:HTML|BODY)$/.test(r[0].nodeName)||(c=r[p]())):r=t("html, body").firstScrollable(n.direction),n.beforeScroll.call(r,n),s="number"==typeof e?e:o||t(n.scrollTarget)[d]()&&t(n.scrollTarget)[d]()[n.direction]||0,u[p]=s+c+n.offset,a=n.speed,"auto"===a&&(l=Math.abs(u[p]-r[p]()),a=l/n.autoCoefficient),f={duration:a,easing:n.easing,complete:function(){n.afterScroll.call(n.link,n)}},n.step&&(f.step=n.step),r.length?r.stop().animate(u,f):n.afterScroll.call(n.link,n)},t.smoothScroll.version=e,t.smoothScroll.filterPath=function(t){return t=t||"",t.replace(/^\//,"").replace(/(?:index|default).[a-zA-Z]{3,4}$/,"").replace(/\/$/,"")},t.fn.smoothScroll.defaults=o}),!function(t,e){function i(){x=_=I=E=T=O=H}function o(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])}function n(t){return parseFloat(t)||0}function r(){L={top:e.pageYOffset,left:e.pageXOffset}}function s(){return e.pageXOffset!=L.left?(r(),void I()):void(e.pageYOffset!=L.top&&(r(),l()))}function a(){setTimeout(function(){e.pageYOffset!=L.top&&(L.top=e.pageYOffset,l())},0)}function l(){for(var t=M.length-1;t>=0;t--)c(M[t])}function c(t){if(t.inited){var e=L.top<=t.limit.start?0:L.top>=t.limit.end?2:1;t.mode!=e&&h(t,e)}}function d(){for(var t=M.length-1;t>=0;t--)if(M[t].inited){var e=Math.abs(w(M[t].clone)-M[t].docOffsetTop),i=Math.abs(M[t].parent.node.offsetHeight-M[t].parent.height);if(e>=2||i>=2)return!1}return!0}function p(t){isNaN(parseFloat(t.computed.top))||t.isCell||"none"==t.computed.display||(t.inited=!0,t.clone||g(t),"absolute"!=t.parent.computed.position&&"relative"!=t.parent.computed.position&&(t.parent.node.style.position="relative"),c(t),t.parent.height=t.parent.node.offsetHeight,t.docOffsetTop=w(t.clone))}function u(t){var e=!0;t.clone&&v(t),o(t.node.style,t.css);for(var i=M.length-1;i>=0;i--)if(M[i].node!==t.node&&M[i].parent.node===t.parent.node){e=!1;break}e&&(t.parent.node.style.position=t.parent.css.position),t.mode=-1}function f(){for(var t=M.length-1;t>=0;t--)p(M[t])}function m(){for(var t=M.length-1;t>=0;t--)u(M[t])}function h(t,e){var i=t.node.style;switch(e){case 0:i.position="absolute",i.left=t.offset.left+"px",i.right=t.offset.right+"px",i.top=t.offset.top+"px",i.bottom="auto",i.width="auto",i.marginLeft=0,i.marginRight=0,i.marginTop=0;break;case 1:i.position="fixed",i.left=t.box.left+"px",i.right=t.box.right+"px",i.top=t.css.top,i.bottom="auto",i.width="auto",i.marginLeft=0,i.marginRight=0,i.marginTop=0;break;case 2:i.position="absolute",i.left=t.offset.left+"px",i.right=t.offset.right+"px",i.top="auto",i.bottom=0,i.width="auto",i.marginLeft=0,i.marginRight=0}t.mode=e}function g(t){t.clone=document.createElement("div");var e=t.node.nextSibling||t.node,i=t.clone.style;i.height=t.height+"px",i.width=t.width+"px",i.marginTop=t.computed.marginTop,i.marginBottom=t.computed.marginBottom,i.marginLeft=t.computed.marginLeft,i.marginRight=t.computed.marginRight,i.padding=i.border=i.borderSpacing=0,i.fontSize="1em",i.position="static",i.cssFloat=t.computed.cssFloat,t.node.parentNode.insertBefore(t.clone,e)}function v(t){t.clone.parentNode.removeChild(t.clone),t.clone=void 0}function y(t){var e=getComputedStyle(t),i=t.parentNode,o=getComputedStyle(i),r=t.style.position;t.style.position="relative";var s={top:e.top,marginTop:e.marginTop,marginBottom:e.marginBottom,marginLeft:e.marginLeft,marginRight:e.marginRight,cssFloat:e.cssFloat,display:e.display},a={top:n(e.top),marginBottom:n(e.marginBottom),paddingLeft:n(e.paddingLeft),paddingRight:n(e.paddingRight),borderLeftWidth:n(e.borderLeftWidth),borderRightWidth:n(e.borderRightWidth)};t.style.position=r;var l={position:t.style.position,top:t.style.top,bottom:t.style.bottom,left:t.style.left,right:t.style.right,width:t.style.width,marginTop:t.style.marginTop,marginLeft:t.style.marginLeft,marginRight:t.style.marginRight},c=b(t),d=b(i),p={node:i,css:{position:i.style.position},computed:{position:o.position},numeric:{borderLeftWidth:n(o.borderLeftWidth),borderRightWidth:n(o.borderRightWidth),borderTopWidth:n(o.borderTopWidth),borderBottomWidth:n(o.borderBottomWidth)}},u={node:t,box:{left:c.win.left,right:B.clientWidth-c.win.right},offset:{top:c.win.top-d.win.top-p.numeric.borderTopWidth,left:c.win.left-d.win.left-p.numeric.borderLeftWidth,right:-c.win.right+d.win.right-p.numeric.borderRightWidth},css:l,isCell:"table-cell"==e.display,computed:s,numeric:a,width:c.win.right-c.win.left,height:c.win.bottom-c.win.top,mode:-1,inited:!1,parent:p,limit:{start:c.doc.top-a.top,end:d.doc.top+i.offsetHeight-p.numeric.borderBottomWidth-t.offsetHeight-a.top-a.marginBottom}};return u}function w(t){for(var e=0;t;)e+=t.offsetTop,t=t.offsetParent;return e}function b(t){var i=t.getBoundingClientRect();return{doc:{top:i.top+e.pageYOffset,left:i.left+e.pageXOffset},win:i}}function C(){z=setInterval(function(){!d()&&I()},500)}function S(){clearInterval(z)}function k(){F&&(document[N]?S():C())}function x(){F||(r(),f(),e.addEventListener("scroll",s),e.addEventListener("wheel",a),e.addEventListener("resize",I),e.addEventListener("orientationchange",I),t.addEventListener(A,k),C(),F=!0)}function I(){if(F){m();for(var t=M.length-1;t>=0;t--)M[t]=y(M[t].node);f()}}function E(){e.removeEventListener("scroll",s),e.removeEventListener("wheel",a),e.removeEventListener("resize",I),e.removeEventListener("orientationchange",I),t.removeEventListener(A,k),S(),F=!1}function T(){E(),m()}function O(){for(T();M.length;)M.pop()}function _(t){for(var e=M.length-1;e>=0;e--)if(M[e].node===t)return;var i=y(t);M.push(i),F?p(i):x()}function P(t){for(var e=M.length-1;e>=0;e--)M[e].node===t&&(u(M[e]),M.splice(e,1))}var L,z,M=[],F=!1,B=t.documentElement,H=function(){},N="hidden",A="visibilitychange";void 0!==t.webkitHidden&&(N="webkitHidden",A="webkitvisibilitychange"),e.getComputedStyle||i();for(var j=["","-webkit-","-moz-","-ms-"],R=document.createElement("div"),W=j.length-1;W>=0;W--){try{R.style.position=j[W]+"sticky"}catch(Y){}""!=R.style.position&&i()}r(),e.Stickyfill={stickies:M,add:_,remove:P,init:x,rebuild:I,pause:E,stop:T,kill:O}}(document,window),window.jQuery&&!function(t){t.fn.Stickyfill=function(){return this.each(function(){
Stickyfill.add(this)}),this}}(window.jQuery);