(function(e){if(typeof define==="function"&&define.amd){define(["jquery"],e)}else if(typeof exports==="object"){e(require("jquery"))}else{e(window.jQuery||window.Zepto)}})(function(c){var l="Close",f="BeforeClose",i="AfterClose",n="BeforeAppend",u="MarkupParse",d="Open",r="Change",a="mfp",p="."+a,m="mfp-ready",o="mfp-removing",s="mfp-prevent-close";var g,e=function(){},v=!!window.jQuery,h,y=c(window),C,w,b,t;var I=function(e,t){g.ev.on(a+e+p,t)},x=function(e,t,i,n){var r=document.createElement("div");r.className="mfp-"+e;if(i){r.innerHTML=i}if(!n){r=c(r);if(t){r.appendTo(t)}}else if(t){t.appendChild(r)}return r},k=function(e,t){g.ev.triggerHandler(a+e,t);if(g.st.callbacks){e=e.charAt(0).toLowerCase()+e.slice(1);if(g.st.callbacks[e]){g.st.callbacks[e].apply(g,c.isArray(t)?t:[t])}}},T=function(e){if(e!==t||!g.currTemplate.closeBtn){g.currTemplate.closeBtn=c(g.st.closeMarkup.replace("%title%",g.st.tClose));t=e}return g.currTemplate.closeBtn},_=function(){if(!c.magnificPopup.instance){g=new e;g.init();c.magnificPopup.instance=g}},P=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(e["transition"]!==undefined){return true}while(t.length){if(t.pop()+"Transition"in e){return true}}return false};e.prototype={constructor:e,init:function(){var e=navigator.appVersion;g.isLowIE=g.isIE8=document.all&&!document.addEventListener;g.isAndroid=/android/gi.test(e);g.isIOS=/iphone|ipad|ipod/gi.test(e);g.supportsTransition=P();g.probablyMobile=g.isAndroid||g.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent);C=c(document);g.popupsCache={}},open:function(e){var t;if(e.isObj===false){g.items=e.items.toArray();g.index=0;var i=e.items,n;for(t=0;t<i.length;t++){n=i[t];if(n.parsed){n=n.el[0]}if(n===e.el[0]){g.index=t;break}}}else{g.items=c.isArray(e.items)?e.items:[e.items];g.index=e.index||0}if(g.isOpen){g.updateItemHTML();return}g.types=[];b="";if(e.mainEl&&e.mainEl.length){g.ev=e.mainEl.eq(0)}else{g.ev=C}if(e.key){if(!g.popupsCache[e.key]){g.popupsCache[e.key]={}}g.currTemplate=g.popupsCache[e.key]}else{g.currTemplate={}}g.st=c.extend(true,{},c.magnificPopup.defaults,e);g.fixedContentPos=g.st.fixedContentPos==="auto"?!g.probablyMobile:g.st.fixedContentPos;if(g.st.modal){g.st.closeOnContentClick=false;g.st.closeOnBgClick=false;g.st.showCloseBtn=false;g.st.enableEscapeKey=false}if(!g.bgOverlay){g.bgOverlay=x("bg").on("click"+p,function(){g.close()});g.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(e){if(g._checkIfClose(e.target)){g.close()}});g.container=x("container",g.wrap)}g.contentContainer=x("content");if(g.st.preloader){g.preloader=x("preloader",g.container,g.st.tLoading)}var r=c.magnificPopup.modules;for(t=0;t<r.length;t++){var a=r[t];a=a.charAt(0).toUpperCase()+a.slice(1);g["init"+a].call(g)}k("BeforeOpen");if(g.st.showCloseBtn){if(!g.st.closeBtnInside){g.wrap.append(T())}else{I(u,function(e,t,i,n){i.close_replaceWith=T(n.type)});b+=" mfp-close-btn-in"}}if(g.st.alignTop){b+=" mfp-align-top"}if(g.fixedContentPos){g.wrap.css({overflow:g.st.overflowY,overflowX:"hidden",overflowY:g.st.overflowY})}else{g.wrap.css({top:y.scrollTop(),position:"absolute"})}if(g.st.fixedBgPos===false||g.st.fixedBgPos==="auto"&&!g.fixedContentPos){g.bgOverlay.css({height:C.height(),position:"absolute"})}if(g.st.enableEscapeKey){C.on("keyup"+p,function(e){if(e.keyCode===27){g.close()}})}y.on("resize"+p,function(){g.updateSize()});if(!g.st.closeOnContentClick){b+=" mfp-auto-cursor"}if(b)g.wrap.addClass(b);var o=g.wH=y.height();var s={};if(g.fixedContentPos){if(g._hasScrollBar(o)){var l=g._getScrollbarSize();if(l){s.marginRight=l}}}if(g.fixedContentPos){if(!g.isIE7){s.overflow="hidden"}else{c("body, html").css("overflow","hidden")}}var f=g.st.mainClass;if(g.isIE7){f+=" mfp-ie7"}if(f){g._addClassToMFP(f)}g.updateItemHTML();k("BuildControls");c("html").css(s);g.bgOverlay.add(g.wrap).prependTo(g.st.prependTo||c(document.body));g._lastFocusedEl=document.activeElement;setTimeout(function(){if(g.content){g._addClassToMFP(m);g._setFocus()}else{g.bgOverlay.addClass(m)}C.on("focusin"+p,g._onFocusIn)},16);g.isOpen=true;g.updateSize(o);k(d);return e},close:function(){if(!g.isOpen)return;k(f);g.isOpen=false;if(g.st.removalDelay&&!g.isLowIE&&g.supportsTransition){g._addClassToMFP(o);setTimeout(function(){g._close()},g.st.removalDelay)}else{g._close()}},_close:function(){k(l);var e=o+" "+m+" ";g.bgOverlay.detach();g.wrap.detach();g.container.empty();if(g.st.mainClass){e+=g.st.mainClass+" "}g._removeClassFromMFP(e);if(g.fixedContentPos){var t={marginRight:""};if(g.isIE7){c("body, html").css("overflow","")}else{t.overflow=""}c("html").css(t)}C.off("keyup"+p+" focusin"+p);g.ev.off(p);g.wrap.attr("class","mfp-wrap").removeAttr("style");g.bgOverlay.attr("class","mfp-bg");g.container.attr("class","mfp-container");if(g.st.showCloseBtn&&(!g.st.closeBtnInside||g.currTemplate[g.currItem.type]===true)){if(g.currTemplate.closeBtn)g.currTemplate.closeBtn.detach()}if(g.st.autoFocusLast&&g._lastFocusedEl){c(g._lastFocusedEl).focus()}g.currItem=null;g.content=null;g.currTemplate=null;g.prevHeight=0;k(i)},updateSize:function(e){if(g.isIOS){var t=document.documentElement.clientWidth/window.innerWidth;var i=window.innerHeight*t;g.wrap.css("height",i);g.wH=i}else{g.wH=e||y.height()}if(!g.fixedContentPos){g.wrap.css("height",g.wH)}k("Resize")},updateItemHTML:function(){var e=g.items[g.index];g.contentContainer.detach();if(g.content)g.content.detach();if(!e.parsed){e=g.parseEl(g.index)}var t=e.type;k("BeforeChange",[g.currItem?g.currItem.type:"",t]);g.currItem=e;if(!g.currTemplate[t]){var i=g.st[t]?g.st[t].markup:false;k("FirstMarkupParse",i);if(i){g.currTemplate[t]=c(i)}else{g.currTemplate[t]=true}}if(w&&w!==e.type){g.container.removeClass("mfp-"+w+"-holder")}var n=g["get"+t.charAt(0).toUpperCase()+t.slice(1)](e,g.currTemplate[t]);g.appendContent(n,t);e.preloaded=true;k(r,e);w=e.type;g.container.prepend(g.contentContainer);k("AfterChange")},appendContent:function(e,t){g.content=e;if(e){if(g.st.showCloseBtn&&g.st.closeBtnInside&&g.currTemplate[t]===true){if(!g.content.find(".mfp-close").length){g.content.append(T())}}else{g.content=e}}else{g.content=""}k(n);g.container.addClass("mfp-"+t+"-holder");g.contentContainer.append(g.content)},parseEl:function(e){var t=g.items[e],i;if(t.tagName){t={el:c(t)}}else{i=t.type;t={data:t,src:t.src}}if(t.el){var n=g.types;for(var r=0;r<n.length;r++){if(t.el.hasClass("mfp-"+n[r])){i=n[r];break}}t.src=t.el.attr("data-mfp-src");if(!t.src){t.src=t.el.attr("href")||t.el.attr("src")}if(!i){i=t.el.attr("data-mfp-type")}}t.type=i||g.st.type||"inline";t.index=e;t.parsed=true;g.items[e]=t;k("ElementParse",t);return g.items[e]},addGroup:function(t,i){var e=function(e){e.mfpEl=this;g._openClick(e,t,i)};if(!i){i={}}var n="click.magnificPopup";i.mainEl=t;if(i.items){i.isObj=true;t.off(n).on(n,e)}else{i.isObj=false;if(i.delegate){t.off(n).on(n,i.delegate,e)}else{i.items=t;t.off(n).on(n,e)}}},_openClick:function(e,t,i){var n=i.midClick!==undefined?i.midClick:c.magnificPopup.defaults.midClick;if(!n&&(e.which===2||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey)){return}var r=i.disableOn!==undefined?i.disableOn:c.magnificPopup.defaults.disableOn;if(r){if(c.isFunction(r)){if(!r.call(g)){return true}}else{if(y.width()<r){return true}}}if(e.type){e.preventDefault();if(g.isOpen){e.stopPropagation()}}i.el=c(e.mfpEl);if(i.delegate){i.items=t.find(i.delegate)}g.open(i)},updateStatus:function(e,t){if(g.preloader){if(h!==e){g.container.removeClass("mfp-s-"+h)}if(!t&&e==="loading"){t=g.st.tLoading}var i={status:e,text:t};k("UpdateStatus",i);e=i.status;t=i.text;g.preloader.html(t);g.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()});g.container.addClass("mfp-s-"+e);h=e}},_checkIfClose:function(e){if(c(e).hasClass(s)){return}var t=g.st.closeOnContentClick;var i=g.st.closeOnBgClick;if(t&&i){return true}else{if(!g.content||c(e).hasClass("mfp-close")||g.preloader&&e===g.preloader[0]){return true}if(e!==g.content[0]&&!c.contains(g.content[0],e)){if(i){if(c.contains(document,e)){return true}}}else if(t){return true}}return false},_addClassToMFP:function(e){g.bgOverlay.addClass(e);g.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e);g.wrap.removeClass(e)},_hasScrollBar:function(e){return(g.isIE7?C.height():document.body.scrollHeight)>(e||y.height())},_setFocus:function(){(g.st.focus?g.content.find(g.st.focus).eq(0):g.wrap).focus()},_onFocusIn:function(e){if(e.target!==g.wrap[0]&&!c.contains(g.wrap[0],e.target)){g._setFocus();return false}},_parseMarkup:function(r,e,t){var a;if(t.data){e=c.extend(t.data,e)}k(u,[r,e,t]);c.each(e,function(e,t){if(t===undefined||t===false){return true}a=e.split("_");if(a.length>1){var i=r.find(p+"-"+a[0]);if(i.length>0){var n=a[1];if(n==="replaceWith"){if(i[0]!==t[0]){i.replaceWith(t)}}else if(n==="img"){if(i.is("img")){i.attr("src",t)}else{i.replaceWith(c("<img>").attr("src",t).attr("class",i.attr("class")))}}else{i.attr(a[1],t)}}}else{r.find(p+"-"+e).html(t)}})},_getScrollbarSize:function(){if(g.scrollbarSize===undefined){var e=document.createElement("div");e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;";document.body.appendChild(e);g.scrollbarSize=e.offsetWidth-e.clientWidth;document.body.removeChild(e)}return g.scrollbarSize}};c.magnificPopup={instance:null,proto:e.prototype,modules:[],open:function(e,t){_();if(!e){e={}}else{e=c.extend(true,{},e)}e.isObj=true;e.index=t||0;return this.instance.open(e)},close:function(){return c.magnificPopup.instance&&c.magnificPopup.instance.close()},registerModule:function(e,t){if(t.options){c.magnificPopup.defaults[e]=t.options}c.extend(this.proto,t.proto);this.modules.push(e)},defaults:{disableOn:0,key:null,midClick:false,mainClass:"",preloader:true,focus:"",closeOnContentClick:false,closeOnBgClick:true,closeBtnInside:true,showCloseBtn:true,enableEscapeKey:true,modal:false,alignTop:false,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:true}};c.fn.magnificPopup=function(e){_();var t=c(this);if(typeof e==="string"){if(e==="open"){var i,n=v?t.data("magnificPopup"):t[0].magnificPopup,r=parseInt(arguments[1],10)||0;if(n.items){i=n.items[r]}else{i=t;if(n.delegate){i=i.find(n.delegate)}i=i.eq(r)}g._openClick({mfpEl:i},t,n)}else{if(g.isOpen)g[e].apply(g,Array.prototype.slice.call(arguments,1))}}else{e=c.extend(true,{},e);if(v){t.data("magnificPopup",e)}else{t[0].magnificPopup=e}g.addGroup(t,e)}return t};var S="inline",E,z,O,M=function(){if(O){z.after(O.addClass(E)).detach();O=null}};c.magnificPopup.registerModule(S,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){g.types.push(S);I(l+"."+S,function(){M()})},getInline:function(e,t){M();if(e.src){var i=g.st.inline,n=c(e.src);if(n.length){var r=n[0].parentNode;if(r&&r.tagName){if(!z){E=i.hiddenClass;z=x(E);E="mfp-"+E}O=n.after(z).detach().removeClass(E)}g.updateStatus("ready")}else{g.updateStatus("error",i.tNotFound);n=c("<div>")}e.inlineElement=n;return n}g.updateStatus("ready");g._parseMarkup(t,{},e);return t}}});var B="ajax",L,H=function(){if(L){c(document.body).removeClass(L)}},A=function(){H();if(g.req){g.req.abort()}};c.magnificPopup.registerModule(B,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){g.types.push(B);L=g.st.ajax.cursor;I(l+"."+B,A);I("BeforeChange."+B,A)},getAjax:function(r){if(L){c(document.body).addClass(L)}g.updateStatus("loading");var e=c.extend({url:r.src,success:function(e,t,i){var n={data:e,xhr:i};k("ParseAjax",n);g.appendContent(c(n.data),B);r.finished=true;H();g._setFocus();setTimeout(function(){g.wrap.addClass(m)},16);g.updateStatus("ready");k("AjaxContentAdded")},error:function(){H();r.finished=r.loadError=true;g.updateStatus("error",g.st.ajax.tError.replace("%url%",r.src))}},g.st.ajax.settings);g.req=c.ajax(e);return""}}});var F,j=function(e){if(e.data&&e.data.title!==undefined)return e.data.title;var t=g.st.image.titleSrc;if(t){if(c.isFunction(t)){return t.call(g,e)}else if(e.el){return e.el.attr(t)||""}}return""};c.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure">'+'<div class="mfp-close"></div>'+"<figure>"+'<div class="mfp-img"></div>'+"<figcaption>"+'<div class="mfp-bottom-bar">'+'<div class="mfp-title"></div>'+'<div class="mfp-counter"></div>'+"</div>"+"</figcaption>"+"</figure>"+"</div>",cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:true,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var e=g.st.image,t=".image";g.types.push("image");I(d+t,function(){if(g.currItem.type==="image"&&e.cursor){c(document.body).addClass(e.cursor)}});I(l+t,function(){if(e.cursor){c(document.body).removeClass(e.cursor)}y.off("resize"+p)});I("Resize"+t,g.resizeImage);if(g.isLowIE){I("AfterChange",g.resizeImage)}},resizeImage:function(){var e=g.currItem;if(!e||!e.img)return;if(g.st.image.verticalFit){var t=0;if(g.isLowIE){t=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)}e.img.css("max-height",g.wH-t)}},_onImageHasSize:function(e){if(e.img){e.hasSize=true;if(F){clearInterval(F)}e.isCheckingImgSize=false;k("ImageHasSize",e);if(e.imgHidden){if(g.content)g.content.removeClass("mfp-loading");e.imgHidden=false}}},findImageSize:function(t){var i=0,n=t.img[0],r=function(e){if(F){clearInterval(F)}F=setInterval(function(){if(n.naturalWidth>0){g._onImageHasSize(t);return}if(i>200){clearInterval(F)}i++;if(i===3){r(10)}else if(i===40){r(50)}else if(i===100){r(500)}},e)};r(1)},getImage:function(e,t){var i=0,n=function(){if(e){if(e.img[0].complete){e.img.off(".mfploader");if(e===g.currItem){g._onImageHasSize(e);g.updateStatus("ready")}e.hasSize=true;e.loaded=true;k("ImageLoadComplete")}else{i++;if(i<200){setTimeout(n,100)}else{r()}}}},r=function(){if(e){e.img.off(".mfploader");if(e===g.currItem){g._onImageHasSize(e);g.updateStatus("error",a.tError.replace("%url%",e.src))}e.hasSize=true;e.loaded=true;e.loadError=true}},a=g.st.image;var o=t.find(".mfp-img");if(o.length){var s=document.createElement("img");s.className="mfp-img";if(e.el&&e.el.find("img").length){s.alt=e.el.find("img").attr("alt")}e.img=c(s).on("load.mfploader",n).on("error.mfploader",r);s.src=e.src;if(o.is("img")){e.img=e.img.clone()}s=e.img[0];if(s.naturalWidth>0){e.hasSize=true}else if(!s.width){e.hasSize=false}}g._parseMarkup(t,{title:j(e),img_replaceWith:e.img},e);g.resizeImage();if(e.hasSize){if(F)clearInterval(F);if(e.loadError){t.addClass("mfp-loading");g.updateStatus("error",a.tError.replace("%url%",e.src))}else{t.removeClass("mfp-loading");g.updateStatus("ready")}return t}g.updateStatus("loading");e.loading=true;if(!e.hasSize){e.imgHidden=true;t.addClass("mfp-loading");g.findImageSize(e)}return t}}});var N,W=function(){if(N===undefined){N=document.createElement("p").style.MozTransform!==undefined}return N};c.magnificPopup.registerModule("zoom",{options:{enabled:false,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var a=g.st.zoom,e=".zoom",t;if(!a.enabled||!g.supportsTransition){return}var i=a.duration,n=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),i="all "+a.duration/1e3+"s "+a.easing,n={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},r="transition";n["-webkit-"+r]=n["-moz-"+r]=n["-o-"+r]=n[r]=i;t.css(n);return t},r=function(){g.content.css("visibility","visible")},o,s;I("BuildControls"+e,function(){if(g._allowZoom()){clearTimeout(o);g.content.css("visibility","hidden");t=g._getItemToZoom();if(!t){r();return}s=n(t);s.css(g._getOffset());g.wrap.append(s);o=setTimeout(function(){s.css(g._getOffset(true));o=setTimeout(function(){r();setTimeout(function(){s.remove();t=s=null;k("ZoomAnimationEnded")},16)},i)},16)}});I(f+e,function(){if(g._allowZoom()){clearTimeout(o);g.st.removalDelay=i;if(!t){t=g._getItemToZoom();if(!t){return}s=n(t)}s.css(g._getOffset(true));g.wrap.append(s);g.content.css("visibility","hidden");setTimeout(function(){s.css(g._getOffset())},16)}});I(l+e,function(){if(g._allowZoom()){r();if(s){s.remove()}t=null}})},_allowZoom:function(){return g.currItem.type==="image"},_getItemToZoom:function(){if(g.currItem.hasSize){return g.currItem.img}else{return false}},_getOffset:function(e){var t;if(e){t=g.currItem.img}else{t=g.st.zoom.opener(g.currItem.el||g.currItem)}var i=t.offset();var n=parseInt(t.css("padding-top"),10);var r=parseInt(t.css("padding-bottom"),10);i.top-=c(window).scrollTop()-n;var a={width:t.width(),height:(v?t.innerHeight():t[0].offsetHeight)-r-n};if(W()){a["-moz-transform"]=a["transform"]="translate("+i.left+"px,"+i.top+"px)"}else{a.left=i.left;a.top=i.top}return a}}});var Z="iframe",q="//about:blank",R=function(e){if(g.currTemplate[Z]){var t=g.currTemplate[Z].find("iframe");if(t.length){if(!e){t[0].src=q}if(g.isIE8){t.css("display",e?"block":"none")}}}};c.magnificPopup.registerModule(Z,{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(){g.types.push(Z);I("BeforeChange",function(e,t,i){if(t!==i){if(t===Z){R()}else if(i===Z){R(true)}}});I(l+"."+Z,function(){R()})},getIframe:function(e,t){var i=e.src;var n=g.st.iframe;c.each(n.patterns,function(){if(i.indexOf(this.index)>-1){if(this.id){if(typeof this.id==="string"){i=i.substr(i.lastIndexOf(this.id)+this.id.length,i.length)}else{i=this.id.call(this,i)}}i=this.src.replace("%id%",i);return false}});var r={};if(n.srcAction){r[n.srcAction]=i}g._parseMarkup(t,r,e);g.updateStatus("ready");return t}}});var K=function(e){var t=g.items.length;if(e>t-1){return e-t}else if(e<0){return t+e}return e},D=function(e,t,i){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,i)};c.magnificPopup.registerModule("gallery",{options:{enabled:false,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:true,arrows:true,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var a=g.st.gallery,e=".mfp-gallery";g.direction=true;if(!a||!a.enabled)return false;b+=" mfp-gallery";I(d+e,function(){if(a.navigateByImgClick){g.wrap.on("click"+e,".mfp-img",function(){if(g.items.length>1){g.next();return false}})}C.on("keydown"+e,function(e){if(e.keyCode===37){g.prev()}else if(e.keyCode===39){g.next()}})});I("UpdateStatus"+e,function(e,t){if(t.text){t.text=D(t.text,g.currItem.index,g.items.length)}});I(u+e,function(e,t,i,n){var r=g.items.length;i.counter=r>1?D(a.tCounter,n.index,r):""});I("BuildControls"+e,function(){if(g.items.length>1&&a.arrows&&!g.arrowLeft){var e=a.arrowMarkup,t=g.arrowLeft=c(e.replace(/%title%/gi,a.tPrev).replace(/%dir%/gi,"left")).addClass(s),i=g.arrowRight=c(e.replace(/%title%/gi,a.tNext).replace(/%dir%/gi,"right")).addClass(s);t.click(function(){g.prev()});i.click(function(){g.next()});g.container.append(t.add(i))}});I(r+e,function(){if(g._preloadTimeout)clearTimeout(g._preloadTimeout);g._preloadTimeout=setTimeout(function(){g.preloadNearbyImages();g._preloadTimeout=null},16)});I(l+e,function(){C.off(e);g.wrap.off("click"+e);g.arrowRight=g.arrowLeft=null})},next:function(){g.direction=true;g.index=K(g.index+1);g.updateItemHTML()},prev:function(){g.direction=false;g.index=K(g.index-1);g.updateItemHTML()},goTo:function(e){g.direction=e>=g.index;g.index=e;g.updateItemHTML()},preloadNearbyImages:function(){var e=g.st.gallery.preload,t=Math.min(e[0],g.items.length),i=Math.min(e[1],g.items.length),n;for(n=1;n<=(g.direction?i:t);n++){g._preloadItem(g.index+n)}for(n=1;n<=(g.direction?t:i);n++){g._preloadItem(g.index-n)}},_preloadItem:function(e){e=K(e);if(g.items[e].preloaded){return}var t=g.items[e];if(!t.parsed){t=g.parseEl(e)}k("LazyLoad",t);if(t.type==="image"){t.img=c('<img class="mfp-img" />').on("load.mfploader",function(){t.hasSize=true}).on("error.mfploader",function(){t.hasSize=true;t.loadError=true;k("LazyLoadError",t)}).attr("src",t.src)}t.preloaded=true}}});var U="retina";c.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 i=g.st.retina,n=i.ratio;n=!isNaN(n)?n:n();if(n>1){I("ImageHasSize"+"."+U,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"})});I("ElementParse"+"."+U,function(e,t){t.src=i.replaceSrc(t,n)})}}}}});_()});