From 55843c5dca8fcf5ff83e48ace202fc529d58ae14 Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Thu, 5 Jan 2017 11:48:37 -0500 Subject: [PATCH] Remove `position: sticky` JavaScript polyfill - Fallback to default positioning for browser that don't support it IE, Chrome < 56, etc. - Issue #752 --- README.md | 1 - assets/js/_main.js | 28 ------------------------ assets/js/main.min.js | 9 ++++---- assets/js/plugins/stickyfill.min.js | 8 ------- docs/_docs/17-javascript.md | 3 +-- docs/_pages/about.md | 3 +-- docs/assets/js/_main.js | 28 ------------------------ docs/assets/js/main.min.js | 9 ++++---- docs/assets/js/plugins/stickyfill.min.js | 8 ------- package.json | 2 +- 10 files changed, 11 insertions(+), 88 deletions(-) delete mode 100644 assets/js/plugins/stickyfill.min.js delete mode 100644 docs/assets/js/plugins/stickyfill.min.js diff --git a/README.md b/README.md index 84f7d316..f73ee959 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,6 @@ To test the theme, run `bundle exec rake preview` and open your browser at `http - [FitVids.JS](http://fitvidsjs.com/) - Greedy Navigation - [lukejacksonn](http://codepen.io/lukejacksonn/pen/PwmwWV) - [jQuery Smooth Scroll](https://github.com/kswedberg/jquery-smooth-scroll) -- [Stickyfill](https://github.com/wilddeer/stickyfill) --- diff --git a/assets/js/_main.js b/assets/js/_main.js index 4f71a5dd..731fdaf6 100644 --- a/assets/js/_main.js +++ b/assets/js/_main.js @@ -25,35 +25,7 @@ $(document).ready(function(){ // FitVids init $("#main").fitVids(); - // init sticky sidebar - $(".sticky").Stickyfill(); - - var stickySideBar = function(){ - var show = $(".author__urls-wrapper button").length === 0 ? $(window).width() > 1024 : !$(".author__urls-wrapper button").is(":visible"); - // console.log("has button: " + $(".author__urls-wrapper button").length === 0); - // console.log("Window Width: " + windowWidth); - // console.log("show: " + show); - //old code was if($(window).width() > 1024) - if (show) { - // fix - Stickyfill.rebuild(); - Stickyfill.init(); - $(".author__urls").show(); - } else { - // unfix - Stickyfill.stop(); - $(".author__urls").hide(); - } - }; - - stickySideBar(); - - $(window).resize(function(){ - stickySideBar(); - }); - // Follow menu drop down - $(".author__urls-wrapper button").on("click", function() { $(".author__urls").fadeToggle("fast", function() {}); $(".author__urls-wrapper button").toggleClass("open"); diff --git a/assets/js/main.min.js b/assets/js/main.min.js index 7c4f130e..442e97b9 100644 --- a/assets/js/main.min.js +++ b/assets/js/main.min.js @@ -1,5 +1,4 @@ -function updateNav(){var e=$btn.hasClass("hidden")?$nav.width():$nav.width()-$btn.width()-30;$vlinks.width()>e?(breaks.push($vlinks.width()),$vlinks.children().last().prependTo($hlinks),$btn.hasClass("hidden")&&$btn.removeClass("hidden")):(e>breaks[breaks.length-1]&&($hlinks.children().first().appendTo($vlinks),breaks.pop()),breaks.length<1&&($btn.addClass("hidden"),$hlinks.addClass("hidden"))),$btn.attr("count",breaks.length),$vlinks.width()>e&&updateNav()}!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=!!e&&"length"in e&&e.length,n=pe.type(e);return"function"===n||pe.isWindow(e)?!1:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function i(e,t,n){if(pe.isFunction(t))return pe.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return pe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Te.test(t))return pe.filter(t,e,n);t=pe.filter(t,e)}return pe.grep(e,function(e){return pe.inArray(e,t)>-1!==n})}function r(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t={};return pe.each(e.match(Ae)||[],function(e,n){t[n]=!0}),t}function a(){ie.addEventListener?(ie.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s)):(ie.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(ie.addEventListener||"load"===e.event.type||"complete"===ie.readyState)&&(a(),pe.ready())}function l(e,t,n){if(void 0===n&&1===e.nodeType){var i="data-"+t.replace(He,"-$1").toLowerCase();if(n=e.getAttribute(i),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:De.test(n)?pe.parseJSON(n):n}catch(r){}pe.data(e,t,n)}else n=void 0}return n}function u(e){var t;for(t in e)if(("data"!==t||!pe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,i){if(Ie(e)){var r,o,a=pe.expando,s=e.nodeType,l=s?pe.cache:e,u=s?e[a]:e[a]&&a;if(u&&l[u]&&(i||l[u].data)||void 0!==n||"string"!=typeof t)return u||(u=s?e[a]=ne.pop()||pe.guid++:a),l[u]||(l[u]=s?{}:{toJSON:pe.noop}),"object"!=typeof t&&"function"!=typeof t||(i?l[u]=pe.extend(l[u],t):l[u].data=pe.extend(l[u].data,t)),o=l[u],i||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[pe.camelCase(t)]=n),"string"==typeof t?(r=o[t],null==r&&(r=o[pe.camelCase(t)])):r=o,r}}function d(e,t,n){if(Ie(e)){var i,r,o=e.nodeType,a=o?pe.cache:e,s=o?e[pe.expando]:pe.expando;if(a[s]){if(t&&(i=n?a[s]:a[s].data)){pe.isArray(t)?t=t.concat(pe.map(t,pe.camelCase)):t in i?t=[t]:(t=pe.camelCase(t),t=t in i?[t]:t.split(" ")),r=t.length;for(;r--;)delete i[t[r]];if(n?!u(i):!pe.isEmptyObject(i))return}(n||(delete a[s].data,u(a[s])))&&(o?pe.cleanData([e],!0):de.deleteExpando||a!=a.window?delete a[s]:a[s]=void 0)}}}function f(e,t,n,i){var r,o=1,a=20,s=i?function(){return i.cur()}:function(){return pe.css(e,t,"")},l=s(),u=n&&n[3]||(pe.cssNumber[t]?"":"px"),c=(pe.cssNumber[t]||"px"!==u&&+l)&&Me.exec(pe.css(e,t));if(c&&c[3]!==u){u=u||c[3],n=n||[],c=+l||1;do o=o||".5",c/=o,pe.style(e,t,c+u);while(o!==(o=s()/l)&&1!==o&&--a)}return n&&(c=+c||+l||0,r=n[1]?c+(n[1]+1)*n[2]:+n[2],i&&(i.unit=u,i.start=c,i.end=r)),r}function p(e){var t=We.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){var n,i,r=0,o="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(i=n[r]);r++)!t||pe.nodeName(i,t)?o.push(i):pe.merge(o,h(i,t));return void 0===t||t&&pe.nodeName(e,t)?pe.merge([e],o):o}function m(e,t){for(var n,i=0;null!=(n=e[i]);i++)pe._data(n,"globalEval",!t||pe._data(t[i],"globalEval"))}function g(e){qe.test(e.type)&&(e.defaultChecked=e.checked)}function v(e,t,n,i,r){for(var o,a,s,l,u,c,d,f=e.length,v=p(t),y=[],b=0;f>b;b++)if(a=e[b],a||0===a)if("object"===pe.type(a))pe.merge(y,a.nodeType?[a]:a);else if(Ye.test(a)){for(l=l||v.appendChild(t.createElement("div")),u=($e.exec(a)||["",""])[1].toLowerCase(),d=Xe[u]||Xe._default,l.innerHTML=d[1]+pe.htmlPrefilter(a)+d[2],o=d[0];o--;)l=l.lastChild;if(!de.leadingWhitespace&&Re.test(a)&&y.push(t.createTextNode(Re.exec(a)[0])),!de.tbody)for(a="table"!==u||Ue.test(a)?""!==d[1]||Ue.test(a)?0:l:l.firstChild,o=a&&a.childNodes.length;o--;)pe.nodeName(c=a.childNodes[o],"tbody")&&!c.childNodes.length&&a.removeChild(c);for(pe.merge(y,l.childNodes),l.textContent="";l.firstChild;)l.removeChild(l.firstChild);l=v.lastChild}else y.push(t.createTextNode(a));for(l&&v.removeChild(l),de.appendChecked||pe.grep(h(y,"input"),g),b=0;a=y[b++];)if(i&&pe.inArray(a,i)>-1)r&&r.push(a);else if(s=pe.contains(a.ownerDocument,a),l=h(v.appendChild(a),"script"),s&&m(l),n)for(o=0;a=l[o++];)ze.test(a.type||"")&&n.push(a);return l=null,v}function y(){return!0}function b(){return!1}function x(){try{return ie.activeElement}catch(e){}}function w(e,t,n,i,r,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(i=i||n,n=void 0);for(s in t)w(e,s,n,i,t[s],o);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),r===!1)r=b;else if(!r)return e;return 1===o&&(a=r,r=function(e){return pe().off(e),a.apply(this,arguments)},r.guid=a.guid||(a.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,r,i,n)})}function C(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function T(e){return e.type=(null!==pe.find.attr(e,"type"))+"/"+e.type,e}function k(e){var t=rt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function E(e,t){if(1===t.nodeType&&pe.hasData(e)){var n,i,r,o=pe._data(e),a=pe._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(i=0,r=s[n].length;r>i;i++)pe.event.add(t,n,s[n][i])}a.data&&(a.data=pe.extend({},a.data))}}function S(e,t){var n,i,r;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!de.noCloneEvent&&t[pe.expando]){r=pe._data(t);for(i in r.events)pe.removeEvent(t,i,r.handle);t.removeAttribute(pe.expando)}"script"===n&&t.text!==e.text?(T(t).text=e.text,k(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),de.html5Clone&&e.innerHTML&&!pe.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&qe.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}}function N(e,t,n,i){t=oe.apply([],t);var r,o,a,s,l,u,c=0,d=e.length,f=d-1,p=t[0],m=pe.isFunction(p);if(m||d>1&&"string"==typeof p&&!de.checkClone&&it.test(p))return e.each(function(r){var o=e.eq(r);m&&(t[0]=p.call(this,r,o.html())),N(o,t,n,i)});if(d&&(u=v(t,e[0].ownerDocument,!1,e,i),r=u.firstChild,1===u.childNodes.length&&(u=r),r||i)){for(s=pe.map(h(u,"script"),T),a=s.length;d>c;c++)o=u,c!==f&&(o=pe.clone(o,!0,!0),a&&pe.merge(s,h(o,"script"))),n.call(e[c],o,c);if(a)for(l=s[s.length-1].ownerDocument,pe.map(s,k),c=0;a>c;c++)o=s[c],ze.test(o.type||"")&&!pe._data(o,"globalEval")&&pe.contains(l,o)&&(o.src?pe._evalUrl&&pe._evalUrl(o.src):pe.globalEval((o.text||o.textContent||o.innerHTML||"").replace(ot,"")));u=r=null}return e}function L(e,t,n){for(var i,r=t?pe.filter(t,e):e,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||pe.cleanData(h(i)),i.parentNode&&(n&&pe.contains(i.ownerDocument,i)&&m(h(i,"script")),i.parentNode.removeChild(i));return e}function A(e,t){var n=pe(t.createElement(e)).appendTo(t.body),i=pe.css(n[0],"display");return n.detach(),i}function j(e){var t=ie,n=ut[e];return n||(n=A(e,t),"none"!==n&&n||(lt=(lt||pe("',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(){t.types.push(z),T("BeforeChange",function(e,t,n){t!==n&&(t===z?W():n===z&&W(!0))}),T(l+"."+z,function(){W()})},getIframe:function(n,i){var r=n.src,o=t.st.iframe;e.each(o.patterns,function(){return r.indexOf(this.index)>-1?(this.id&&(r="string"==typeof this.id?r.substr(r.lastIndexOf(this.id)+this.id.length,r.length):this.id.call(this,r)),r=this.src.replace("%id%",r),!1):void 0});var a={};return o.srcAction&&(a[o.srcAction]=r),t._parseMarkup(i,a,n),t.updateStatus("ready"),i}}});var X=function(e){var n=t.items.length;return e>n-1?e-n:0>e?n+e:e},Y=function(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'',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 n=t.st.gallery,i=".mfp-gallery",o=Boolean(e.fn.mfpFastClick);return t.direction=!0,n&&n.enabled?(a+=" mfp-gallery",T(p+i,function(){n.navigateByImgClick&&t.wrap.on("click"+i,".mfp-img",function(){return t.items.length>1?(t.next(),!1):void 0}),r.on("keydown"+i,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),T("UpdateStatus"+i,function(e,n){n.text&&(n.text=Y(n.text,t.currItem.index,t.items.length))}),T(f+i,function(e,i,r,o){var a=t.items.length;r.counter=a>1?Y(n.tCounter,o.index,a):""}),T("BuildControls"+i,function(){if(t.items.length>1&&n.arrows&&!t.arrowLeft){var i=n.arrowMarkup,r=t.arrowLeft=e(i.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass(b),a=t.arrowRight=e(i.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(b),s=o?"mfpFastClick":"click";r[s](function(){t.prev()}),a[s](function(){t.next()}),t.isIE7&&(k("b",r[0],!1,!0),k("a",r[0],!1,!0),k("b",a[0],!1,!0),k("a",a[0],!1,!0)),t.container.append(r.add(a))}}),T(h+i,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),void T(l+i,function(){r.off(i),t.wrap.off("click"+i),t.arrowLeft&&o&&t.arrowLeft.add(t.arrowRight).destroyMfpFastClick(),t.arrowRight=t.arrowLeft=null})):!1},next:function(){t.direction=!0,t.index=X(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=X(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,n=t.st.gallery.preload,i=Math.min(n[0],t.items.length),r=Math.min(n[1],t.items.length);for(e=1;e<=(t.direction?r:i);e++)t._preloadItem(t.index+e);for(e=1;e<=(t.direction?i:r);e++)t._preloadItem(t.index-e)},_preloadItem:function(n){if(n=X(n),!t.items[n].preloaded){var i=t.items[n];i.parsed||(i=t.parseEl(n)),E("LazyLoad",i),"image"===i.type&&(i.img=e('').on("load.mfploader",function(){i.hasSize=!0}).on("error.mfploader",function(){i.hasSize=!0,i.loadError=!0,E("LazyLoadError",i)}).attr("src",i.src)),i.preloaded=!0}}}});var U="retina";e.magnificPopup.registerModule(U,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,n=e.ratio;n=isNaN(n)?n():n,n>1&&(T("ImageHasSize."+U,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"})}),T("ElementParse."+U,function(t,i){i.src=e.replaceSrc(i,n)}))}}}}),function(){var t=1e3,n="ontouchstart"in window,i=function(){C.off("touchmove"+o+" touchend"+o)},r="mfpFastClick",o="."+r;e.fn.mfpFastClick=function(r){return e(this).each(function(){var a,s=e(this);if(n){var l,u,c,d,f,p;s.on("touchstart"+o,function(e){d=!1,p=1,f=e.originalEvent?e.originalEvent.touches[0]:e.touches[0],u=f.clientX,c=f.clientY,C.on("touchmove"+o,function(e){f=e.originalEvent?e.originalEvent.touches:e.touches,p=f.length,f=f[0],(Math.abs(f.clientX-u)>10||Math.abs(f.clientY-c)>10)&&(d=!0,i())}).on("touchend"+o,function(e){i(),d||p>1||(a=!0,e.preventDefault(),clearTimeout(l),l=setTimeout(function(){a=!1},t),r())})})}s.on("click"+o,function(){a||r()})})},e.fn.destroyMfpFastClick=function(){e(this).off("touchstart"+o+" click"+o),n&&C.off("touchmove"+o+" touchend"+o)}}(),N()}(window.jQuery||window.Zepto),!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(e){var t="1.7.2",n={},i={exclude:[],excludeWithin:[],offset:0,direction:"top",delegateSelector:null,scrollElement:null,scrollTarget:null,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficient:2,preventDefault:!0},r=function(t){var n=[],i=!1,r=t.dir&&"left"===t.dir?"scrollLeft":"scrollTop";return this.each(function(){var t=e(this);return this!==document&&this!==window?!document.scrollingElement||this!==document.documentElement&&this!==document.body?void(t[r]()>0?n.push(this):(t[r](1),i=t[r]()>0,i&&n.push(this),t[r](0))):(n.push(document.scrollingElement),!1):void 0}),n.length||this.each(function(){this===document.documentElement&&"smooth"===e(this).css("scrollBehavior")&&(n=[this]),n.length||"BODY"!==this.nodeName||(n=[this])}),"first"===t.el&&n.length>1&&(n=[n[0]]),n};e.fn.extend({scrollable:function(e){var t=r.call(this,{dir:e});return this.pushStack(t)},firstScrollable:function(e){var t=r.call(this,{el:"first",dir:e});return this.pushStack(t)},smoothScroll:function(t,n){if(t=t||{},"options"===t)return n?this.each(function(){var t=e(this),i=e.extend(t.data("ssOpts")||{},n);e(this).data("ssOpts",i)}):this.first().data("ssOpts");var i=e.extend({},e.fn.smoothScroll.defaults,t),r=function(t){var n=function(e){return e.replace(/(:|\.|\/)/g,"\\$1")},r=this,o=e(this),a=e.extend({},i,o.data("ssOpts")||{}),s=i.exclude,l=a.excludeWithin,u=0,c=0,d=!0,f={},p=e.smoothScroll.filterPath(location.pathname),h=e.smoothScroll.filterPath(r.pathname),m=location.hostname===r.hostname||!r.hostname,g=a.scrollTarget||h===p,v=n(r.hash);if(v&&!e(v).length&&(d=!1),a.scrollTarget||m&&g&&v){for(;d&&u=0;e--)u(D[e])}function u(e){if(e.inited){var t=_.top<=e.limit.start?0:_.top>=e.limit.end?2:1;e.mode!=t&&m(e,t)}}function c(){for(var e=D.length-1;e>=0;e--)if(D[e].inited){var t=Math.abs(b(D[e].clone)-D[e].docOffsetTop),n=Math.abs(D[e].parent.node.offsetHeight-D[e].parent.height);if(t>=2||n>=2)return!1}return!0}function d(e){isNaN(parseFloat(e.computed.top))||e.isCell||"none"==e.computed.display||(e.inited=!0,e.clone||g(e),"absolute"!=e.parent.computed.position&&"relative"!=e.parent.computed.position&&(e.parent.node.style.position="relative"),u(e),e.parent.height=e.parent.node.offsetHeight,e.docOffsetTop=b(e.clone))}function f(e){var t=!0;e.clone&&v(e),i(e.node.style,e.css);for(var n=D.length-1;n>=0;n--)if(D[n].node!==e.node&&D[n].parent.node===e.parent.node){t=!1;break}t&&(e.parent.node.style.position=e.parent.css.position),e.mode=-1}function p(){for(var e=D.length-1;e>=0;e--)d(D[e])}function h(){for(var e=D.length-1;e>=0;e--)f(D[e])}function m(e,t){var n=e.node.style;switch(t){case 0:n.position="absolute",n.left=e.offset.left+"px",n.right=e.offset.right+"px",n.top=e.offset.top+"px",n.bottom="auto",n.width="auto",n.marginLeft=0,n.marginRight=0,n.marginTop=0;break;case 1:n.position="fixed",n.left=e.box.left+"px",n.right=e.box.right+"px",n.top=e.css.top,n.bottom="auto",n.width="auto",n.marginLeft=0,n.marginRight=0,n.marginTop=0;break;case 2:n.position="absolute",n.left=e.offset.left+"px",n.right=e.offset.right+"px",n.top="auto",n.bottom=0,n.width="auto",n.marginLeft=0,n.marginRight=0}e.mode=t}function g(e){e.clone=document.createElement("div");var t=e.node.nextSibling||e.node,n=e.clone.style;n.height=e.height+"px",n.width=e.width+"px",n.marginTop=e.computed.marginTop,n.marginBottom=e.computed.marginBottom,n.marginLeft=e.computed.marginLeft,n.marginRight=e.computed.marginRight,n.padding=n.border=n.borderSpacing=0,n.fontSize="1em",n.position="static",n.cssFloat=e.computed.cssFloat,e.node.parentNode.insertBefore(e.clone,t)}function v(e){e.clone.parentNode.removeChild(e.clone),e.clone=void 0}function y(e){var t=getComputedStyle(e),n=e.parentNode,i=getComputedStyle(n),o=e.style.position;e.style.position="relative";var a={top:t.top,marginTop:t.marginTop,marginBottom:t.marginBottom,marginLeft:t.marginLeft,marginRight:t.marginRight,cssFloat:t.cssFloat,display:t.display},s={top:r(t.top),marginBottom:r(t.marginBottom),paddingLeft:r(t.paddingLeft),paddingRight:r(t.paddingRight),borderLeftWidth:r(t.borderLeftWidth),borderRightWidth:r(t.borderRightWidth)};e.style.position=o;var l={position:e.style.position,top:e.style.top,bottom:e.style.bottom,left:e.style.left,right:e.style.right,width:e.style.width,marginTop:e.style.marginTop,marginLeft:e.style.marginLeft,marginRight:e.style.marginRight},u=x(e),c=x(n),d={node:n,css:{position:n.style.position},computed:{position:i.position},numeric:{borderLeftWidth:r(i.borderLeftWidth),borderRightWidth:r(i.borderRightWidth),borderTopWidth:r(i.borderTopWidth),borderBottomWidth:r(i.borderBottomWidth)}},f={node:e,box:{left:u.win.left,right:O.clientWidth-u.win.right},offset:{top:u.win.top-c.win.top-d.numeric.borderTopWidth,left:u.win.left-c.win.left-d.numeric.borderLeftWidth,right:-u.win.right+c.win.right-d.numeric.borderRightWidth -},css:l,isCell:"table-cell"==t.display,computed:a,numeric:s,width:u.win.right-u.win.left,height:u.win.bottom-u.win.top,mode:-1,inited:!1,parent:d,limit:{start:u.doc.top-s.top,end:c.doc.top+n.offsetHeight-d.numeric.borderBottomWidth-e.offsetHeight-s.top-s.marginBottom}};return f}function b(e){for(var t=0;e;)t+=e.offsetTop,e=e.offsetParent;return t}function x(e){var n=e.getBoundingClientRect();return{doc:{top:n.top+t.pageYOffset,left:n.left+t.pageXOffset},win:n}}function w(){I=setInterval(function(){!c()&&E()},500)}function C(){clearInterval(I)}function T(){H&&(document[P]?C():w())}function k(){H||(o(),p(),t.addEventListener("scroll",a),t.addEventListener("wheel",s),t.addEventListener("resize",E),t.addEventListener("orientationchange",E),e.addEventListener(B,T),w(),H=!0)}function E(){if(H){h();for(var e=D.length-1;e>=0;e--)D[e]=y(D[e].node);p()}}function S(){t.removeEventListener("scroll",a),t.removeEventListener("wheel",s),t.removeEventListener("resize",E),t.removeEventListener("orientationchange",E),e.removeEventListener(B,T),C(),H=!1}function N(){S(),h()}function L(){for(N();D.length;)D.pop()}function A(e){for(var t=D.length-1;t>=0;t--)if(D[t].node===e)return;var n=y(e);D.push(n),H?d(n):k()}function j(e){for(var t=D.length-1;t>=0;t--)D[t].node===e&&(f(D[t]),D.splice(t,1))}var _,I,D=[],H=!1,O=e.documentElement,M=function(){},P="hidden",B="visibilitychange";void 0!==e.webkitHidden&&(P="webkitHidden",B="webkitvisibilitychange"),t.getComputedStyle||n();for(var F=["","-webkit-","-moz-","-ms-"],q=document.createElement("div"),$=F.length-1;$>=0;$--){try{q.style.position=F[$]+"sticky"}catch(z){}""!=q.style.position&&n()}o(),t.Stickyfill={stickies:D,add:A,remove:j,init:k,rebuild:E,pause:S,stop:N,kill:L}}(document,window),window.jQuery&&!function(e){e.fn.Stickyfill=function(e){return this.each(function(){Stickyfill.add(this)}),this}}(window.jQuery),$(document).ready(function(){var e=function(){$("body").css("margin-bottom",$(".page__footer").outerHeight(!0))},t=!1;e(),$(window).resize(function(){t=!0}),setInterval(function(){t&&(t=!1,e())},250),$("#main").fitVids(),$(".sticky").Stickyfill();var n=function(){var e=0===$(".author__urls-wrapper button").length?$(window).width()>1024:!$(".author__urls-wrapper button").is(":visible");e?(Stickyfill.rebuild(),Stickyfill.init(),$(".author__urls").show()):(Stickyfill.stop(),$(".author__urls").hide())};n(),$(window).resize(function(){n()}),$(".author__urls-wrapper button").on("click",function(){$(".author__urls").fadeToggle("fast",function(){}),$(".author__urls-wrapper button").toggleClass("open")}),$("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({type:"image",tLoading:"Loading image #%curr%...",gallery:{enabled:!0,navigateByImgClick:!0,preload:[0,1]},image:{tError:'Image #%curr% 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})}); \ No newline at end of file +function updateNav(){var e=$btn.hasClass("hidden")?$nav.width():$nav.width()-$btn.width()-30;$vlinks.width()>e?(breaks.push($vlinks.width()),$vlinks.children().last().prependTo($hlinks),$btn.hasClass("hidden")&&$btn.removeClass("hidden")):(e>breaks[breaks.length-1]&&($hlinks.children().first().appendTo($vlinks),breaks.pop()),breaks.length<1&&($btn.addClass("hidden"),$hlinks.addClass("hidden"))),$btn.attr("count",breaks.length),$vlinks.width()>e&&updateNav()}!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=!!e&&"length"in e&&e.length,n=pe.type(e);return"function"===n||pe.isWindow(e)?!1:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function r(e,t,n){if(pe.isFunction(t))return pe.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return pe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Te.test(t))return pe.filter(t,e,n);t=pe.filter(t,e)}return pe.grep(e,function(e){return pe.inArray(e,t)>-1!==n})}function i(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t={};return pe.each(e.match(je)||[],function(e,n){t[n]=!0}),t}function a(){re.addEventListener?(re.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s)):(re.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(re.addEventListener||"load"===e.event.type||"complete"===re.readyState)&&(a(),pe.ready())}function l(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(He,"-$1").toLowerCase();if(n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:_e.test(n)?pe.parseJSON(n):n}catch(i){}pe.data(e,t,n)}else n=void 0}return n}function u(e){var t;for(t in e)if(("data"!==t||!pe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,r){if(Ie(e)){var i,o,a=pe.expando,s=e.nodeType,l=s?pe.cache:e,u=s?e[a]:e[a]&&a;if(u&&l[u]&&(r||l[u].data)||void 0!==n||"string"!=typeof t)return u||(u=s?e[a]=ne.pop()||pe.guid++:a),l[u]||(l[u]=s?{}:{toJSON:pe.noop}),"object"!=typeof t&&"function"!=typeof t||(r?l[u]=pe.extend(l[u],t):l[u].data=pe.extend(l[u].data,t)),o=l[u],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[pe.camelCase(t)]=n),"string"==typeof t?(i=o[t],null==i&&(i=o[pe.camelCase(t)])):i=o,i}}function d(e,t,n){if(Ie(e)){var r,i,o=e.nodeType,a=o?pe.cache:e,s=o?e[pe.expando]:pe.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){pe.isArray(t)?t=t.concat(pe.map(t,pe.camelCase)):t in r?t=[t]:(t=pe.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!u(r):!pe.isEmptyObject(r))return}(n||(delete a[s].data,u(a[s])))&&(o?pe.cleanData([e],!0):de.deleteExpando||a!=a.window?delete a[s]:a[s]=void 0)}}}function f(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return pe.css(e,t,"")},l=s(),u=n&&n[3]||(pe.cssNumber[t]?"":"px"),c=(pe.cssNumber[t]||"px"!==u&&+l)&&Me.exec(pe.css(e,t));if(c&&c[3]!==u){u=u||c[3],n=n||[],c=+l||1;do o=o||".5",c/=o,pe.style(e,t,c+u);while(o!==(o=s()/l)&&1!==o&&--a)}return n&&(c=+c||+l||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=u,r.start=c,r.end=i)),i}function p(e){var t=We.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){var n,r,i=0,o="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||pe.nodeName(r,t)?o.push(r):pe.merge(o,h(r,t));return void 0===t||t&&pe.nodeName(e,t)?pe.merge([e],o):o}function m(e,t){for(var n,r=0;null!=(n=e[r]);r++)pe._data(n,"globalEval",!t||pe._data(t[r],"globalEval"))}function g(e){Be.test(e.type)&&(e.defaultChecked=e.checked)}function v(e,t,n,r,i){for(var o,a,s,l,u,c,d,f=e.length,v=p(t),y=[],b=0;f>b;b++)if(a=e[b],a||0===a)if("object"===pe.type(a))pe.merge(y,a.nodeType?[a]:a);else if(Ue.test(a)){for(l=l||v.appendChild(t.createElement("div")),u=($e.exec(a)||["",""])[1].toLowerCase(),d=Xe[u]||Xe._default,l.innerHTML=d[1]+pe.htmlPrefilter(a)+d[2],o=d[0];o--;)l=l.lastChild;if(!de.leadingWhitespace&&Re.test(a)&&y.push(t.createTextNode(Re.exec(a)[0])),!de.tbody)for(a="table"!==u||Ye.test(a)?"
"!==d[1]||Ye.test(a)?0:l:l.firstChild,o=a&&a.childNodes.length;o--;)pe.nodeName(c=a.childNodes[o],"tbody")&&!c.childNodes.length&&a.removeChild(c);for(pe.merge(y,l.childNodes),l.textContent="";l.firstChild;)l.removeChild(l.firstChild);l=v.lastChild}else y.push(t.createTextNode(a));for(l&&v.removeChild(l),de.appendChecked||pe.grep(h(y,"input"),g),b=0;a=y[b++];)if(r&&pe.inArray(a,r)>-1)i&&i.push(a);else if(s=pe.contains(a.ownerDocument,a),l=h(v.appendChild(a),"script"),s&&m(l),n)for(o=0;a=l[o++];)ze.test(a.type||"")&&n.push(a);return l=null,v}function y(){return!0}function b(){return!1}function x(){try{return re.activeElement}catch(e){}}function w(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)w(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=b;else if(!i)return e;return 1===o&&(a=i,i=function(e){return pe().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,i,r,n)})}function C(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function T(e){return e.type=(null!==pe.find.attr(e,"type"))+"/"+e.type,e}function k(e){var t=it.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function E(e,t){if(1===t.nodeType&&pe.hasData(e)){var n,r,i,o=pe._data(e),a=pe._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)pe.event.add(t,n,s[n][r])}a.data&&(a.data=pe.extend({},a.data))}}function S(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!de.noCloneEvent&&t[pe.expando]){i=pe._data(t);for(r in i.events)pe.removeEvent(t,r,i.handle);t.removeAttribute(pe.expando)}"script"===n&&t.text!==e.text?(T(t).text=e.text,k(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),de.html5Clone&&e.innerHTML&&!pe.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Be.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}}function N(e,t,n,r){t=oe.apply([],t);var i,o,a,s,l,u,c=0,d=e.length,f=d-1,p=t[0],m=pe.isFunction(p);if(m||d>1&&"string"==typeof p&&!de.checkClone&&rt.test(p))return e.each(function(i){var o=e.eq(i);m&&(t[0]=p.call(this,i,o.html())),N(o,t,n,r)});if(d&&(u=v(t,e[0].ownerDocument,!1,e,r),i=u.firstChild,1===u.childNodes.length&&(u=i),i||r)){for(s=pe.map(h(u,"script"),T),a=s.length;d>c;c++)o=u,c!==f&&(o=pe.clone(o,!0,!0),a&&pe.merge(s,h(o,"script"))),n.call(e[c],o,c);if(a)for(l=s[s.length-1].ownerDocument,pe.map(s,k),c=0;a>c;c++)o=s[c],ze.test(o.type||"")&&!pe._data(o,"globalEval")&&pe.contains(l,o)&&(o.src?pe._evalUrl&&pe._evalUrl(o.src):pe.globalEval((o.text||o.textContent||o.innerHTML||"").replace(ot,"")));u=i=null}return e}function A(e,t,n){for(var r,i=t?pe.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||pe.cleanData(h(r)),r.parentNode&&(n&&pe.contains(r.ownerDocument,r)&&m(h(r,"script")),r.parentNode.removeChild(r));return e}function j(e,t){var n=pe(t.createElement(e)).appendTo(t.body),r=pe.css(n[0],"display");return n.detach(),r}function L(e){var t=re,n=ut[e];return n||(n=j(e,t),"none"!==n&&n||(lt=(lt||pe("',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(){t.types.push(z),T("BeforeChange",function(e,t,n){t!==n&&(t===z?W():n===z&&W(!0))}),T(l+"."+z,function(){W()})},getIframe:function(n,r){var i=n.src,o=t.st.iframe;e.each(o.patterns,function(){return i.indexOf(this.index)>-1?(this.id&&(i="string"==typeof this.id?i.substr(i.lastIndexOf(this.id)+this.id.length,i.length):this.id.call(this,i)),i=this.src.replace("%id%",i),!1):void 0});var a={};return o.srcAction&&(a[o.srcAction]=i),t._parseMarkup(r,a,n),t.updateStatus("ready"),r}}});var X=function(e){var n=t.items.length;return e>n-1?e-n:0>e?n+e:e},U=function(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'',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 n=t.st.gallery,r=".mfp-gallery",o=Boolean(e.fn.mfpFastClick);return t.direction=!0,n&&n.enabled?(a+=" mfp-gallery",T(p+r,function(){n.navigateByImgClick&&t.wrap.on("click"+r,".mfp-img",function(){return t.items.length>1?(t.next(),!1):void 0}),i.on("keydown"+r,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),T("UpdateStatus"+r,function(e,n){n.text&&(n.text=U(n.text,t.currItem.index,t.items.length))}),T(f+r,function(e,r,i,o){var a=t.items.length;i.counter=a>1?U(n.tCounter,o.index,a):""}),T("BuildControls"+r,function(){if(t.items.length>1&&n.arrows&&!t.arrowLeft){var r=n.arrowMarkup,i=t.arrowLeft=e(r.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass(b),a=t.arrowRight=e(r.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(b),s=o?"mfpFastClick":"click";i[s](function(){t.prev()}),a[s](function(){t.next()}),t.isIE7&&(k("b",i[0],!1,!0),k("a",i[0],!1,!0),k("b",a[0],!1,!0),k("a",a[0],!1,!0)),t.container.append(i.add(a))}}),T(h+r,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),void T(l+r,function(){i.off(r),t.wrap.off("click"+r),t.arrowLeft&&o&&t.arrowLeft.add(t.arrowRight).destroyMfpFastClick(),t.arrowRight=t.arrowLeft=null})):!1},next:function(){t.direction=!0,t.index=X(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=X(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,n=t.st.gallery.preload,r=Math.min(n[0],t.items.length),i=Math.min(n[1],t.items.length);for(e=1;e<=(t.direction?i:r);e++)t._preloadItem(t.index+e);for(e=1;e<=(t.direction?r:i);e++)t._preloadItem(t.index-e)},_preloadItem:function(n){if(n=X(n),!t.items[n].preloaded){var r=t.items[n];r.parsed||(r=t.parseEl(n)),E("LazyLoad",r),"image"===r.type&&(r.img=e('').on("load.mfploader",function(){r.hasSize=!0}).on("error.mfploader",function(){r.hasSize=!0,r.loadError=!0,E("LazyLoadError",r)}).attr("src",r.src)),r.preloaded=!0}}}});var Y="retina";e.magnificPopup.registerModule(Y,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,n=e.ratio;n=isNaN(n)?n():n,n>1&&(T("ImageHasSize."+Y,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"})}),T("ElementParse."+Y,function(t,r){r.src=e.replaceSrc(r,n)}))}}}}),function(){var t=1e3,n="ontouchstart"in window,r=function(){C.off("touchmove"+o+" touchend"+o)},i="mfpFastClick",o="."+i;e.fn.mfpFastClick=function(i){return e(this).each(function(){var a,s=e(this);if(n){var l,u,c,d,f,p;s.on("touchstart"+o,function(e){d=!1,p=1,f=e.originalEvent?e.originalEvent.touches[0]:e.touches[0],u=f.clientX,c=f.clientY,C.on("touchmove"+o,function(e){f=e.originalEvent?e.originalEvent.touches:e.touches,p=f.length,f=f[0],(Math.abs(f.clientX-u)>10||Math.abs(f.clientY-c)>10)&&(d=!0,r())}).on("touchend"+o,function(e){r(),d||p>1||(a=!0,e.preventDefault(),clearTimeout(l),l=setTimeout(function(){a=!1},t),i())})})}s.on("click"+o,function(){a||i()})})},e.fn.destroyMfpFastClick=function(){e(this).off("touchstart"+o+" click"+o),n&&C.off("touchmove"+o+" touchend"+o)}}(),N()}(window.jQuery||window.Zepto),!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(e){var t="1.7.2",n={},r={exclude:[],excludeWithin:[],offset:0,direction:"top",delegateSelector:null,scrollElement:null,scrollTarget:null,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficient:2,preventDefault:!0},i=function(t){var n=[],r=!1,i=t.dir&&"left"===t.dir?"scrollLeft":"scrollTop";return this.each(function(){var t=e(this);return this!==document&&this!==window?!document.scrollingElement||this!==document.documentElement&&this!==document.body?void(t[i]()>0?n.push(this):(t[i](1),r=t[i]()>0,r&&n.push(this),t[i](0))):(n.push(document.scrollingElement),!1):void 0}),n.length||this.each(function(){this===document.documentElement&&"smooth"===e(this).css("scrollBehavior")&&(n=[this]),n.length||"BODY"!==this.nodeName||(n=[this])}),"first"===t.el&&n.length>1&&(n=[n[0]]),n};e.fn.extend({scrollable:function(e){var t=i.call(this,{dir:e});return this.pushStack(t)},firstScrollable:function(e){var t=i.call(this,{el:"first",dir:e});return this.pushStack(t)},smoothScroll:function(t,n){if(t=t||{},"options"===t)return n?this.each(function(){var t=e(this),r=e.extend(t.data("ssOpts")||{},n);e(this).data("ssOpts",r)}):this.first().data("ssOpts");var r=e.extend({},e.fn.smoothScroll.defaults,t),i=function(t){var n=function(e){return e.replace(/(:|\.|\/)/g,"\\$1")},i=this,o=e(this),a=e.extend({},r,o.data("ssOpts")||{}),s=r.exclude,l=a.excludeWithin,u=0,c=0,d=!0,f={},p=e.smoothScroll.filterPath(location.pathname),h=e.smoothScroll.filterPath(i.pathname),m=location.hostname===i.hostname||!i.hostname,g=a.scrollTarget||h===p,v=n(i.hash);if(v&&!e(v).length&&(d=!1),a.scrollTarget||m&&g&&v){for(;d&&uImage #%curr% 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})}); \ No newline at end of file diff --git a/assets/js/plugins/stickyfill.min.js b/assets/js/plugins/stickyfill.min.js deleted file mode 100644 index 024a99f0..00000000 --- a/assets/js/plugins/stickyfill.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/*! - * Stickyfill -- `position: sticky` polyfill - * v. 1.1.4 | https://github.com/wilddeer/stickyfill - * Copyright Oleg Korsunsky | http://wd.dizaina.net/ - * - * MIT License - */ -!function(a,b){function c(){y=D=z=A=B=C=K}function d(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])}function e(a){return parseFloat(a)||0}function f(){F={top:b.pageYOffset,left:b.pageXOffset}}function g(){return b.pageXOffset!=F.left?(f(),void z()):void(b.pageYOffset!=F.top&&(f(),i()))}function h(a){setTimeout(function(){b.pageYOffset!=F.top&&(F.top=b.pageYOffset,i())},0)}function i(){for(var a=H.length-1;a>=0;a--)j(H[a])}function j(a){if(a.inited){var b=F.top<=a.limit.start?0:F.top>=a.limit.end?2:1;a.mode!=b&&p(a,b)}}function k(){for(var a=H.length-1;a>=0;a--)if(H[a].inited){var b=Math.abs(t(H[a].clone)-H[a].docOffsetTop),c=Math.abs(H[a].parent.node.offsetHeight-H[a].parent.height);if(b>=2||c>=2)return!1}return!0}function l(a){isNaN(parseFloat(a.computed.top))||a.isCell||"none"==a.computed.display||(a.inited=!0,a.clone||q(a),"absolute"!=a.parent.computed.position&&"relative"!=a.parent.computed.position&&(a.parent.node.style.position="relative"),j(a),a.parent.height=a.parent.node.offsetHeight,a.docOffsetTop=t(a.clone))}function m(a){var b=!0;a.clone&&r(a),d(a.node.style,a.css);for(var c=H.length-1;c>=0;c--)if(H[c].node!==a.node&&H[c].parent.node===a.parent.node){b=!1;break}b&&(a.parent.node.style.position=a.parent.css.position),a.mode=-1}function n(){for(var a=H.length-1;a>=0;a--)l(H[a])}function o(){for(var a=H.length-1;a>=0;a--)m(H[a])}function p(a,b){var c=a.node.style;switch(b){case 0:c.position="absolute",c.left=a.offset.left+"px",c.right=a.offset.right+"px",c.top=a.offset.top+"px",c.bottom="auto",c.width="auto",c.marginLeft=0,c.marginRight=0,c.marginTop=0;break;case 1:c.position="fixed",c.left=a.box.left+"px",c.right=a.box.right+"px",c.top=a.css.top,c.bottom="auto",c.width="auto",c.marginLeft=0,c.marginRight=0,c.marginTop=0;break;case 2:c.position="absolute",c.left=a.offset.left+"px",c.right=a.offset.right+"px",c.top="auto",c.bottom=0,c.width="auto",c.marginLeft=0,c.marginRight=0}a.mode=b}function q(a){a.clone=document.createElement("div");var b=a.node.nextSibling||a.node,c=a.clone.style;c.height=a.height+"px",c.width=a.width+"px",c.marginTop=a.computed.marginTop,c.marginBottom=a.computed.marginBottom,c.marginLeft=a.computed.marginLeft,c.marginRight=a.computed.marginRight,c.padding=c.border=c.borderSpacing=0,c.fontSize="1em",c.position="static",c.cssFloat=a.computed.cssFloat,a.node.parentNode.insertBefore(a.clone,b)}function r(a){a.clone.parentNode.removeChild(a.clone),a.clone=void 0}function s(a){var b=getComputedStyle(a),c=a.parentNode,d=getComputedStyle(c),f=a.style.position;a.style.position="relative";var g={top:b.top,marginTop:b.marginTop,marginBottom:b.marginBottom,marginLeft:b.marginLeft,marginRight:b.marginRight,cssFloat:b.cssFloat,display:b.display},h={top:e(b.top),marginBottom:e(b.marginBottom),paddingLeft:e(b.paddingLeft),paddingRight:e(b.paddingRight),borderLeftWidth:e(b.borderLeftWidth),borderRightWidth:e(b.borderRightWidth)};a.style.position=f;var i={position:a.style.position,top:a.style.top,bottom:a.style.bottom,left:a.style.left,right:a.style.right,width:a.style.width,marginTop:a.style.marginTop,marginLeft:a.style.marginLeft,marginRight:a.style.marginRight},j=u(a),k=u(c),l={node:c,css:{position:c.style.position},computed:{position:d.position},numeric:{borderLeftWidth:e(d.borderLeftWidth),borderRightWidth:e(d.borderRightWidth),borderTopWidth:e(d.borderTopWidth),borderBottomWidth:e(d.borderBottomWidth)}},m={node:a,box:{left:j.win.left,right:J.clientWidth-j.win.right},offset:{top:j.win.top-k.win.top-l.numeric.borderTopWidth,left:j.win.left-k.win.left-l.numeric.borderLeftWidth,right:-j.win.right+k.win.right-l.numeric.borderRightWidth},css:i,isCell:"table-cell"==b.display,computed:g,numeric:h,width:j.win.right-j.win.left,height:j.win.bottom-j.win.top,mode:-1,inited:!1,parent:l,limit:{start:j.doc.top-h.top,end:k.doc.top+c.offsetHeight-l.numeric.borderBottomWidth-a.offsetHeight-h.top-h.marginBottom}};return m}function t(a){for(var b=0;a;)b+=a.offsetTop,a=a.offsetParent;return b}function u(a){var c=a.getBoundingClientRect();return{doc:{top:c.top+b.pageYOffset,left:c.left+b.pageXOffset},win:c}}function v(){G=setInterval(function(){!k()&&z()},500)}function w(){clearInterval(G)}function x(){I&&(document[L]?w():v())}function y(){I||(f(),n(),b.addEventListener("scroll",g),b.addEventListener("wheel",h),b.addEventListener("resize",z),b.addEventListener("orientationchange",z),a.addEventListener(M,x),v(),I=!0)}function z(){if(I){o();for(var a=H.length-1;a>=0;a--)H[a]=s(H[a].node);n()}}function A(){b.removeEventListener("scroll",g),b.removeEventListener("wheel",h),b.removeEventListener("resize",z),b.removeEventListener("orientationchange",z),a.removeEventListener(M,x),w(),I=!1}function B(){A(),o()}function C(){for(B();H.length;)H.pop()}function D(a){for(var b=H.length-1;b>=0;b--)if(H[b].node===a)return;var c=s(a);H.push(c),I?l(c):y()}function E(a){for(var b=H.length-1;b>=0;b--)H[b].node===a&&(m(H[b]),H.splice(b,1))}var F,G,H=[],I=!1,J=a.documentElement,K=function(){},L="hidden",M="visibilitychange";void 0!==a.webkitHidden&&(L="webkitHidden",M="webkitvisibilitychange"),b.getComputedStyle||c();for(var N=["","-webkit-","-moz-","-ms-"],O=document.createElement("div"),P=N.length-1;P>=0;P--){try{O.style.position=N[P]+"sticky"}catch(Q){}""!=O.style.position&&c()}f(),b.Stickyfill={stickies:H,add:D,remove:E,init:y,rebuild:z,pause:A,stop:B,kill:C}}(document,window),window.jQuery&&!function($){$.fn.Stickyfill=function(a){return this.each(function(){Stickyfill.add(this)}),this}}(window.jQuery); \ No newline at end of file diff --git a/docs/_docs/17-javascript.md b/docs/_docs/17-javascript.md index 7d204033..f2a8f779 100644 --- a/docs/_docs/17-javascript.md +++ b/docs/_docs/17-javascript.md @@ -15,8 +15,7 @@ minimal mistakes | | | ├── jquery.fitvids.js # fluid width video embeds | | | ├── jquery.greedy-navigation.js # priority plus navigation | | | ├── jquery.magnific-popup.js # responsive lightbox -| | | ├── jquery.smooth-scroll.min.js # make same-page links scroll smoothly -| | | └── stickyfill.min.js # `position: sticky` polyfill +| | | └── jquery.smooth-scroll.min.js # make same-page links scroll smoothly | | ├── vendor | | | └── jquery | | | └── jquery-1.12.1.min.js diff --git a/docs/_pages/about.md b/docs/_pages/about.md index 247407bc..d13ad506 100644 --- a/docs/_pages/about.md +++ b/docs/_pages/about.md @@ -12,7 +12,7 @@ layouts_gallery: - url: /assets/images/mm-layout-archive.png image_path: /assets/images/mm-layout-archive.png alt: "archive layout example" -modified: 2016-11-03T11:55:22-04:00 +modified: 2017-01-05T11:46:07-05:00 --- Minimal Mistakes is a flexible two-column Jekyll theme. Perfect for hosting your personal site, blog, or portfolio on GitHub or self-hosting on your own server. As the name implies --- styling is purposely minimalistic to be enhanced and customized by you :smile:. @@ -75,7 +75,6 @@ For even more demo pages check the [posts archive][year-archive]. - [FitVids.JS](http://fitvidsjs.com/) - Greedy Navigation - [lukejacksonn](http://codepen.io/lukejacksonn/pen/PwmwWV) - [jQuery Smooth Scroll](https://github.com/kswedberg/jquery-smooth-scroll) -- [Stickyfill](https://github.com/wilddeer/stickyfill) --- diff --git a/docs/assets/js/_main.js b/docs/assets/js/_main.js index 4f71a5dd..731fdaf6 100644 --- a/docs/assets/js/_main.js +++ b/docs/assets/js/_main.js @@ -25,35 +25,7 @@ $(document).ready(function(){ // FitVids init $("#main").fitVids(); - // init sticky sidebar - $(".sticky").Stickyfill(); - - var stickySideBar = function(){ - var show = $(".author__urls-wrapper button").length === 0 ? $(window).width() > 1024 : !$(".author__urls-wrapper button").is(":visible"); - // console.log("has button: " + $(".author__urls-wrapper button").length === 0); - // console.log("Window Width: " + windowWidth); - // console.log("show: " + show); - //old code was if($(window).width() > 1024) - if (show) { - // fix - Stickyfill.rebuild(); - Stickyfill.init(); - $(".author__urls").show(); - } else { - // unfix - Stickyfill.stop(); - $(".author__urls").hide(); - } - }; - - stickySideBar(); - - $(window).resize(function(){ - stickySideBar(); - }); - // Follow menu drop down - $(".author__urls-wrapper button").on("click", function() { $(".author__urls").fadeToggle("fast", function() {}); $(".author__urls-wrapper button").toggleClass("open"); diff --git a/docs/assets/js/main.min.js b/docs/assets/js/main.min.js index 7c4f130e..442e97b9 100644 --- a/docs/assets/js/main.min.js +++ b/docs/assets/js/main.min.js @@ -1,5 +1,4 @@ -function updateNav(){var e=$btn.hasClass("hidden")?$nav.width():$nav.width()-$btn.width()-30;$vlinks.width()>e?(breaks.push($vlinks.width()),$vlinks.children().last().prependTo($hlinks),$btn.hasClass("hidden")&&$btn.removeClass("hidden")):(e>breaks[breaks.length-1]&&($hlinks.children().first().appendTo($vlinks),breaks.pop()),breaks.length<1&&($btn.addClass("hidden"),$hlinks.addClass("hidden"))),$btn.attr("count",breaks.length),$vlinks.width()>e&&updateNav()}!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=!!e&&"length"in e&&e.length,n=pe.type(e);return"function"===n||pe.isWindow(e)?!1:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function i(e,t,n){if(pe.isFunction(t))return pe.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return pe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Te.test(t))return pe.filter(t,e,n);t=pe.filter(t,e)}return pe.grep(e,function(e){return pe.inArray(e,t)>-1!==n})}function r(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t={};return pe.each(e.match(Ae)||[],function(e,n){t[n]=!0}),t}function a(){ie.addEventListener?(ie.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s)):(ie.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(ie.addEventListener||"load"===e.event.type||"complete"===ie.readyState)&&(a(),pe.ready())}function l(e,t,n){if(void 0===n&&1===e.nodeType){var i="data-"+t.replace(He,"-$1").toLowerCase();if(n=e.getAttribute(i),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:De.test(n)?pe.parseJSON(n):n}catch(r){}pe.data(e,t,n)}else n=void 0}return n}function u(e){var t;for(t in e)if(("data"!==t||!pe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,i){if(Ie(e)){var r,o,a=pe.expando,s=e.nodeType,l=s?pe.cache:e,u=s?e[a]:e[a]&&a;if(u&&l[u]&&(i||l[u].data)||void 0!==n||"string"!=typeof t)return u||(u=s?e[a]=ne.pop()||pe.guid++:a),l[u]||(l[u]=s?{}:{toJSON:pe.noop}),"object"!=typeof t&&"function"!=typeof t||(i?l[u]=pe.extend(l[u],t):l[u].data=pe.extend(l[u].data,t)),o=l[u],i||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[pe.camelCase(t)]=n),"string"==typeof t?(r=o[t],null==r&&(r=o[pe.camelCase(t)])):r=o,r}}function d(e,t,n){if(Ie(e)){var i,r,o=e.nodeType,a=o?pe.cache:e,s=o?e[pe.expando]:pe.expando;if(a[s]){if(t&&(i=n?a[s]:a[s].data)){pe.isArray(t)?t=t.concat(pe.map(t,pe.camelCase)):t in i?t=[t]:(t=pe.camelCase(t),t=t in i?[t]:t.split(" ")),r=t.length;for(;r--;)delete i[t[r]];if(n?!u(i):!pe.isEmptyObject(i))return}(n||(delete a[s].data,u(a[s])))&&(o?pe.cleanData([e],!0):de.deleteExpando||a!=a.window?delete a[s]:a[s]=void 0)}}}function f(e,t,n,i){var r,o=1,a=20,s=i?function(){return i.cur()}:function(){return pe.css(e,t,"")},l=s(),u=n&&n[3]||(pe.cssNumber[t]?"":"px"),c=(pe.cssNumber[t]||"px"!==u&&+l)&&Me.exec(pe.css(e,t));if(c&&c[3]!==u){u=u||c[3],n=n||[],c=+l||1;do o=o||".5",c/=o,pe.style(e,t,c+u);while(o!==(o=s()/l)&&1!==o&&--a)}return n&&(c=+c||+l||0,r=n[1]?c+(n[1]+1)*n[2]:+n[2],i&&(i.unit=u,i.start=c,i.end=r)),r}function p(e){var t=We.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){var n,i,r=0,o="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(i=n[r]);r++)!t||pe.nodeName(i,t)?o.push(i):pe.merge(o,h(i,t));return void 0===t||t&&pe.nodeName(e,t)?pe.merge([e],o):o}function m(e,t){for(var n,i=0;null!=(n=e[i]);i++)pe._data(n,"globalEval",!t||pe._data(t[i],"globalEval"))}function g(e){qe.test(e.type)&&(e.defaultChecked=e.checked)}function v(e,t,n,i,r){for(var o,a,s,l,u,c,d,f=e.length,v=p(t),y=[],b=0;f>b;b++)if(a=e[b],a||0===a)if("object"===pe.type(a))pe.merge(y,a.nodeType?[a]:a);else if(Ye.test(a)){for(l=l||v.appendChild(t.createElement("div")),u=($e.exec(a)||["",""])[1].toLowerCase(),d=Xe[u]||Xe._default,l.innerHTML=d[1]+pe.htmlPrefilter(a)+d[2],o=d[0];o--;)l=l.lastChild;if(!de.leadingWhitespace&&Re.test(a)&&y.push(t.createTextNode(Re.exec(a)[0])),!de.tbody)for(a="table"!==u||Ue.test(a)?"
"!==d[1]||Ue.test(a)?0:l:l.firstChild,o=a&&a.childNodes.length;o--;)pe.nodeName(c=a.childNodes[o],"tbody")&&!c.childNodes.length&&a.removeChild(c);for(pe.merge(y,l.childNodes),l.textContent="";l.firstChild;)l.removeChild(l.firstChild);l=v.lastChild}else y.push(t.createTextNode(a));for(l&&v.removeChild(l),de.appendChecked||pe.grep(h(y,"input"),g),b=0;a=y[b++];)if(i&&pe.inArray(a,i)>-1)r&&r.push(a);else if(s=pe.contains(a.ownerDocument,a),l=h(v.appendChild(a),"script"),s&&m(l),n)for(o=0;a=l[o++];)ze.test(a.type||"")&&n.push(a);return l=null,v}function y(){return!0}function b(){return!1}function x(){try{return ie.activeElement}catch(e){}}function w(e,t,n,i,r,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(i=i||n,n=void 0);for(s in t)w(e,s,n,i,t[s],o);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),r===!1)r=b;else if(!r)return e;return 1===o&&(a=r,r=function(e){return pe().off(e),a.apply(this,arguments)},r.guid=a.guid||(a.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,r,i,n)})}function C(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function T(e){return e.type=(null!==pe.find.attr(e,"type"))+"/"+e.type,e}function k(e){var t=rt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function E(e,t){if(1===t.nodeType&&pe.hasData(e)){var n,i,r,o=pe._data(e),a=pe._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(i=0,r=s[n].length;r>i;i++)pe.event.add(t,n,s[n][i])}a.data&&(a.data=pe.extend({},a.data))}}function S(e,t){var n,i,r;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!de.noCloneEvent&&t[pe.expando]){r=pe._data(t);for(i in r.events)pe.removeEvent(t,i,r.handle);t.removeAttribute(pe.expando)}"script"===n&&t.text!==e.text?(T(t).text=e.text,k(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),de.html5Clone&&e.innerHTML&&!pe.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&qe.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}}function N(e,t,n,i){t=oe.apply([],t);var r,o,a,s,l,u,c=0,d=e.length,f=d-1,p=t[0],m=pe.isFunction(p);if(m||d>1&&"string"==typeof p&&!de.checkClone&&it.test(p))return e.each(function(r){var o=e.eq(r);m&&(t[0]=p.call(this,r,o.html())),N(o,t,n,i)});if(d&&(u=v(t,e[0].ownerDocument,!1,e,i),r=u.firstChild,1===u.childNodes.length&&(u=r),r||i)){for(s=pe.map(h(u,"script"),T),a=s.length;d>c;c++)o=u,c!==f&&(o=pe.clone(o,!0,!0),a&&pe.merge(s,h(o,"script"))),n.call(e[c],o,c);if(a)for(l=s[s.length-1].ownerDocument,pe.map(s,k),c=0;a>c;c++)o=s[c],ze.test(o.type||"")&&!pe._data(o,"globalEval")&&pe.contains(l,o)&&(o.src?pe._evalUrl&&pe._evalUrl(o.src):pe.globalEval((o.text||o.textContent||o.innerHTML||"").replace(ot,"")));u=r=null}return e}function L(e,t,n){for(var i,r=t?pe.filter(t,e):e,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||pe.cleanData(h(i)),i.parentNode&&(n&&pe.contains(i.ownerDocument,i)&&m(h(i,"script")),i.parentNode.removeChild(i));return e}function A(e,t){var n=pe(t.createElement(e)).appendTo(t.body),i=pe.css(n[0],"display");return n.detach(),i}function j(e){var t=ie,n=ut[e];return n||(n=A(e,t),"none"!==n&&n||(lt=(lt||pe("',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(){t.types.push(z),T("BeforeChange",function(e,t,n){t!==n&&(t===z?W():n===z&&W(!0))}),T(l+"."+z,function(){W()})},getIframe:function(n,i){var r=n.src,o=t.st.iframe;e.each(o.patterns,function(){return r.indexOf(this.index)>-1?(this.id&&(r="string"==typeof this.id?r.substr(r.lastIndexOf(this.id)+this.id.length,r.length):this.id.call(this,r)),r=this.src.replace("%id%",r),!1):void 0});var a={};return o.srcAction&&(a[o.srcAction]=r),t._parseMarkup(i,a,n),t.updateStatus("ready"),i}}});var X=function(e){var n=t.items.length;return e>n-1?e-n:0>e?n+e:e},Y=function(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'',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 n=t.st.gallery,i=".mfp-gallery",o=Boolean(e.fn.mfpFastClick);return t.direction=!0,n&&n.enabled?(a+=" mfp-gallery",T(p+i,function(){n.navigateByImgClick&&t.wrap.on("click"+i,".mfp-img",function(){return t.items.length>1?(t.next(),!1):void 0}),r.on("keydown"+i,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),T("UpdateStatus"+i,function(e,n){n.text&&(n.text=Y(n.text,t.currItem.index,t.items.length))}),T(f+i,function(e,i,r,o){var a=t.items.length;r.counter=a>1?Y(n.tCounter,o.index,a):""}),T("BuildControls"+i,function(){if(t.items.length>1&&n.arrows&&!t.arrowLeft){var i=n.arrowMarkup,r=t.arrowLeft=e(i.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass(b),a=t.arrowRight=e(i.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(b),s=o?"mfpFastClick":"click";r[s](function(){t.prev()}),a[s](function(){t.next()}),t.isIE7&&(k("b",r[0],!1,!0),k("a",r[0],!1,!0),k("b",a[0],!1,!0),k("a",a[0],!1,!0)),t.container.append(r.add(a))}}),T(h+i,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),void T(l+i,function(){r.off(i),t.wrap.off("click"+i),t.arrowLeft&&o&&t.arrowLeft.add(t.arrowRight).destroyMfpFastClick(),t.arrowRight=t.arrowLeft=null})):!1},next:function(){t.direction=!0,t.index=X(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=X(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,n=t.st.gallery.preload,i=Math.min(n[0],t.items.length),r=Math.min(n[1],t.items.length);for(e=1;e<=(t.direction?r:i);e++)t._preloadItem(t.index+e);for(e=1;e<=(t.direction?i:r);e++)t._preloadItem(t.index-e)},_preloadItem:function(n){if(n=X(n),!t.items[n].preloaded){var i=t.items[n];i.parsed||(i=t.parseEl(n)),E("LazyLoad",i),"image"===i.type&&(i.img=e('').on("load.mfploader",function(){i.hasSize=!0}).on("error.mfploader",function(){i.hasSize=!0,i.loadError=!0,E("LazyLoadError",i)}).attr("src",i.src)),i.preloaded=!0}}}});var U="retina";e.magnificPopup.registerModule(U,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,n=e.ratio;n=isNaN(n)?n():n,n>1&&(T("ImageHasSize."+U,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"})}),T("ElementParse."+U,function(t,i){i.src=e.replaceSrc(i,n)}))}}}}),function(){var t=1e3,n="ontouchstart"in window,i=function(){C.off("touchmove"+o+" touchend"+o)},r="mfpFastClick",o="."+r;e.fn.mfpFastClick=function(r){return e(this).each(function(){var a,s=e(this);if(n){var l,u,c,d,f,p;s.on("touchstart"+o,function(e){d=!1,p=1,f=e.originalEvent?e.originalEvent.touches[0]:e.touches[0],u=f.clientX,c=f.clientY,C.on("touchmove"+o,function(e){f=e.originalEvent?e.originalEvent.touches:e.touches,p=f.length,f=f[0],(Math.abs(f.clientX-u)>10||Math.abs(f.clientY-c)>10)&&(d=!0,i())}).on("touchend"+o,function(e){i(),d||p>1||(a=!0,e.preventDefault(),clearTimeout(l),l=setTimeout(function(){a=!1},t),r())})})}s.on("click"+o,function(){a||r()})})},e.fn.destroyMfpFastClick=function(){e(this).off("touchstart"+o+" click"+o),n&&C.off("touchmove"+o+" touchend"+o)}}(),N()}(window.jQuery||window.Zepto),!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(e){var t="1.7.2",n={},i={exclude:[],excludeWithin:[],offset:0,direction:"top",delegateSelector:null,scrollElement:null,scrollTarget:null,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficient:2,preventDefault:!0},r=function(t){var n=[],i=!1,r=t.dir&&"left"===t.dir?"scrollLeft":"scrollTop";return this.each(function(){var t=e(this);return this!==document&&this!==window?!document.scrollingElement||this!==document.documentElement&&this!==document.body?void(t[r]()>0?n.push(this):(t[r](1),i=t[r]()>0,i&&n.push(this),t[r](0))):(n.push(document.scrollingElement),!1):void 0}),n.length||this.each(function(){this===document.documentElement&&"smooth"===e(this).css("scrollBehavior")&&(n=[this]),n.length||"BODY"!==this.nodeName||(n=[this])}),"first"===t.el&&n.length>1&&(n=[n[0]]),n};e.fn.extend({scrollable:function(e){var t=r.call(this,{dir:e});return this.pushStack(t)},firstScrollable:function(e){var t=r.call(this,{el:"first",dir:e});return this.pushStack(t)},smoothScroll:function(t,n){if(t=t||{},"options"===t)return n?this.each(function(){var t=e(this),i=e.extend(t.data("ssOpts")||{},n);e(this).data("ssOpts",i)}):this.first().data("ssOpts");var i=e.extend({},e.fn.smoothScroll.defaults,t),r=function(t){var n=function(e){return e.replace(/(:|\.|\/)/g,"\\$1")},r=this,o=e(this),a=e.extend({},i,o.data("ssOpts")||{}),s=i.exclude,l=a.excludeWithin,u=0,c=0,d=!0,f={},p=e.smoothScroll.filterPath(location.pathname),h=e.smoothScroll.filterPath(r.pathname),m=location.hostname===r.hostname||!r.hostname,g=a.scrollTarget||h===p,v=n(r.hash);if(v&&!e(v).length&&(d=!1),a.scrollTarget||m&&g&&v){for(;d&&u=0;e--)u(D[e])}function u(e){if(e.inited){var t=_.top<=e.limit.start?0:_.top>=e.limit.end?2:1;e.mode!=t&&m(e,t)}}function c(){for(var e=D.length-1;e>=0;e--)if(D[e].inited){var t=Math.abs(b(D[e].clone)-D[e].docOffsetTop),n=Math.abs(D[e].parent.node.offsetHeight-D[e].parent.height);if(t>=2||n>=2)return!1}return!0}function d(e){isNaN(parseFloat(e.computed.top))||e.isCell||"none"==e.computed.display||(e.inited=!0,e.clone||g(e),"absolute"!=e.parent.computed.position&&"relative"!=e.parent.computed.position&&(e.parent.node.style.position="relative"),u(e),e.parent.height=e.parent.node.offsetHeight,e.docOffsetTop=b(e.clone))}function f(e){var t=!0;e.clone&&v(e),i(e.node.style,e.css);for(var n=D.length-1;n>=0;n--)if(D[n].node!==e.node&&D[n].parent.node===e.parent.node){t=!1;break}t&&(e.parent.node.style.position=e.parent.css.position),e.mode=-1}function p(){for(var e=D.length-1;e>=0;e--)d(D[e])}function h(){for(var e=D.length-1;e>=0;e--)f(D[e])}function m(e,t){var n=e.node.style;switch(t){case 0:n.position="absolute",n.left=e.offset.left+"px",n.right=e.offset.right+"px",n.top=e.offset.top+"px",n.bottom="auto",n.width="auto",n.marginLeft=0,n.marginRight=0,n.marginTop=0;break;case 1:n.position="fixed",n.left=e.box.left+"px",n.right=e.box.right+"px",n.top=e.css.top,n.bottom="auto",n.width="auto",n.marginLeft=0,n.marginRight=0,n.marginTop=0;break;case 2:n.position="absolute",n.left=e.offset.left+"px",n.right=e.offset.right+"px",n.top="auto",n.bottom=0,n.width="auto",n.marginLeft=0,n.marginRight=0}e.mode=t}function g(e){e.clone=document.createElement("div");var t=e.node.nextSibling||e.node,n=e.clone.style;n.height=e.height+"px",n.width=e.width+"px",n.marginTop=e.computed.marginTop,n.marginBottom=e.computed.marginBottom,n.marginLeft=e.computed.marginLeft,n.marginRight=e.computed.marginRight,n.padding=n.border=n.borderSpacing=0,n.fontSize="1em",n.position="static",n.cssFloat=e.computed.cssFloat,e.node.parentNode.insertBefore(e.clone,t)}function v(e){e.clone.parentNode.removeChild(e.clone),e.clone=void 0}function y(e){var t=getComputedStyle(e),n=e.parentNode,i=getComputedStyle(n),o=e.style.position;e.style.position="relative";var a={top:t.top,marginTop:t.marginTop,marginBottom:t.marginBottom,marginLeft:t.marginLeft,marginRight:t.marginRight,cssFloat:t.cssFloat,display:t.display},s={top:r(t.top),marginBottom:r(t.marginBottom),paddingLeft:r(t.paddingLeft),paddingRight:r(t.paddingRight),borderLeftWidth:r(t.borderLeftWidth),borderRightWidth:r(t.borderRightWidth)};e.style.position=o;var l={position:e.style.position,top:e.style.top,bottom:e.style.bottom,left:e.style.left,right:e.style.right,width:e.style.width,marginTop:e.style.marginTop,marginLeft:e.style.marginLeft,marginRight:e.style.marginRight},u=x(e),c=x(n),d={node:n,css:{position:n.style.position},computed:{position:i.position},numeric:{borderLeftWidth:r(i.borderLeftWidth),borderRightWidth:r(i.borderRightWidth),borderTopWidth:r(i.borderTopWidth),borderBottomWidth:r(i.borderBottomWidth)}},f={node:e,box:{left:u.win.left,right:O.clientWidth-u.win.right},offset:{top:u.win.top-c.win.top-d.numeric.borderTopWidth,left:u.win.left-c.win.left-d.numeric.borderLeftWidth,right:-u.win.right+c.win.right-d.numeric.borderRightWidth -},css:l,isCell:"table-cell"==t.display,computed:a,numeric:s,width:u.win.right-u.win.left,height:u.win.bottom-u.win.top,mode:-1,inited:!1,parent:d,limit:{start:u.doc.top-s.top,end:c.doc.top+n.offsetHeight-d.numeric.borderBottomWidth-e.offsetHeight-s.top-s.marginBottom}};return f}function b(e){for(var t=0;e;)t+=e.offsetTop,e=e.offsetParent;return t}function x(e){var n=e.getBoundingClientRect();return{doc:{top:n.top+t.pageYOffset,left:n.left+t.pageXOffset},win:n}}function w(){I=setInterval(function(){!c()&&E()},500)}function C(){clearInterval(I)}function T(){H&&(document[P]?C():w())}function k(){H||(o(),p(),t.addEventListener("scroll",a),t.addEventListener("wheel",s),t.addEventListener("resize",E),t.addEventListener("orientationchange",E),e.addEventListener(B,T),w(),H=!0)}function E(){if(H){h();for(var e=D.length-1;e>=0;e--)D[e]=y(D[e].node);p()}}function S(){t.removeEventListener("scroll",a),t.removeEventListener("wheel",s),t.removeEventListener("resize",E),t.removeEventListener("orientationchange",E),e.removeEventListener(B,T),C(),H=!1}function N(){S(),h()}function L(){for(N();D.length;)D.pop()}function A(e){for(var t=D.length-1;t>=0;t--)if(D[t].node===e)return;var n=y(e);D.push(n),H?d(n):k()}function j(e){for(var t=D.length-1;t>=0;t--)D[t].node===e&&(f(D[t]),D.splice(t,1))}var _,I,D=[],H=!1,O=e.documentElement,M=function(){},P="hidden",B="visibilitychange";void 0!==e.webkitHidden&&(P="webkitHidden",B="webkitvisibilitychange"),t.getComputedStyle||n();for(var F=["","-webkit-","-moz-","-ms-"],q=document.createElement("div"),$=F.length-1;$>=0;$--){try{q.style.position=F[$]+"sticky"}catch(z){}""!=q.style.position&&n()}o(),t.Stickyfill={stickies:D,add:A,remove:j,init:k,rebuild:E,pause:S,stop:N,kill:L}}(document,window),window.jQuery&&!function(e){e.fn.Stickyfill=function(e){return this.each(function(){Stickyfill.add(this)}),this}}(window.jQuery),$(document).ready(function(){var e=function(){$("body").css("margin-bottom",$(".page__footer").outerHeight(!0))},t=!1;e(),$(window).resize(function(){t=!0}),setInterval(function(){t&&(t=!1,e())},250),$("#main").fitVids(),$(".sticky").Stickyfill();var n=function(){var e=0===$(".author__urls-wrapper button").length?$(window).width()>1024:!$(".author__urls-wrapper button").is(":visible");e?(Stickyfill.rebuild(),Stickyfill.init(),$(".author__urls").show()):(Stickyfill.stop(),$(".author__urls").hide())};n(),$(window).resize(function(){n()}),$(".author__urls-wrapper button").on("click",function(){$(".author__urls").fadeToggle("fast",function(){}),$(".author__urls-wrapper button").toggleClass("open")}),$("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({type:"image",tLoading:"Loading image #%curr%...",gallery:{enabled:!0,navigateByImgClick:!0,preload:[0,1]},image:{tError:'Image #%curr% 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})}); \ No newline at end of file +function updateNav(){var e=$btn.hasClass("hidden")?$nav.width():$nav.width()-$btn.width()-30;$vlinks.width()>e?(breaks.push($vlinks.width()),$vlinks.children().last().prependTo($hlinks),$btn.hasClass("hidden")&&$btn.removeClass("hidden")):(e>breaks[breaks.length-1]&&($hlinks.children().first().appendTo($vlinks),breaks.pop()),breaks.length<1&&($btn.addClass("hidden"),$hlinks.addClass("hidden"))),$btn.attr("count",breaks.length),$vlinks.width()>e&&updateNav()}!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=!!e&&"length"in e&&e.length,n=pe.type(e);return"function"===n||pe.isWindow(e)?!1:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function r(e,t,n){if(pe.isFunction(t))return pe.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return pe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Te.test(t))return pe.filter(t,e,n);t=pe.filter(t,e)}return pe.grep(e,function(e){return pe.inArray(e,t)>-1!==n})}function i(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t={};return pe.each(e.match(je)||[],function(e,n){t[n]=!0}),t}function a(){re.addEventListener?(re.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s)):(re.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(re.addEventListener||"load"===e.event.type||"complete"===re.readyState)&&(a(),pe.ready())}function l(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(He,"-$1").toLowerCase();if(n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:_e.test(n)?pe.parseJSON(n):n}catch(i){}pe.data(e,t,n)}else n=void 0}return n}function u(e){var t;for(t in e)if(("data"!==t||!pe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,r){if(Ie(e)){var i,o,a=pe.expando,s=e.nodeType,l=s?pe.cache:e,u=s?e[a]:e[a]&&a;if(u&&l[u]&&(r||l[u].data)||void 0!==n||"string"!=typeof t)return u||(u=s?e[a]=ne.pop()||pe.guid++:a),l[u]||(l[u]=s?{}:{toJSON:pe.noop}),"object"!=typeof t&&"function"!=typeof t||(r?l[u]=pe.extend(l[u],t):l[u].data=pe.extend(l[u].data,t)),o=l[u],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[pe.camelCase(t)]=n),"string"==typeof t?(i=o[t],null==i&&(i=o[pe.camelCase(t)])):i=o,i}}function d(e,t,n){if(Ie(e)){var r,i,o=e.nodeType,a=o?pe.cache:e,s=o?e[pe.expando]:pe.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){pe.isArray(t)?t=t.concat(pe.map(t,pe.camelCase)):t in r?t=[t]:(t=pe.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!u(r):!pe.isEmptyObject(r))return}(n||(delete a[s].data,u(a[s])))&&(o?pe.cleanData([e],!0):de.deleteExpando||a!=a.window?delete a[s]:a[s]=void 0)}}}function f(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return pe.css(e,t,"")},l=s(),u=n&&n[3]||(pe.cssNumber[t]?"":"px"),c=(pe.cssNumber[t]||"px"!==u&&+l)&&Me.exec(pe.css(e,t));if(c&&c[3]!==u){u=u||c[3],n=n||[],c=+l||1;do o=o||".5",c/=o,pe.style(e,t,c+u);while(o!==(o=s()/l)&&1!==o&&--a)}return n&&(c=+c||+l||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=u,r.start=c,r.end=i)),i}function p(e){var t=We.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){var n,r,i=0,o="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||pe.nodeName(r,t)?o.push(r):pe.merge(o,h(r,t));return void 0===t||t&&pe.nodeName(e,t)?pe.merge([e],o):o}function m(e,t){for(var n,r=0;null!=(n=e[r]);r++)pe._data(n,"globalEval",!t||pe._data(t[r],"globalEval"))}function g(e){Be.test(e.type)&&(e.defaultChecked=e.checked)}function v(e,t,n,r,i){for(var o,a,s,l,u,c,d,f=e.length,v=p(t),y=[],b=0;f>b;b++)if(a=e[b],a||0===a)if("object"===pe.type(a))pe.merge(y,a.nodeType?[a]:a);else if(Ue.test(a)){for(l=l||v.appendChild(t.createElement("div")),u=($e.exec(a)||["",""])[1].toLowerCase(),d=Xe[u]||Xe._default,l.innerHTML=d[1]+pe.htmlPrefilter(a)+d[2],o=d[0];o--;)l=l.lastChild;if(!de.leadingWhitespace&&Re.test(a)&&y.push(t.createTextNode(Re.exec(a)[0])),!de.tbody)for(a="table"!==u||Ye.test(a)?"
"!==d[1]||Ye.test(a)?0:l:l.firstChild,o=a&&a.childNodes.length;o--;)pe.nodeName(c=a.childNodes[o],"tbody")&&!c.childNodes.length&&a.removeChild(c);for(pe.merge(y,l.childNodes),l.textContent="";l.firstChild;)l.removeChild(l.firstChild);l=v.lastChild}else y.push(t.createTextNode(a));for(l&&v.removeChild(l),de.appendChecked||pe.grep(h(y,"input"),g),b=0;a=y[b++];)if(r&&pe.inArray(a,r)>-1)i&&i.push(a);else if(s=pe.contains(a.ownerDocument,a),l=h(v.appendChild(a),"script"),s&&m(l),n)for(o=0;a=l[o++];)ze.test(a.type||"")&&n.push(a);return l=null,v}function y(){return!0}function b(){return!1}function x(){try{return re.activeElement}catch(e){}}function w(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)w(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=b;else if(!i)return e;return 1===o&&(a=i,i=function(e){return pe().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,i,r,n)})}function C(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function T(e){return e.type=(null!==pe.find.attr(e,"type"))+"/"+e.type,e}function k(e){var t=it.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function E(e,t){if(1===t.nodeType&&pe.hasData(e)){var n,r,i,o=pe._data(e),a=pe._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)pe.event.add(t,n,s[n][r])}a.data&&(a.data=pe.extend({},a.data))}}function S(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!de.noCloneEvent&&t[pe.expando]){i=pe._data(t);for(r in i.events)pe.removeEvent(t,r,i.handle);t.removeAttribute(pe.expando)}"script"===n&&t.text!==e.text?(T(t).text=e.text,k(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),de.html5Clone&&e.innerHTML&&!pe.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Be.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}}function N(e,t,n,r){t=oe.apply([],t);var i,o,a,s,l,u,c=0,d=e.length,f=d-1,p=t[0],m=pe.isFunction(p);if(m||d>1&&"string"==typeof p&&!de.checkClone&&rt.test(p))return e.each(function(i){var o=e.eq(i);m&&(t[0]=p.call(this,i,o.html())),N(o,t,n,r)});if(d&&(u=v(t,e[0].ownerDocument,!1,e,r),i=u.firstChild,1===u.childNodes.length&&(u=i),i||r)){for(s=pe.map(h(u,"script"),T),a=s.length;d>c;c++)o=u,c!==f&&(o=pe.clone(o,!0,!0),a&&pe.merge(s,h(o,"script"))),n.call(e[c],o,c);if(a)for(l=s[s.length-1].ownerDocument,pe.map(s,k),c=0;a>c;c++)o=s[c],ze.test(o.type||"")&&!pe._data(o,"globalEval")&&pe.contains(l,o)&&(o.src?pe._evalUrl&&pe._evalUrl(o.src):pe.globalEval((o.text||o.textContent||o.innerHTML||"").replace(ot,"")));u=i=null}return e}function A(e,t,n){for(var r,i=t?pe.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||pe.cleanData(h(r)),r.parentNode&&(n&&pe.contains(r.ownerDocument,r)&&m(h(r,"script")),r.parentNode.removeChild(r));return e}function j(e,t){var n=pe(t.createElement(e)).appendTo(t.body),r=pe.css(n[0],"display");return n.detach(),r}function L(e){var t=re,n=ut[e];return n||(n=j(e,t),"none"!==n&&n||(lt=(lt||pe("',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(){t.types.push(z),T("BeforeChange",function(e,t,n){t!==n&&(t===z?W():n===z&&W(!0))}),T(l+"."+z,function(){W()})},getIframe:function(n,r){var i=n.src,o=t.st.iframe;e.each(o.patterns,function(){return i.indexOf(this.index)>-1?(this.id&&(i="string"==typeof this.id?i.substr(i.lastIndexOf(this.id)+this.id.length,i.length):this.id.call(this,i)),i=this.src.replace("%id%",i),!1):void 0});var a={};return o.srcAction&&(a[o.srcAction]=i),t._parseMarkup(r,a,n),t.updateStatus("ready"),r}}});var X=function(e){var n=t.items.length;return e>n-1?e-n:0>e?n+e:e},U=function(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'',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 n=t.st.gallery,r=".mfp-gallery",o=Boolean(e.fn.mfpFastClick);return t.direction=!0,n&&n.enabled?(a+=" mfp-gallery",T(p+r,function(){n.navigateByImgClick&&t.wrap.on("click"+r,".mfp-img",function(){return t.items.length>1?(t.next(),!1):void 0}),i.on("keydown"+r,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),T("UpdateStatus"+r,function(e,n){n.text&&(n.text=U(n.text,t.currItem.index,t.items.length))}),T(f+r,function(e,r,i,o){var a=t.items.length;i.counter=a>1?U(n.tCounter,o.index,a):""}),T("BuildControls"+r,function(){if(t.items.length>1&&n.arrows&&!t.arrowLeft){var r=n.arrowMarkup,i=t.arrowLeft=e(r.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass(b),a=t.arrowRight=e(r.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(b),s=o?"mfpFastClick":"click";i[s](function(){t.prev()}),a[s](function(){t.next()}),t.isIE7&&(k("b",i[0],!1,!0),k("a",i[0],!1,!0),k("b",a[0],!1,!0),k("a",a[0],!1,!0)),t.container.append(i.add(a))}}),T(h+r,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),void T(l+r,function(){i.off(r),t.wrap.off("click"+r),t.arrowLeft&&o&&t.arrowLeft.add(t.arrowRight).destroyMfpFastClick(),t.arrowRight=t.arrowLeft=null})):!1},next:function(){t.direction=!0,t.index=X(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=X(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,n=t.st.gallery.preload,r=Math.min(n[0],t.items.length),i=Math.min(n[1],t.items.length);for(e=1;e<=(t.direction?i:r);e++)t._preloadItem(t.index+e);for(e=1;e<=(t.direction?r:i);e++)t._preloadItem(t.index-e)},_preloadItem:function(n){if(n=X(n),!t.items[n].preloaded){var r=t.items[n];r.parsed||(r=t.parseEl(n)),E("LazyLoad",r),"image"===r.type&&(r.img=e('').on("load.mfploader",function(){r.hasSize=!0}).on("error.mfploader",function(){r.hasSize=!0,r.loadError=!0,E("LazyLoadError",r)}).attr("src",r.src)),r.preloaded=!0}}}});var Y="retina";e.magnificPopup.registerModule(Y,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,n=e.ratio;n=isNaN(n)?n():n,n>1&&(T("ImageHasSize."+Y,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"})}),T("ElementParse."+Y,function(t,r){r.src=e.replaceSrc(r,n)}))}}}}),function(){var t=1e3,n="ontouchstart"in window,r=function(){C.off("touchmove"+o+" touchend"+o)},i="mfpFastClick",o="."+i;e.fn.mfpFastClick=function(i){return e(this).each(function(){var a,s=e(this);if(n){var l,u,c,d,f,p;s.on("touchstart"+o,function(e){d=!1,p=1,f=e.originalEvent?e.originalEvent.touches[0]:e.touches[0],u=f.clientX,c=f.clientY,C.on("touchmove"+o,function(e){f=e.originalEvent?e.originalEvent.touches:e.touches,p=f.length,f=f[0],(Math.abs(f.clientX-u)>10||Math.abs(f.clientY-c)>10)&&(d=!0,r())}).on("touchend"+o,function(e){r(),d||p>1||(a=!0,e.preventDefault(),clearTimeout(l),l=setTimeout(function(){a=!1},t),i())})})}s.on("click"+o,function(){a||i()})})},e.fn.destroyMfpFastClick=function(){e(this).off("touchstart"+o+" click"+o),n&&C.off("touchmove"+o+" touchend"+o)}}(),N()}(window.jQuery||window.Zepto),!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof module&&module.exports?require("jquery"):jQuery)}(function(e){var t="1.7.2",n={},r={exclude:[],excludeWithin:[],offset:0,direction:"top",delegateSelector:null,scrollElement:null,scrollTarget:null,beforeScroll:function(){},afterScroll:function(){},easing:"swing",speed:400,autoCoefficient:2,preventDefault:!0},i=function(t){var n=[],r=!1,i=t.dir&&"left"===t.dir?"scrollLeft":"scrollTop";return this.each(function(){var t=e(this);return this!==document&&this!==window?!document.scrollingElement||this!==document.documentElement&&this!==document.body?void(t[i]()>0?n.push(this):(t[i](1),r=t[i]()>0,r&&n.push(this),t[i](0))):(n.push(document.scrollingElement),!1):void 0}),n.length||this.each(function(){this===document.documentElement&&"smooth"===e(this).css("scrollBehavior")&&(n=[this]),n.length||"BODY"!==this.nodeName||(n=[this])}),"first"===t.el&&n.length>1&&(n=[n[0]]),n};e.fn.extend({scrollable:function(e){var t=i.call(this,{dir:e});return this.pushStack(t)},firstScrollable:function(e){var t=i.call(this,{el:"first",dir:e});return this.pushStack(t)},smoothScroll:function(t,n){if(t=t||{},"options"===t)return n?this.each(function(){var t=e(this),r=e.extend(t.data("ssOpts")||{},n);e(this).data("ssOpts",r)}):this.first().data("ssOpts");var r=e.extend({},e.fn.smoothScroll.defaults,t),i=function(t){var n=function(e){return e.replace(/(:|\.|\/)/g,"\\$1")},i=this,o=e(this),a=e.extend({},r,o.data("ssOpts")||{}),s=r.exclude,l=a.excludeWithin,u=0,c=0,d=!0,f={},p=e.smoothScroll.filterPath(location.pathname),h=e.smoothScroll.filterPath(i.pathname),m=location.hostname===i.hostname||!i.hostname,g=a.scrollTarget||h===p,v=n(i.hash);if(v&&!e(v).length&&(d=!1),a.scrollTarget||m&&g&&v){for(;d&&uImage #%curr% 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})}); \ No newline at end of file diff --git a/docs/assets/js/plugins/stickyfill.min.js b/docs/assets/js/plugins/stickyfill.min.js deleted file mode 100644 index 024a99f0..00000000 --- a/docs/assets/js/plugins/stickyfill.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/*! - * Stickyfill -- `position: sticky` polyfill - * v. 1.1.4 | https://github.com/wilddeer/stickyfill - * Copyright Oleg Korsunsky | http://wd.dizaina.net/ - * - * MIT License - */ -!function(a,b){function c(){y=D=z=A=B=C=K}function d(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])}function e(a){return parseFloat(a)||0}function f(){F={top:b.pageYOffset,left:b.pageXOffset}}function g(){return b.pageXOffset!=F.left?(f(),void z()):void(b.pageYOffset!=F.top&&(f(),i()))}function h(a){setTimeout(function(){b.pageYOffset!=F.top&&(F.top=b.pageYOffset,i())},0)}function i(){for(var a=H.length-1;a>=0;a--)j(H[a])}function j(a){if(a.inited){var b=F.top<=a.limit.start?0:F.top>=a.limit.end?2:1;a.mode!=b&&p(a,b)}}function k(){for(var a=H.length-1;a>=0;a--)if(H[a].inited){var b=Math.abs(t(H[a].clone)-H[a].docOffsetTop),c=Math.abs(H[a].parent.node.offsetHeight-H[a].parent.height);if(b>=2||c>=2)return!1}return!0}function l(a){isNaN(parseFloat(a.computed.top))||a.isCell||"none"==a.computed.display||(a.inited=!0,a.clone||q(a),"absolute"!=a.parent.computed.position&&"relative"!=a.parent.computed.position&&(a.parent.node.style.position="relative"),j(a),a.parent.height=a.parent.node.offsetHeight,a.docOffsetTop=t(a.clone))}function m(a){var b=!0;a.clone&&r(a),d(a.node.style,a.css);for(var c=H.length-1;c>=0;c--)if(H[c].node!==a.node&&H[c].parent.node===a.parent.node){b=!1;break}b&&(a.parent.node.style.position=a.parent.css.position),a.mode=-1}function n(){for(var a=H.length-1;a>=0;a--)l(H[a])}function o(){for(var a=H.length-1;a>=0;a--)m(H[a])}function p(a,b){var c=a.node.style;switch(b){case 0:c.position="absolute",c.left=a.offset.left+"px",c.right=a.offset.right+"px",c.top=a.offset.top+"px",c.bottom="auto",c.width="auto",c.marginLeft=0,c.marginRight=0,c.marginTop=0;break;case 1:c.position="fixed",c.left=a.box.left+"px",c.right=a.box.right+"px",c.top=a.css.top,c.bottom="auto",c.width="auto",c.marginLeft=0,c.marginRight=0,c.marginTop=0;break;case 2:c.position="absolute",c.left=a.offset.left+"px",c.right=a.offset.right+"px",c.top="auto",c.bottom=0,c.width="auto",c.marginLeft=0,c.marginRight=0}a.mode=b}function q(a){a.clone=document.createElement("div");var b=a.node.nextSibling||a.node,c=a.clone.style;c.height=a.height+"px",c.width=a.width+"px",c.marginTop=a.computed.marginTop,c.marginBottom=a.computed.marginBottom,c.marginLeft=a.computed.marginLeft,c.marginRight=a.computed.marginRight,c.padding=c.border=c.borderSpacing=0,c.fontSize="1em",c.position="static",c.cssFloat=a.computed.cssFloat,a.node.parentNode.insertBefore(a.clone,b)}function r(a){a.clone.parentNode.removeChild(a.clone),a.clone=void 0}function s(a){var b=getComputedStyle(a),c=a.parentNode,d=getComputedStyle(c),f=a.style.position;a.style.position="relative";var g={top:b.top,marginTop:b.marginTop,marginBottom:b.marginBottom,marginLeft:b.marginLeft,marginRight:b.marginRight,cssFloat:b.cssFloat,display:b.display},h={top:e(b.top),marginBottom:e(b.marginBottom),paddingLeft:e(b.paddingLeft),paddingRight:e(b.paddingRight),borderLeftWidth:e(b.borderLeftWidth),borderRightWidth:e(b.borderRightWidth)};a.style.position=f;var i={position:a.style.position,top:a.style.top,bottom:a.style.bottom,left:a.style.left,right:a.style.right,width:a.style.width,marginTop:a.style.marginTop,marginLeft:a.style.marginLeft,marginRight:a.style.marginRight},j=u(a),k=u(c),l={node:c,css:{position:c.style.position},computed:{position:d.position},numeric:{borderLeftWidth:e(d.borderLeftWidth),borderRightWidth:e(d.borderRightWidth),borderTopWidth:e(d.borderTopWidth),borderBottomWidth:e(d.borderBottomWidth)}},m={node:a,box:{left:j.win.left,right:J.clientWidth-j.win.right},offset:{top:j.win.top-k.win.top-l.numeric.borderTopWidth,left:j.win.left-k.win.left-l.numeric.borderLeftWidth,right:-j.win.right+k.win.right-l.numeric.borderRightWidth},css:i,isCell:"table-cell"==b.display,computed:g,numeric:h,width:j.win.right-j.win.left,height:j.win.bottom-j.win.top,mode:-1,inited:!1,parent:l,limit:{start:j.doc.top-h.top,end:k.doc.top+c.offsetHeight-l.numeric.borderBottomWidth-a.offsetHeight-h.top-h.marginBottom}};return m}function t(a){for(var b=0;a;)b+=a.offsetTop,a=a.offsetParent;return b}function u(a){var c=a.getBoundingClientRect();return{doc:{top:c.top+b.pageYOffset,left:c.left+b.pageXOffset},win:c}}function v(){G=setInterval(function(){!k()&&z()},500)}function w(){clearInterval(G)}function x(){I&&(document[L]?w():v())}function y(){I||(f(),n(),b.addEventListener("scroll",g),b.addEventListener("wheel",h),b.addEventListener("resize",z),b.addEventListener("orientationchange",z),a.addEventListener(M,x),v(),I=!0)}function z(){if(I){o();for(var a=H.length-1;a>=0;a--)H[a]=s(H[a].node);n()}}function A(){b.removeEventListener("scroll",g),b.removeEventListener("wheel",h),b.removeEventListener("resize",z),b.removeEventListener("orientationchange",z),a.removeEventListener(M,x),w(),I=!1}function B(){A(),o()}function C(){for(B();H.length;)H.pop()}function D(a){for(var b=H.length-1;b>=0;b--)if(H[b].node===a)return;var c=s(a);H.push(c),I?l(c):y()}function E(a){for(var b=H.length-1;b>=0;b--)H[b].node===a&&(m(H[b]),H.splice(b,1))}var F,G,H=[],I=!1,J=a.documentElement,K=function(){},L="hidden",M="visibilitychange";void 0!==a.webkitHidden&&(L="webkitHidden",M="webkitvisibilitychange"),b.getComputedStyle||c();for(var N=["","-webkit-","-moz-","-ms-"],O=document.createElement("div"),P=N.length-1;P>=0;P--){try{O.style.position=N[P]+"sticky"}catch(Q){}""!=O.style.position&&c()}f(),b.Stickyfill={stickies:H,add:D,remove:E,init:y,rebuild:z,pause:A,stop:B,kill:C}}(document,window),window.jQuery&&!function($){$.fn.Stickyfill=function(a){return this.each(function(){Stickyfill.add(this)}),this}}(window.jQuery); \ No newline at end of file diff --git a/package.json b/package.json index eb54d250..d2806d0f 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "uglify-js": "^2.6.1" }, "scripts": { - "uglify": "uglifyjs assets/js/vendor/jquery/jquery-1.12.4.min.js assets/js/plugins/jquery.fitvids.js assets/js/plugins/jquery.greedy-navigation.js assets/js/plugins/jquery.magnific-popup.js assets/js/plugins/jquery.smooth-scroll.min.js assets/js/plugins/stickyfill.min.js assets/js/_main.js -c -m -o assets/js/main.min.js", + "uglify": "uglifyjs assets/js/vendor/jquery/jquery-1.12.4.min.js assets/js/plugins/jquery.fitvids.js assets/js/plugins/jquery.greedy-navigation.js assets/js/plugins/jquery.magnific-popup.js assets/js/plugins/jquery.smooth-scroll.min.js assets/js/_main.js -c -m -o assets/js/main.min.js", "watch:js": "onchange \"assets/js/**/*.js\" -e \"assets/js/main.min.js\" -- npm run build:js", "build:js": "npm run uglify" }