text: !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(e){var t,i,n,o,s,r,a="Close",l="BeforeClose",d="AfterClose",c="BeforeAppend",u="MarkupParse",p="Open",f="Change",g="mfp",h="."+g,m="mfp-ready",v="mfp-removing",w="mfp-prevent-close",y=function(){},x=!!window.jQuery,S=e(window),b=function(e,i){t.ev.on(g+e+h,i)},C=function(t,i,n,o){var s=document.createElement("div");return s.className="mfp-"+t,n&&(s.innerHTML=n),o?i&&i.appendChild(s):(s=e(s),i&&s.appendTo(i)),s},T=function(i,n){t.ev.triggerHandler(g+i,n),t.st.callbacks&&(i=i.charAt(0).toLowerCase()+i.slice(1),t.st.callbacks[i]&&t.st.callbacks[i].apply(t,e.isArray(n)?n:[n]))},k=function(i){return i===r&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace("%title%",t.st.tClose)),r=i),t.currTemplate.closeBtn},I=function(){e.magnificPopup.instance||(t=new y,t.init(),e.magnificPopup.instance=t)},E=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};y.prototype={constructor:y,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=E(),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){var o;if(i.isObj===!1){t.items=i.items.toArray(),t.index=0;var r,a=i.items;for(o=0;o<a.length;o++)if(r=a[o],r.parsed&&(r=r.el[0]),r===i.el[0]){t.index=o;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=[],s="",t.ev=i.mainEl&&i.mainEl.length?i.mainEl.eq(0):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=C("bg").on("click"+h,function(){t.close()}),t.wrap=C("wrap").attr("tabindex",-1).on("click"+h,function(e){t._checkIfClose(e.target)&&t.close()}),t.container=C("container",t.wrap)),t.contentContainer=C("content"),t.st.preloader&&(t.preloader=C("preloader",t.container,t.st.tLoading));var l=e.magnificPopup.modules;for(o=0;o<l.length;o++){var d=l[o];d=d.charAt(0).toUpperCase()+d.slice(1),t["init"+d].call(t)}T("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(b(u,function(e,t,i,n){i.close_replaceWith=k(n.type)}),s+=" mfp-close-btn-in"):t.wrap.append(k())),t.st.alignTop&&(s+=" mfp-align-top"),t.wrap.css(t.fixedContentPos?{overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}:{top:S.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()}),S.on("resize"+h,function(){t.updateSize()}),t.st.closeOnContentClick||(s+=" mfp-auto-cursor"),s&&t.wrap.addClass(s);var c=t.wH=S.height(),f={};if(t.fixedContentPos&&t._hasScrollBar(c)){var g=t._getScrollbarSize();g&&(f.marginRight=g)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):f.overflow="hidden");var v=t.st.mainClass;return t.isIE7&&(v+=" mfp-ie7"),v&&t._addClassToMFP(v),t.updateItemHTML(),T("BuildControls"),e("html").css(f),t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo||e(document.body)),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(m),t._setFocus()):t.bgOverlay.addClass(m),n.on("focusin"+h,t._onFocusIn)},16),t.isOpen=!0,t.updateSize(c),T(p),i},close:function(){t.isOpen&&(T(l),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(v),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){T(a);var i=v+" "+m+" ";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,n=window.innerHeight*i;t.wrap.css("height",n),t.wH=n}else t.wH=e||S.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 n=i.type;if(T("BeforeChange",[t.currItem?t.currItem.type:"",n]),t.currItem=i,!t.currTemplate[n]){var s=!!t.st[n]&&t.st[n].markup;T("FirstMarkupParse",s),t.currTemplate[n]=!s||e(s)}o&&o!==i.type&&t.container.removeClass("mfp-"+o+"-holder");var r=t["get"+n.charAt(0).toUpperCase()+n.slice(1)](i,t.currTemplate[n]);t.appendContent(r,n),i.preloaded=!0,T(f,i),o=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(k()):t.content=e:t.content="",T(c),t.container.addClass("mfp-"+i+"-holder"),t.contentContainer.append(t.content)},parseEl:function(i){var n,o=t.items[i];if(o.tagName?o={el:e(o)}:(n=o.type,o={data:o,src:o.src}),o.el){for(var s=t.types,r=0;r<s.length;r++)if(o.el.hasClass("mfp-"+s[r])){n=s[r];break}o.src=o.el.attr("data-mfp-src"),o.src||(o.src=o.el.attr("href"))}return o.type=n||t.st.type||"inline",o.index=i,o.parsed=!0,t.items[i]=o,T("ElementParse",o),t.items[i]},addGroup:function(e,i){var n=function(n){n.mfpEl=this,t._openClick(n,e,i)};i||(i={});var o="click.magnificPopup";i.mainEl=e,i.items?(i.isObj=!0,e.off(o).on(o,n)):(i.isObj=!1,i.delegate?e.off(o).on(o,i.delegate,n):(i.items=e,e.off(o).on(o,n)))},_openClick:function(i,n,o){var s=void 0!==o.midClick?o.midClick:e.magnificPopup.defaults.midClick;if(s||2!==i.which&&!i.ctrlKey&&!i.metaKey){var r=void 0!==o.disableOn?o.disableOn:e.magnificPopup.defaults.disableOn;if(r)if(e.isFunction(r)){if(!r.call(t))return!0}else if(S.width()<r)return!0;i.type&&(i.preventDefault(),t.isOpen&&i.stopPropagation()),o.el=e(i.mfpEl),o.delegate&&(o.items=n.find(o.delegate)),t.open(o)}},updateStatus:function(e,n){if(t.preloader){i!==e&&t.container.removeClass("mfp-s-"+i),n||"loading"!==e||(n=t.st.tLoading);var o={status:e,text:n};T("UpdateStatus",o),e=o.status,n=o.text,t.preloader.html(n),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(w)){var n=t.st.closeOnContentClick,o=t.st.closeOnBgClick;if(n&&o)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(n)return!0}else if(o&&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||S.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,n){var o;n.data&&(i=e.extend(n.data,i)),T(u,[t,i,n]),e.each(i,function(e,i){if(void 0===i||i===!1)return!0;if(o=e.split("_"),o.length>1){var n=t.find(h+"-"+o[0]);if(n.length>0){var s=o[1];"replaceWith"===s?n[0]!==i[0]&&n.replaceWith(i):"img"===s?n.is("img")?n.attr("src",i):n.replaceWith('<img src="'+i+'" class="'+n.attr("class")+'" />'):n.attr(o[1],i)}}else t.find(h+"-"+e).html(i)})},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement("div");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:y.prototype,modules:[],open:function(t,i){return I(),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">&times;</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},e.fn.magnificPopup=function(i){I();var n=e(this);if("string"==typeof i)if("open"===i){var o,s=x?n.data("magnificPopup"):n[0].magnificPopup,r=parseInt(arguments[1],10)||0;s.items?o=s.items[r]:(o=n,s.delegate&&(o=o.find(s.delegate)),o=o.eq(r)),t._openClick({mfpEl:o},n,s)}else t.isOpen&&t[i].apply(t,Array.prototype.slice.call(arguments,1));else i=e.extend(!0,{},i),x?n.data("magnificPopup",i):n[0].magnificPopup=i,t.addGroup(n,i);return n};var P,z,A,M="inline",O=function(){A&&(z.after(A.addClass(P)).detach(),A=null)};e.magnificPopup.registerModule(M,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(M),b(a+"."+M,function(){O()})},getInline:function(i,n){if(O(),i.src){var o=t.st.inline,s=e(i.src);if(s.length){var r=s[0].parentNode;r&&r.tagName&&(z||(P=o.hiddenClass,z=C(P),P="mfp-"+P),A=s.after(z).detach().removeClass(P)),t.updateStatus("ready")}else t.updateStatus("error",o.tNotFound),s=e("<div>");return i.inlineElement=s,s}return t.updateStatus("ready"),t._parseMarkup(n,{},i),n}}});var _,B="ajax",H=function(){_&&e(document.body).removeClass(_)},W=function(){H(),t.req&&t.req.abort()};e.magnificPopup.registerModule(B,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){t.types.push(B),_=t.st.ajax.cursor,b(a+"."+B,W),b("BeforeChange."+B,W)},getAjax:function(i){_&&e(document.body).addClass(_),t.updateStatus("loading");var n=e.extend({url:i.src,success:function(n,o,s){var r={data:n,xhr:s};T("ParseAjax",r),t.appendContent(e(r.data),B),i.finished=!0,H(),t._setFocus(),setTimeout(function(){t.wrap.addClass(m)},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 q,L=function(i){if(i.data&&void 0!==i.data.title)return i.data.title;var n=t.st.image.titleSrc;if(n){if(e.isFunction(n))return n.call(t,i);if(i.el)return i.el.attr(n)||""}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 i=t.st.image,n=".image";t.types.push("image"),b(p+n,function(){"image"===t.currItem.type&&i.cursor&&e(document.body).addClass(i.cursor)}),b(a+n,function(){i.cursor&&e(document.body).removeClass(i.cursor),S.off("resize"+h)}),b("Resize"+n,t.resizeImage),t.isLowIE&&b("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,q&&clearInterval(q),e.isCheckingImgSize=!1,T("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var i=0,n=e.img[0],o=function(s){q&&clearInterval(q),q=setInterval(function(){return n.naturalWidth>0?void t._onImageHasSize(e):(i>200&&clearInterval(q),i++,void(3===i?o(10):40===i?o(50):100===i&&o(500)))},s)};o(1)},getImage:function(i,n){var o=0,s=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")):(o++,200>o?setTimeout(s,100):r()))},r=function(){i&&(i.img.off(".mfploader"),i===t.currItem&&(t._onImageHasSize(i),t.updateStatus("error",a.tError.replace("%url%",i.src))),i.hasSize=!0,i.loaded=!0,i.loadError=!0)},a=t.st.image,l=n.find(".mfp-img");if(l.length){var d=document.createElement("img");d.className="mfp-img",i.el&&i.el.find("img").length&&(d.alt=i.el.find("img").attr("alt")),i.img=e(d).on("load.mfploader",s).on("error.mfploader",r),d.src=i.src,l.is("img")&&(i.img=i.img.clone()),d=i.img[0],d.naturalWidth>0?i.hasSize=!0:d.width||(i.hasSize=!1)}return t._parseMarkup(n,{title:L(i),img_replaceWith:i.img},i),t.resizeImage(),i.hasSize?(q&&clearInterval(q),i.loadError?(n.addClass("mfp-loading"),t.updateStatus("error",a.tError.replace("%url%",i.src))):(n.removeClass("mfp-loading"),t.updateStatus("ready")),n):(t.updateStatus("loading"),i.loading=!0,i.hasSize||(i.imgHidden=!0,n.addClass("mfp-loading"),t.findImageSize(i)),n)}}});var F,D=function(){return void 0===F&&(F=void 0!==document.createElement("p").style.MozTransform),F};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,n=".zoom";if(i.enabled&&t.supportsTransition){var o,s,r=i.duration,d=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),n="all "+i.duration/1e3+"s "+i.easing,o={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},s="transition";return o["-webkit-"+s]=o["-moz-"+s]=o["-o-"+s]=o[s]=n,t.css(o),t},c=function(){t.content.css("visibility","visible")};b("BuildControls"+n,function(){if(t._allowZoom()){if(clearTimeout(o),t.content.css("visibility","hidden"),e=t._getItemToZoom(),!e)return void c();s=d(e),s.css(t._getOffset()),t.wrap.append(s),o=setTimeout(function(){s.css(t._getOffset(!0)),o=setTimeout(function(){c(),setTimeout(function(){s.remove(),e=s=null,T("ZoomAnimationEnded")},16)},r)},16)}}),b(l+n,function(){if(t._allowZoom()){if(clearTimeout(o),t.st.removalDelay=r,!e){if(e=t._getItemToZoom(),!e)return;s=d(e)}s.css(t._getOffset(!0)),t.wrap.append(s),t.content.css("visibility","hidden"),setTimeout(function(){s.css(t._getOffset())},16)}}),b(a+n,function(){t._allowZoom()&&(c(),s&&s.remove(),e=null)})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return!!t.currItem.hasSize&&t.currItem.img},_getOffset:function(i){var n;n=i?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var o=n.offset(),s=parseInt(n.css("padding-top"),10),r=parseInt(n.css("padding-bottom"),10);o.top-=e(window).scrollTop()-s;var a={width:n.width(),height:(x?n.innerHeight():n[0].offsetHeight)-r-s};return D()?a["-moz-transform"]=a.transform="translate("+o.left+"px,"+o.top+"px)":(a.left=o.left,a.top=o.top),a}}});var j="iframe",N="//about:blank",R=function(e){if(t.currTemplate[j]){var i=t.currTemplate[j].find("iframe");i.length&&(e||(i[0].src=N),t.isIE8&&i.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(j,{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(j),b("BeforeChange",function(e,t,i){t!==i&&(t===j?R():i===j&&R(!0))}),b(a+"."+j,function(){R()})},getIframe:function(i,n){var o=i.src,s=t.st.iframe;e.each(s.patterns,function(){return o.indexOf(this.index)>-1?(this.id&&(o="string"==typeof this.id?o.substr(o.lastIndexOf(this.id)+this.id.length,o.length):this.id.call(this,o)),o=this.src.replace("%id%",o),!1):void 0});var r={};return s.srcAction&&(r[s.srcAction]=o),t._parseMarkup(n,r,i),t.updateStatus("ready"),n}}});var V=function(e){var i=t.items.length;return e>i-1?e-i:0>e?i+e:e},Z=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)&&(s+=" mfp-gallery",b(p+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()})}),b("UpdateStatus"+o,function(e,i){i.text&&(i.text=Z(i.text,t.currItem.index,t.items.length))}),b(u+o,function(e,n,o,s){var r=t.items.length;o.counter=r>1?Z(i.tCounter,s.index,r):""}),b("BuildControls"+o,function(){if(t.items.length>1&&i.arrows&&!t.arrowLeft){var n=i.arrowMarkup,o=t.arrowLeft=e(n.replace(/%title%/gi,i.tPrev).replace(/%dir%/gi,"left")).addClass(w),s=t.arrowRight=e(n.replace(/%title%/gi,i.tNext).replace(/%dir%/gi,"right")).addClass(w),a=r?"mfpFastClick":"click";o[a](function(){t.prev()}),s[a](function(){t.next()}),t.isIE7&&(C("b",o[0],!1,!0),C("a",o[0],!1,!0),C("b",s[0],!1,!0),C("a",s[0],!1,!0)),t.container.append(o.add(s))}}),b(f+o,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),void b(a+o,function(){n.off(o),t.wrap.off("click"+o),t.arrowLeft&&r&&t.arrowLeft.add(t.arrowRight).destroyMfpFastClick(),t.arrowRight=t.arrowLeft=null}))},next:function(){t.direction=!0,t.index=V(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=V(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,n=Math.min(i[0],t.items.length),o=Math.min(i[1],t.items.length);for(e=1;e<=(t.direction?o:n);e++)t._preloadItem(t.index+e);for(e=1;e<=(t.direction?n:o);e++)t._preloadItem(t.index-e)},_preloadItem:function(i){if(i=V(i),!t.items[i].preloaded){var n=t.items[i];n.parsed||(n=t.parseEl(i)),T("LazyLoad",n),"image"===n.type&&(n.img=e('<img class="mfp-img" />').on("load.mfploader",function(){n.hasSize=!0}).on("error.mfploader",function(){n.hasSize=!0,n.loadError=!0,T("LazyLoadError",n)}).attr("src",n.src)),n.preloaded=!0}}}});var Q="retina";e.magnificPopup.registerModule(Q,{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&&(b("ImageHasSize."+Q,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/i,width:"100%"})}),b("ElementParse."+Q,function(t,n){n.src=e.replaceSrc(n,i)}))}}}}),function(){var t=1e3,i="ontouchstart"in window,n=function(){S.off("touchmove"+s+" touchend"+s)},o="mfpFastClick",s="."+o;e.fn.mfpFastClick=function(o){return e(this).each(function(){var r,a=e(this);if(i){var l,d,c,u,p,f;a.on("touchstart"+s,function(e){u=!1,f=1,p=e.originalEvent?e.originalEvent.touches[0]:e.touches[0],d=p.clientX,c=p.clientY,S.on("touchmove"+s,function(e){p=e.originalEvent?e.originalEvent.touches:e.touches,f=p.length,p=p[0],(Math.abs(p.clientX-d)>10||Math.abs(p.clientY-c)>10)&&(u=!0,n())}).on("touchend"+s,function(e){n(),u||f>1||(r=!0,e.preventDefault(),clearTimeout(l),l=setTimeout(function(){r=!1},t),o())})})}a.on("click"+s,function(){r||o()})})},e.fn.destroyMfpFastClick=function(){e(this).off("touchstart"+s+" click"+s),i&&S.off("touchmove"+s+" touchend"+s)}}(),I()}),!function(e){var t={},n={mode:"horizontal",slideSelector:"",infiniteLoop:!0,hideControlOnEnd:!1,speed:500,easing:null,slideMargin:0,startSlide:0,randomStart:!1,captions:!1,ticker:!1,tickerHover:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,video:!1,useCSS:!0,preloadImages:"visible",responsive:!0,slideZIndex:50,touchEnabled:!0,swipeThreshold:50,oneToOneTouch:!0,preventDefaultSwipeX:!0,preventDefaultSwipeY:!1,pager:!0,pagerType:"full",pagerShortSeparator:" / ",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!0,nextText:"Next",prevText:"Prev",nextSelector:".nextSlider",prevSelector:".prevSlider",autoControls:!1,startText:"Start",stopText:"Stop",autoControlsCombine:!1,autoControlsSelector:null,auto:!1,pause:4e3,autoStart:!0,autoDirection:"next",autoHover:!1,autoDelay:0,minSlides:1,maxSlides:1,moveSlides:0,slideWidth:0,onSliderLoad:function(){},onSlideBefore:function(){},onSlideAfter:function(){},onSlideNext:function(){},onSlidePrev:function(){},onSliderResize:function(){}};e.fn.bxSlider=function(o){if(0==this.length)return this;if(this.length>1)return this.each(function(){e(this).bxSlider(o)}),this;var s={},r=this;t.el=this;var a=e(window).width(),l=e(window).height(),d=function(){s.settings=e.extend({},n,o),s.settings.slideWidth=parseInt(s.settings.slideWidth),s.children=r.children(s.settings.slideSelector),s.children.length<s.settings.minSlides&&(s.settings.minSlides=s.children.length),s.children.length<s.settings.maxSlides&&(s.settings.maxSlides=s.children.length),s.settings.randomStart&&(s.settings.startSlide=Math.floor(Math.random()*s.children.length)),s.active={index:s.settings.startSlide},s.carousel=s.settings.minSlides>1||s.settings.maxSlides>1,s.carousel&&(s.settings.preloadImages="all"),s.minThreshold=s.settings.minSlides*s.settings.slideWidth+(s.settings.minSlides-1)*s.settings.slideMargin,s.maxThreshold=s.settings.maxSlides*s.settings.slideWidth+(s.settings.maxSlides-1)*s.settings.slideMargin,s.working=!1,s.controls={},s.interval=null,s.animProp="vertical"==s.settings.mode?"top":"left",s.usingCSS=s.settings.useCSS&&"fade"!=s.settings.mode&&function(){var e=document.createElement("div"),t=["WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var i in t)if(void 0!==e.style[t[i]])return s.cssPrefix=t[i].replace("Perspective","").toLowerCase(),s.animProp="-"+s.cssPrefix+"-transform",!0;return!1}(),"vertical"==s.settings.mode&&(s.settings.maxSlides=s.settings.minSlides),r.data("origStyle",r.attr("style")),r.children(s.settings.slideSelector).each(function(){e(this).data("origStyle",e(this).attr("style"))}),c()},c=function(){r.wrap('<div class="bx-wrapper"><div class="bx-viewport"></div></div>'),s.viewport=r.parent(),s.loader=e('<div class="bx-loading" />'),s.viewport.prepend(s.loader),r.css({width:"horizontal"==s.settings.mode?100*s.children.length+215+"%":"auto",position:"relative"}),s.usingCSS&&s.settings.easing?r.css("-"+s.cssPrefix+"-transition-timing-function",s.settings.easing):s.settings.easing||(s.settings.easing="swing"),m(),s.viewport.css({width:"100%",overflow:"hidden",position:"relative"}),s.viewport.parent().css({maxWidth:g()}),s.settings.pager||s.viewport.parent().css({margin:"0 auto 0px"}),s.children.css({float:"horizontal"==s.settings.mode?"left":"none",listStyle:"none",position:"relative"}),s.children.css("width",h()),"horizontal"==s.settings.mode&&s.settings.slideMargin>0&&s.children.css("marginRight",s.settings.slideMargin),"vertical"==s.settings.mode&&s.settings.slideMargin>0&&s.children.css("marginBottom",s.settings.slideMargin),"fade"==s.settings.mode&&(s.children.css({position:"absolute",zIndex:0,display:"none"}),s.children.eq(s.settings.startSlide).css({zIndex:s.settings.slideZIndex,display:"block"})),s.controls.el=e('<div class="bx-controls" />'),s.settings.captions&&k(),s.active.last=s.settings.startSlide==v()-1,s.settings.video&&r.fitVids();var t=s.children.eq(s.settings.startSlide);"all"==s.settings.preloadImages&&(t=s.children),s.settings.ticker?s.settings.pager=!1:(s.settings.pager&&b(),s.settings.controls&&C(),s.settings.auto&&s.settings.autoControls&&T(),(s.settings.controls||s.settings.autoControls||s.settings.pager)&&s.viewport.after(s.controls.el)),u(t,p)},u=function(t,i){var n=t.find("img, iframe").length;if(0==n)return void i();var o=0;t.find("img, iframe").each(function(){e(this).one("load",function(){++o==n&&i()}).each(function(){this.complete&&e(this).trigger("load")})})},p=function(){if(s.settings.infiniteLoop&&"fade"!=s.settings.mode&&!s.settings.ticker){var t="vertical"==s.settings.mode?s.settings.minSlides:s.settings.maxSlides,i=s.children.slice(0,t).clone().addClass("bx-clone"),n=s.children.slice(-t).clone().addClass("bx-clone");r.append(i).prepend(n)}s.loader.remove(),y(),"vertical"==s.settings.mode&&(s.settings.adaptiveHeight=!0),s.viewport.height(f()),r.redrawSlider(),s.settings.onSliderLoad(s.active.index),s.initialized=!0,s.settings.responsive&&e(window).bind("resize",N),s.settings.auto&&s.settings.autoStart&&H(),s.settings.ticker&&W(),s.settings.pager&&M(s.settings.startSlide),s.settings.controls&&B(),s.settings.touchEnabled&&!s.settings.ticker&&L()},f=function(){var t=0,n=e();if("vertical"==s.settings.mode||s.settings.adaptiveHeight)if(s.carousel){var o=1==s.settings.moveSlides?s.active.index:s.active.index*w();for(n=s.children.eq(o),i=1;i<=s.settings.maxSlides-1;i++)n=o+i>=s.children.length?n.add(s.children.eq(i-1)):n.add(s.children.eq(o+i))}else n=s.children.eq(s.active.index);else n=s.children;return"vertical"==s.settings.mode?(n.each(function(){t+=e(this).outerHeight()}),s.settings.slideMargin>0&&(t+=s.settings.slideMargin*(s.settings.minSlides-1))):t=Math.max.apply(Math,n.map(function(){return e(this).outerHeight(!1)}).get()),t},g=function(){var e="100%";return s.settings.slideWidth>0&&(e="horizontal"==s.settings.mode?s.settings.maxSlides*s.settings.slideWidth+(s.settings.maxSlides-1)*s.settings.slideMargin:s.settings.slideWidth),e},h=function(){var e=s.settings.slideWidth,t=s.viewport.width();return 0==s.settings.slideWidth||s.settings.slideWidth>t&&!s.carousel||"vertical"==s.settings.mode?e=t:s.settings.maxSlides>1&&"horizontal"==s.settings.mode&&(t>s.maxThreshold||t<s.minThreshold&&(e=(t-s.settings.slideMargin*(s.settings.minSlides-1))/s.settings.minSlides)),e},m=function(){var e=1;if("horizontal"==s.settings.mode&&s.settings.slideWidth>0)if(s.viewport.width()<s.minThreshold)e=s.settings.minSlides;else if(s.viewport.width()>s.maxThreshold)e=s.settings.maxSlides;else{var t=s.children.first().width();e=Math.floor(s.viewport.width()/t)}else"vertical"==s.settings.mode&&(e=s.settings.minSlides);return e},v=function(){var e=0;if(s.settings.moveSlides>0)if(s.settings.infiniteLoop)e=s.children.length/w();else for(var t=0,i=0;t<s.children.length;)++e,t=i+m(),i+=s.settings.moveSlides<=m()?s.settings.moveSlides:m();else e=Math.ceil(s.children.length/m());return e},w=function(){return s.settings.moveSlides>0&&s.settings.moveSlides<=m()?s.settings.moveSlides:m()},y=function(){if(s.children.length>s.settings.maxSlides&&s.active.last&&!s.settings.infiniteLoop){if("horizontal"==s.settings.mode){var e=s.children.last(),t=e.position();x(-(t.left-(s.viewport.width()-e.width())),"reset",0)}else if("vertical"==s.settings.mode){var i=s.children.length-s.settings.minSlides,t=s.children.eq(i).position();x(-t.top,"reset",0)}}else{var t=s.children.eq(s.active.index*w()).position();s.active.index==v()-1&&(s.active.last=!0),void 0!=t&&("horizontal"==s.settings.mode?x(-t.left,"reset",0):"vertical"==s.settings.mode&&x(-t.top,"reset",0))}},x=function(e,t,i,n){if(s.usingCSS){var o="vertical"==s.settings.mode?"translate3d(0, "+e+"px, 0)":"translate3d("+e+"px, 0, 0)";r.css("-"+s.cssPrefix+"-transition-duration",i/1e3+"s"),"slide"==t?(r.css(s.animProp,o),r.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){r.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),O()})):"reset"==t?r.css(s.animProp,o):"ticker"==t&&(r.css("-"+s.cssPrefix+"-transition-timing-function","linear"),r.css(s.animProp,o),r.bind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){r.unbind("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd"),x(n.resetValue,"reset",0),q()}))}else{var a={};a[s.animProp]=e,"slide"==t?r.animate(a,i,s.settings.easing,function(){O()}):"reset"==t?r.css(s.animProp,e):"ticker"==t&&r.animate(a,speed,"linear",function(){x(n.resetValue,"reset",0),q()})}},S=function(){for(var t="",i=v(),n=0;i>n;n++){var o="";s.settings.buildPager&&e.isFunction(s.settings.buildPager)?(o=s.settings.buildPager(n),s.pagerEl.addClass("bx-custom-pager")):(o=n+1,s.pagerEl.addClass("bx-default-pager")),t+='<div class="bx-pager-item"><a href="" data-slide-index="'+n+'" class="bx-pager-link">'+o+"</a></div>"}s.pagerEl.html(t)},b=function(){s.settings.pagerCustom?s.pagerEl=e(s.settings.pagerCustom):(s.pagerEl=e('<div class="bx-pager" />'),s.settings.pagerSelector?e(s.settings.pagerSelector).html(s.pagerEl):s.controls.el.addClass("bx-has-pager").append(s.pagerEl),S()),s.pagerEl.on("click","a",A)},C=function(){s.controls.next=e(".nextSlider"),s.controls.prev=e(".prevSlider"),s.controls.next.bind("click",I),s.controls.prev.bind("click",E),s.settings.nextSelector&&e(s.settings.nextSelector).append(s.controls.next),s.settings.prevSelector&&e(s.settings.prevSelector).append(s.controls.prev),s.settings.nextSelector||s.settings.prevSelector||(s.controls.directionEl=e('<div class="bx-controls-direction" />'),s.controls.directionEl.append(s.controls.prev).append(s.controls.next),s.controls.el.addClass("bx-has-controls-direction").append(s.controls.directionEl))},T=function(){s.controls.start=e('<div class="bx-controls-auto-item"><a class="bx-start" href="">'+s.settings.startText+"</a></div>"),s.controls.stop=e('<div class="bx-controls-auto-item"><a class="bx-stop" href="">'+s.settings.stopText+"</a></div>"),s.controls.autoEl=e('<div class="bx-controls-auto" />'),s.controls.autoEl.on("click",".bx-start",P),s.controls.autoEl.on("click",".bx-stop",z),s.settings.autoControlsCombine?s.controls.autoEl.append(s.controls.start):s.controls.autoEl.append(s.controls.start).append(s.controls.stop),s.settings.autoControlsSelector?e(s.settings.autoControlsSelector).html(s.controls.autoEl):s.controls.el.addClass("bx-has-controls-auto").append(s.controls.autoEl),_(s.settings.autoStart?"stop":"start")},k=function(){s.children.each(function(){var t=e(this).find("img:first").attr("title");void 0!=t&&(""+t).length&&e(this).append('<div class="bx-caption"><span>'+t+"</span></div>")})},I=function(e){s.settings.auto&&r.stopAuto(),r.goToNextSlide(),e.preventDefault()},E=function(e){s.settings.auto&&r.stopAuto(),r.goToPrevSlide(),e.preventDefault()},P=function(e){r.startAuto(),e.preventDefault()},z=function(e){r.stopAuto(),e.preventDefault()},A=function(t){s.settings.auto&&r.stopAuto();var i=e(t.currentTarget),n=parseInt(i.attr("data-slide-index"));n!=s.active.index&&r.goToSlide(n),t.preventDefault();
  },M=function(t){var i=s.children.length;return"short"==s.settings.pagerType?(s.settings.maxSlides>1&&(i=Math.ceil(s.children.length/s.settings.maxSlides)),void s.pagerEl.html(t+1+s.settings.pagerShortSeparator+i)):(s.pagerEl.find("a").removeClass("active"),void s.pagerEl.each(function(i,n){e(n).find("a").eq(t).addClass("active")}))},O=function(){if(s.settings.infiniteLoop){var e="";0==s.active.index?e=s.children.eq(0).position():s.active.index==v()-1&&s.carousel?e=s.children.eq((v()-1)*w()).position():s.active.index==s.children.length-1&&(e=s.children.eq(s.children.length-1).position()),e&&("horizontal"==s.settings.mode?x(-e.left,"reset",0):"vertical"==s.settings.mode&&x(-e.top,"reset",0))}s.working=!1,s.settings.onSlideAfter(s.children.eq(s.active.index),s.oldIndex,s.active.index)},_=function(e){s.settings.autoControlsCombine?s.controls.autoEl.html(s.controls[e]):(s.controls.autoEl.find("a").removeClass("active"),s.controls.autoEl.find("a:not(.bx-"+e+")").addClass("active"))},B=function(){1==v()?(s.controls.prev.addClass("disabled"),s.controls.next.addClass("disabled")):!s.settings.infiniteLoop&&s.settings.hideControlOnEnd&&(0==s.active.index?(s.controls.prev.addClass("disabled"),s.controls.next.removeClass("disabled")):s.active.index==v()-1?(s.controls.next.addClass("disabled"),s.controls.prev.removeClass("disabled")):(s.controls.prev.removeClass("disabled"),s.controls.next.removeClass("disabled")))},H=function(){s.settings.autoDelay>0?setTimeout(r.startAuto,s.settings.autoDelay):r.startAuto(),s.settings.autoHover&&r.hover(function(){s.interval&&(r.stopAuto(!0),s.autoPaused=!0)},function(){s.autoPaused&&(r.startAuto(!0),s.autoPaused=null)})},W=function(){var t=0;if("next"==s.settings.autoDirection)r.append(s.children.clone().addClass("bx-clone"));else{r.prepend(s.children.clone().addClass("bx-clone"));var i=s.children.first().position();t="horizontal"==s.settings.mode?-i.left:-i.top}x(t,"reset",0),s.settings.pager=!1,s.settings.controls=!1,s.settings.autoControls=!1,s.settings.tickerHover&&!s.usingCSS&&s.viewport.hover(function(){r.stop()},function(){var t=0;s.children.each(function(){t+="horizontal"==s.settings.mode?e(this).outerWidth(!0):e(this).outerHeight(!0)});var i=s.settings.speed/t,n="horizontal"==s.settings.mode?"left":"top",o=i*(t-Math.abs(parseInt(r.css(n))));q(o)}),q()},q=function(e){speed=e?e:s.settings.speed;var t={left:0,top:0},i={left:0,top:0};"next"==s.settings.autoDirection?t=r.find(".bx-clone").first().position():i=s.children.first().position();var n="horizontal"==s.settings.mode?-t.left:-t.top,o="horizontal"==s.settings.mode?-i.left:-i.top,a={resetValue:o};x(n,"ticker",speed,a)},L=function(){s.touch={start:{x:0,y:0},end:{x:0,y:0}},s.viewport.bind("touchstart",F)},F=function(e){if(s.working)e.preventDefault();else{s.touch.originalPos=r.position();var t=e.originalEvent;s.touch.start.x=t.changedTouches[0].pageX,s.touch.start.y=t.changedTouches[0].pageY,s.viewport.bind("touchmove",D),s.viewport.bind("touchend",j)}},D=function(e){var t=e.originalEvent,i=Math.abs(t.changedTouches[0].pageX-s.touch.start.x),n=Math.abs(t.changedTouches[0].pageY-s.touch.start.y);if(3*i>n&&s.settings.preventDefaultSwipeX?e.preventDefault():3*n>i&&s.settings.preventDefaultSwipeY&&e.preventDefault(),"fade"!=s.settings.mode&&s.settings.oneToOneTouch){var o=0;if("horizontal"==s.settings.mode){var r=t.changedTouches[0].pageX-s.touch.start.x;o=s.touch.originalPos.left+r}else{var r=t.changedTouches[0].pageY-s.touch.start.y;o=s.touch.originalPos.top+r}x(o,"reset",0)}},j=function(e){s.viewport.unbind("touchmove",D);var t=e.originalEvent,i=0;if(s.touch.end.x=t.changedTouches[0].pageX,s.touch.end.y=t.changedTouches[0].pageY,"fade"==s.settings.mode){var n=Math.abs(s.touch.start.x-s.touch.end.x);n>=s.settings.swipeThreshold&&(s.touch.start.x>s.touch.end.x?r.goToNextSlide():r.goToPrevSlide(),r.stopAuto())}else{var n=0;"horizontal"==s.settings.mode?(n=s.touch.end.x-s.touch.start.x,i=s.touch.originalPos.left):(n=s.touch.end.y-s.touch.start.y,i=s.touch.originalPos.top),!s.settings.infiniteLoop&&(0==s.active.index&&n>0||s.active.last&&0>n)?x(i,"reset",200):Math.abs(n)>=s.settings.swipeThreshold?(0>n?r.goToNextSlide():r.goToPrevSlide(),r.stopAuto()):x(i,"reset",200)}s.viewport.unbind("touchend",j)},N=function(){var t=e(window).width(),i=e(window).height();(a!=t||l!=i)&&(a=t,l=i,r.redrawSlider(),s.settings.onSliderResize.call(r,s.active.index))};return r.goToSlide=function(t,i){if(!s.working&&s.active.index!=t)if(s.working=!0,s.oldIndex=s.active.index,s.active.index=0>t?v()-1:t>=v()?0:t,s.settings.onSlideBefore(s.children.eq(s.active.index),s.oldIndex,s.active.index),"next"==i?s.settings.onSlideNext(s.children.eq(s.active.index),s.oldIndex,s.active.index):"prev"==i&&s.settings.onSlidePrev(s.children.eq(s.active.index),s.oldIndex,s.active.index),s.active.last=s.active.index>=v()-1,s.settings.pager&&M(s.active.index),s.settings.controls&&B(),"fade"==s.settings.mode)s.settings.adaptiveHeight&&s.viewport.height()!=f()&&s.viewport.animate({height:f()},s.settings.adaptiveHeightSpeed),s.children.filter(":visible").fadeOut(s.settings.speed).css({zIndex:0}),s.children.eq(s.active.index).css("zIndex",s.settings.slideZIndex+1).fadeIn(s.settings.speed,function(){e(this).css("zIndex",s.settings.slideZIndex),O()});else{s.settings.adaptiveHeight&&s.viewport.height()!=f()&&s.viewport.animate({height:f()},s.settings.adaptiveHeightSpeed);var n=0,o={left:0,top:0};if(!s.settings.infiniteLoop&&s.carousel&&s.active.last)if("horizontal"==s.settings.mode){var a=s.children.eq(s.children.length-1);o=a.position(),n=s.viewport.width()-a.outerWidth()}else{var l=s.children.length-s.settings.minSlides;o=s.children.eq(l).position()}else if(s.carousel&&s.active.last&&"prev"==i){var d=1==s.settings.moveSlides?s.settings.maxSlides-w():(v()-1)*w()-(s.children.length-s.settings.maxSlides),a=r.children(".bx-clone").eq(d);o=a.position()}else if("next"==i&&0==s.active.index)o=r.find("> .bx-clone").eq(s.settings.maxSlides).position(),s.active.last=!1;else if(t>=0){var c=t*w();o=s.children.eq(c).position()}if("undefined"!=typeof o){var u="horizontal"==s.settings.mode?-(o.left-n):-o.top;x(u,"slide",s.settings.speed)}}},r.goToNextSlide=function(){if(s.settings.infiniteLoop||!s.active.last){var e=parseInt(s.active.index)+1;r.goToSlide(e,"next")}},r.goToPrevSlide=function(){if(s.settings.infiniteLoop||0!=s.active.index){var e=parseInt(s.active.index)-1;r.goToSlide(e,"prev")}},r.startAuto=function(e){s.interval||(s.interval=setInterval(function(){"next"==s.settings.autoDirection?r.goToNextSlide():r.goToPrevSlide()},s.settings.pause),s.settings.autoControls&&1!=e&&_("stop"))},r.stopAuto=function(e){s.interval&&(clearInterval(s.interval),s.interval=null,s.settings.autoControls&&1!=e&&_("start"))},r.getCurrentSlide=function(){return s.active.index},r.getCurrentSlideElement=function(){return s.children.eq(s.active.index)},r.getSlideCount=function(){return s.children.length},r.redrawSlider=function(){s.children.add(r.find(".bx-clone")).outerWidth(h()),s.viewport.css("height",f()),s.settings.ticker||y(),s.active.last&&(s.active.index=v()-1),s.active.index>=v()&&(s.active.last=!0),s.settings.pager&&!s.settings.pagerCustom&&(S(),M(s.active.index))},r.destroySlider=function(){s.initialized&&(s.initialized=!1,e(".bx-clone",this).remove(),s.children.each(function(){void 0!=e(this).data("origStyle")?e(this).attr("style",e(this).data("origStyle")):e(this).removeAttr("style")}),void 0!=e(this).data("origStyle")?this.attr("style",e(this).data("origStyle")):e(this).removeAttr("style"),e(this).unwrap().unwrap(),s.controls.el&&s.controls.el.remove(),s.controls.next&&s.controls.next.remove(),s.controls.prev&&s.controls.prev.remove(),s.pagerEl&&s.settings.controls&&s.pagerEl.remove(),e(".bx-caption",this).remove(),s.controls.autoEl&&s.controls.autoEl.remove(),clearInterval(s.interval),s.settings.responsive&&e(window).unbind("resize",N))},r.reloadSlider=function(e){void 0!=e&&(o=e),r.destroySlider(),d()},d(),this}}(jQuery),function(){"use strict";function e(n){if(!n)throw new Error("No options passed to Waypoint constructor");if(!n.element)throw new Error("No element option passed to Waypoint constructor");if(!n.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+t,this.options=e.Adapter.extend({},e.defaults,n),this.element=this.options.element,this.adapter=new e.Adapter(this.element),this.callback=n.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=e.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=e.Context.findOrCreateByElement(this.options.context),e.offsetAliases[this.options.offset]&&(this.options.offset=e.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),i[this.key]=this,t+=1}var t=0,i={};e.prototype.queueTrigger=function(e){this.group.queueTrigger(this,e)},e.prototype.trigger=function(e){this.enabled&&this.callback&&this.callback.apply(this,e)},e.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete i[this.key]},e.prototype.disable=function(){return this.enabled=!1,this},e.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},e.prototype.next=function(){return this.group.next(this)},e.prototype.previous=function(){return this.group.previous(this)},e.invokeAll=function(e){var t=[];for(var n in i)t.push(i[n]);for(var o=0,s=t.length;o<s;o++)t[o][e]()},e.destroyAll=function(){e.invokeAll("destroy")},e.disableAll=function(){e.invokeAll("disable")},e.enableAll=function(){e.Context.refreshAll();for(var t in i)i[t].enabled=!0;return this},e.refreshAll=function(){e.Context.refreshAll()},e.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},e.viewportWidth=function(){return document.documentElement.clientWidth},e.adapters=[],e.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},e.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=e}(),function(){"use strict";function e(e){window.setTimeout(e,1e3/60)}function t(e){this.element=e,this.Adapter=o.Adapter,this.adapter=new this.Adapter(e),this.key="waypoint-context-"+i,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},e.waypointContextKey=this.key,n[e.waypointContextKey]=this,i+=1,o.windowContext||(o.windowContext=!0,o.windowContext=new t(window)),this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var i=0,n={},o=window.Waypoint,s=window.onload;t.prototype.add=function(e){var t=e.options.horizontal?"horizontal":"vertical";this.waypoints[t][e.key]=e,this.refresh()},t.prototype.checkEmpty=function(){var e=this.Adapter.isEmptyObject(this.waypoints.horizontal),t=this.Adapter.isEmptyObject(this.waypoints.vertical),i=this.element==this.element.window;e&&t&&!i&&(this.adapter.off(".waypoints"),delete n[this.key])},t.prototype.createThrottledResizeHandler=function(){function e(){t.handleResize(),t.didResize=!1}var t=this;this.adapter.on("resize.waypoints",function(){t.didResize||(t.didResize=!0,o.requestAnimationFrame(e))})},t.prototype.createThrottledScrollHandler=function(){function e(){t.handleScroll(),t.didScroll=!1}var t=this;this.adapter.on("scroll.waypoints",function(){t.didScroll&&!o.isTouch||(t.didScroll=!0,o.requestAnimationFrame(e))})},t.prototype.handleResize=function(){o.Context.refreshAll()},t.prototype.handleScroll=function(){var e={},t={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var i in t){var n=t[i],o=n.newScroll>n.oldScroll,s=o?n.forward:n.backward;for(var r in this.waypoints[i]){var a=this.waypoints[i][r];if(null!==a.triggerPoint){var l=n.oldScroll<a.triggerPoint,d=n.newScroll>=a.triggerPoint,c=l&&d,u=!l&&!d;(c||u)&&(a.queueTrigger(s),e[a.group.id]=a.group)}}}for(var p in e)e[p].flushTriggers();this.oldScroll={x:t.horizontal.newScroll,y:t.vertical.newScroll}},t.prototype.innerHeight=function(){return this.element==this.element.window?o.viewportHeight():this.adapter.innerHeight()},t.prototype.remove=function(e){delete this.waypoints[e.axis][e.key],this.checkEmpty()},t.prototype.innerWidth=function(){return this.element==this.element.window?o.viewportWidth():this.adapter.innerWidth()},t.prototype.destroy=function(){var e=[];for(var t in this.waypoints)for(var i in this.waypoints[t])e.push(this.waypoints[t][i]);for(var n=0,o=e.length;n<o;n++)e[n].destroy()},t.prototype.refresh=function(){var e,t=this.element==this.element.window,i=t?void 0:this.adapter.offset(),n={};this.handleScroll(),e={horizontal:{contextOffset:t?0:i.left,contextScroll:t?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:t?0:i.top,contextScroll:t?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};for(var s in e){var r=e[s];for(var a in this.waypoints[s]){var l,d,c,u,p,f=this.waypoints[s][a],g=f.options.offset,h=f.triggerPoint,m=0,v=null==h;f.element!==f.element.window&&(m=f.adapter.offset()[r.offsetProp]),"function"==typeof g?g=g.apply(f):"string"==typeof g&&(g=parseFloat(g),f.options.offset.indexOf("%")>-1&&(g=Math.ceil(r.contextDimension*g/100))),l=r.contextScroll-r.contextOffset,f.triggerPoint=Math.floor(m+l-g),d=h<r.oldScroll,c=f.triggerPoint>=r.oldScroll,u=d&&c,p=!d&&!c,!v&&u?(f.queueTrigger(r.backward),n[f.group.id]=f.group):!v&&p?(f.queueTrigger(r.forward),n[f.group.id]=f.group):v&&r.oldScroll>=f.triggerPoint&&(f.queueTrigger(r.forward),n[f.group.id]=f.group)}}return o.requestAnimationFrame(function(){for(var e in n)n[e].flushTriggers()}),this},t.findOrCreateByElement=function(e){return t.findByElement(e)||new t(e)},t.refreshAll=function(){for(var e in n)n[e].refresh()},t.findByElement=function(e){return n[e.waypointContextKey]},window.onload=function(){s&&s(),t.refreshAll()},o.requestAnimationFrame=function(t){var i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||e;i.call(window,t)},o.Context=t}(),function(){"use strict";function e(e,t){return e.triggerPoint-t.triggerPoint}function t(e,t){return t.triggerPoint-e.triggerPoint}function i(e){this.name=e.name,this.axis=e.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),n[this.axis][this.name]=this}var n={vertical:{},horizontal:{}},o=window.Waypoint;i.prototype.add=function(e){this.waypoints.push(e)},i.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},i.prototype.flushTriggers=function(){for(var i in this.triggerQueues){var n=this.triggerQueues[i],o="up"===i||"left"===i;n.sort(o?t:e);for(var s=0,r=n.length;s<r;s+=1){var a=n[s];(a.options.continuous||s===n.length-1)&&a.trigger([i])}}this.clearTriggerQueues()},i.prototype.next=function(t){this.waypoints.sort(e);var i=o.Adapter.inArray(t,this.waypoints),n=i===this.waypoints.length-1;return n?null:this.waypoints[i+1]},i.prototype.previous=function(t){this.waypoints.sort(e);var i=o.Adapter.inArray(t,this.waypoints);return i?this.waypoints[i-1]:null},i.prototype.queueTrigger=function(e,t){this.triggerQueues[t].push(e)},i.prototype.remove=function(e){var t=o.Adapter.inArray(e,this.waypoints);t>-1&&this.waypoints.splice(t,1)},i.prototype.first=function(){return this.waypoints[0]},i.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},i.findOrCreate=function(e){return n[e.axis][e.name]||new i(e)},o.Group=i}(),function(){"use strict";function e(e){this.$element=t(e)}var t=window.jQuery,i=window.Waypoint;t.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(t,i){e.prototype[i]=function(){var e=Array.prototype.slice.call(arguments);return this.$element[i].apply(this.$element,e)}}),t.each(["extend","inArray","isEmptyObject"],function(i,n){e[n]=t[n]}),i.adapters.push({name:"jquery",Adapter:e}),i.Adapter=e}(),function(){"use strict";function e(e){return function(){var i=[],n=arguments[0];return e.isFunction(arguments[0])&&(n=e.extend({},arguments[1]),n.handler=arguments[0]),this.each(function(){var o=e.extend({},n,{element:this});"string"==typeof o.context&&(o.context=e(this).closest(o.context)[0]),i.push(new t(o))}),i}}var t=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=e(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=e(window.Zepto))}(),function(e,t){var i={ratio:16/9,videoId:"ZCAnLxRvNNc",mute:!0,repeat:!0,width:e(t).width(),wrapperZIndex:99,playButtonClass:"tubular-play",pauseButtonClass:"tubular-pause",muteButtonClass:"tubular-mute",volumeUpClass:"tubular-volume-up",volumeDownClass:"tubular-volume-down",increaseVolumeBy:10,start:0},n=function(n,o){var o=e.extend({},i,o),s=e("body");$node=e(n);var r='<div id="tubular-container" style="overflow: hidden; position: fixed; z-index: 1; width: 100%; height: 100%"><div id="tubular-player" style="position: absolute"></div></div><div id="tubular-shield" style="width: 100%; height: 100%; z-index: 2; position: absolute; left: 0; top: 0;"></div>';e("html,body").css({width:"100%",height:"100%"}),s.prepend(r),$node.css({position:"relative","z-index":o.wrapperZIndex}),t.player,t.onYouTubeIframeAPIReady=function(){player=new YT.Player("tubular-player",{width:o.width,height:Math.ceil(o.width/o.ratio),videoId:o.videoId,playerVars:{controls:0,showinfo:0,modestbranding:1,wmode:"transparent"},events:{onReady:onPlayerReady,onStateChange:onPlayerStateChange}})},t.onPlayerReady=function(e){a(),o.mute&&e.target.mute(),e.target.seekTo(o.start),e.target.playVideo()},t.onPlayerStateChange=function(e){0===e.data&&o.repeat&&player.seekTo(o.start)};var a=function(){var i,n,s=e(t).width(),r=e(t).height(),a=e("#tubular-player");s/o.ratio<r?(i=Math.ceil(r*o.ratio),a.width(i).height(r).css({left:(s-i)/2,top:0})):(n=Math.ceil(s/o.ratio),a.width(s).height(n).css({left:0,top:(r-n)/2}))};e(t).on("resize.tubular",function(){a()}),e("body").on("click","."+o.playButtonClass,function(e){e.preventDefault(),player.playVideo()}).on("click","."+o.pauseButtonClass,function(e){e.preventDefault(),player.pauseVideo()}).on("click","."+o.muteButtonClass,function(e){e.preventDefault(),player.isMuted()?player.unMute():player.mute()}).on("click","."+o.volumeDownClass,function(e){e.preventDefault();var t=player.getVolume();t<o.increaseVolumeBy&&(t=o.increaseVolumeBy),player.setVolume(t-o.increaseVolumeBy)}).on("click","."+o.volumeUpClass,function(e){e.preventDefault(),player.isMuted()&&player.unMute();var t=player.getVolume();t>100-o.increaseVolumeBy&&(t=100-o.increaseVolumeBy),player.setVolume(t+o.increaseVolumeBy)})},o=document.createElement("script");o.src="//www.youtube.com/iframe_api";var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(o,s),e.fn.tubular=function(t){return this.each(function(){e.data(this,"tubular_instantiated")||e.data(this,"tubular_instantiated",n(this,t))})}}(jQuery,window);