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