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