/*! magnific popup - v0.9.9 - 2013-12-27 * http://dimsemenov.com/plugins/magnific-popup/ * copyright (c) 2013 dmitry semenov; */ (function(e){var t,n,i,o,r,a,s,l="close",c="beforeclose",d="afterclose",u="beforeappend",p="markupparse",f="open",m="change",g="mfp",h="."+g,v="mfp-ready",c="mfp-removing",y="mfp-prevent-close",w=function(){},b=!!window.jquery,i=e(window),x=function(e,n){t.ev.on(g+e+h,n)},k=function(t,n,i,o){var r=document.createelement("div");return r.classname="mfp-"+t,i&&(r.innerhtml=i),o?n&&n.appendchild(r):(r=e(r),n&&r.appendto(n)),r},t=function(n,i){t.ev.triggerhandler(g+n,i),t.st.callbacks&&(n=n.charat(0).tolowercase()+n.slice(1),t.st.callbacks[n]&&t.st.callbacks[n].apply(t,e.isarray(i)?i:[i]))},e=function(n){return n===s&&t.currtemplate.closebtn||(t.currtemplate.closebtn=e(t.st.closemarkup.replace("%title%",t.st.tclose)),s=n),t.currtemplate.closebtn},_=function(){e.magnificpopup.instance||(t=new w,t.init(),e.magnificpopup.instance=t)},s=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};w.prototype={constructor:w,init:function(){var n=navigator.appversion;t.isie7=-1!==n.indexof("msie 7."),t.isie8=-1!==n.indexof("msie 8."),t.islowie=t.isie7||t.isie8,t.isandroid=/android/gi.test(n),t.isios=/iphone|ipad|ipod/gi.test(n),t.supportstransition=s(),t.probablymobile=t.isandroid||t.isios||/(opera mini)|kindle|webos|blackberry|(opera mobi)|(windows phone)|iemobile/i.test(navigator.useragent),o=e(document),t.popupscache={}},open:function(n){i||(i=e(document.body));var r;if(n.isobj===!1){t.items=n.items.toarray(),t.index=0;var s,l=n.items;for(r=0;l.length>r;r++)if(s=l[r],s.parsed&&(s=s.el[0]),s===n.el[0]){t.index=r;break}}else t.items=e.isarray(n.items)?n.items:[n.items],t.index=n.index||0;if(t.isopen)return t.updateitemhtml(),void 0;t.types=[],a="",t.ev=n.mainel&&n.mainel.length?n.mainel.eq(0):o,n.key?(t.popupscache[n.key]||(t.popupscache[n.key]={}),t.currtemplate=t.popupscache[n.key]):t.currtemplate={},t.st=e.extend(!0,{},e.magnificpopup.defaults,n),t.fixedcontentpos="auto"===t.st.fixedcontentpos?!t.probablymobile:t.st.fixedcontentpos,t.st.modal&&(t.st.closeoncontentclick=!1,t.st.closeonbgclick=!1,t.st.showclosebtn=!1,t.st.enableescapekey=!1),t.bgoverlay||(t.bgoverlay=k("bg").on("click"+h,function(){t.close()}),t.wrap=k("wrap").attr("tabindex",-1).on("click"+h,function(e){t._checkifclose(e.target)&&t.close()}),t.container=k("container",t.wrap)),t.contentcontainer=k("content"),t.st.preloader&&(t.preloader=k("preloader",t.container,t.st.tloading));var c=e.magnificpopup.modules;for(r=0;c.length>r;r++){var d=c[r];d=d.charat(0).touppercase()+d.slice(1),t["init"+d].call(t)}t("beforeopen"),t.st.showclosebtn&&(t.st.closebtninside?(x(p,function(e,t,n,i){n.close_replacewith=e(i.type)}),a+=" mfp-close-btn-in"):t.wrap.append(e())),t.st.aligntop&&(a+=" mfp-align-top"),t.fixedcontentpos?t.wrap.css({overflow:t.st.overflowy,overflowx:"hidden",overflowy:t.st.overflowy}):t.wrap.css({top:i.scrolltop(),position:"absolute"}),(t.st.fixedbgpos===!1||"auto"===t.st.fixedbgpos&&!t.fixedcontentpos)&&t.bgoverlay.css({height:o.height(),position:"absolute"}),t.st.enableescapekey&&o.on("keyup"+h,function(e){27===e.keycode&&t.close()}),i.on("resize"+h,function(){t.updatesize()}),t.st.closeoncontentclick||(a+=" mfp-auto-cursor"),a&&t.wrap.addclass(a);var u=t.wh=i.height(),m={};if(t.fixedcontentpos&&t._hasscrollbar(u)){var g=t._getscrollbarsize();g&&(m.marginright=g)}t.fixedcontentpos&&(t.isie7?e("body, html").css("overflow","hidden"):m.overflow="hidden");var c=t.st.mainclass;return t.isie7&&(c+=" mfp-ie7"),c&&t._addclasstomfp(c),t.updateitemhtml(),t("buildcontrols"),e("html").css(m),t.bgoverlay.add(t.wrap).prependto(t.st.prependto||i),t._lastfocusedel=document.activeelement,settimeout(function(){t.content?(t._addclasstomfp(v),t._setfocus()):t.bgoverlay.addclass(v),o.on("focusin"+h,t._onfocusin)},16),t.isopen=!0,t.updatesize(u),t(f),n},close:function(){t.isopen&&(t(c),t.isopen=!1,t.st.removaldelay&&!t.islowie&&t.supportstransition?(t._addclasstomfp(c),settimeout(function(){t._close()},t.st.removaldelay)):t._close())},_close:function(){t(l);var n=c+" "+v+" ";if(t.bgoverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainclass&&(n+=t.st.mainclass+" "),t._removeclassfrommfp(n),t.fixedcontentpos){var i={marginright:""};t.isie7?e("body, html").css("overflow",""):i.overflow="",e("html").css(i)}o.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 n=document.documentelement.clientwidth/window.innerwidth,i=window.innerheight*n;t.wrap.css("height",i),t.wh=i}else t.wh=e||i.height();t.fixedcontentpos||t.wrap.css("height",t.wh),t("resize")},updateitemhtml:function(){var n=t.items[t.index];t.contentcontainer.detach(),t.content&&t.content.detach(),n.parsed||(n=t.parseel(t.index));var i=n.type;if(t("beforechange",[t.curritem?t.curritem.type:"",i]),t.curritem=n,!t.currtemplate[i]){var o=t.st[i]?t.st[i].markup:!1;t("firstmarkupparse",o),t.currtemplate[i]=o?e(o):!0}r&&r!==n.type&&t.container.removeclass("mfp-"+r+"-holder");var a=t["get"+i.charat(0).touppercase()+i.slice(1)](n,t.currtemplate[i]);t.appendcontent(a,i),n.preloaded=!0,t(m,n),r=n.type,t.container.prepend(t.contentcontainer),t("afterchange")},appendcontent:function(e,n){t.content=e,e?t.st.showclosebtn&&t.st.closebtninside&&t.currtemplate[n]===!0?t.content.find(".mfp-close").length||t.content.append(e()):t.content=e:t.content="",t(u),t.container.addclass("mfp-"+n+"-holder"),t.contentcontainer.append(t.content)},parseel:function(n){var i,o=t.items[n];if(o.tagname?o={el:e(o)}:(i=o.type,o={data:o,src:o.src}),o.el){for(var r=t.types,a=0;r.length>a;a++)if(o.el.hasclass("mfp-"+r[a])){i=r[a];break}o.src=o.el.attr("data-mfp-src"),o.src||(o.src=o.el.attr("href"))}return o.type=i||t.st.type||"inline",o.index=n,o.parsed=!0,t.items[n]=o,t("elementparse",o),t.items[n]},addgroup:function(e,n){var i=function(i){i.mfpel=this,t._openclick(i,e,n)};n||(n={});var o="click.magnificpopup";n.mainel=e,n.items?(n.isobj=!0,e.off(o).on(o,i)):(n.isobj=!1,n.delegate?e.off(o).on(o,n.delegate,i):(n.items=e,e.off(o).on(o,i)))},_openclick:function(n,i,o){var r=void 0!==o.midclick?o.midclick:e.magnificpopup.defaults.midclick;if(r||2!==n.which&&!n.ctrlkey&&!n.metakey){var a=void 0!==o.disableon?o.disableon:e.magnificpopup.defaults.disableon;if(a)if(e.isfunction(a)){if(!a.call(t))return!0}else if(a>i.width())return!0;n.type&&(n.preventdefault(),t.isopen&&n.stoppropagation()),o.el=e(n.mfpel),o.delegate&&(o.items=i.find(o.delegate)),t.open(o)}},updatestatus:function(e,i){if(t.preloader){n!==e&&t.container.removeclass("mfp-s-"+n),i||"loading"!==e||(i=t.st.tloading);var o={status:e,text:i};t("updatestatus",o),e=o.status,i=o.text,t.preloader.html(i),t.preloader.find("a").on("click",function(e){e.stopimmediatepropagation()}),t.container.addclass("mfp-s-"+e),n=e}},_checkifclose:function(n){if(!e(n).hasclass(y)){var i=t.st.closeoncontentclick,o=t.st.closeonbgclick;if(i&&o)return!0;if(!t.content||e(n).hasclass("mfp-close")||t.preloader&&n===t.preloader[0])return!0;if(n===t.content[0]||e.contains(t.content[0],n)){if(i)return!0}else if(o&&e.contains(document,n))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?o.height():document.body.scrollheight)>(e||i.height())},_setfocus:function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onfocusin:function(n){return n.target===t.wrap[0]||e.contains(t.wrap[0],n.target)?void 0:(t._setfocus(),!1)},_parsemarkup:function(t,n,i){var o;i.data&&(n=e.extend(i.data,n)),t(p,[t,n,i]),e.each(n,function(e,n){if(void 0===n||n===!1)return!0;if(o=e.split("_"),o.length>1){var i=t.find(h+"-"+o[0]);if(i.length>0){var r=o[1];"replacewith"===r?i[0]!==n[0]&&i.replacewith(n):"img"===r?i.is("img")?i.attr("src",n):i.replacewith(''):i.attr(o[1],n)}}else t.find(h+"-"+e).html(n)})},_getscrollbarsize:function(){if(void 0===t.scrollbarsize){var e=document.createelement("div");e.id="mfp-sbm",e.style.csstext="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendchild(e),t.scrollbarsize=e.offsetwidth-e.clientwidth,document.body.removechild(e)}return t.scrollbarsize}},e.magnificpopup={instance:null,proto:w.prototype,modules:[],open:function(t,n){return _(),t=t?e.extend(!0,{},t):{},t.isobj=!0,t.index=n||0,this.instance.open(t)},close:function(){return e.magnificpopup.instance&&e.magnificpopup.instance.close()},registermodule:function(t,n){n.options&&(e.magnificpopup.defaults[t]=n.options),e.extend(this.proto,n.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:'',tclose:"close (esc)",tloading:"loading..."}},e.fn.magnificpopup=function(n){_();var i=e(this);if("string"==typeof n)if("open"===n){var o,r=b?i.data("magnificpopup"):i[0].magnificpopup,a=parseint(arguments[1],10)||0;r.items?o=r.items[a]:(o=i,r.delegate&&(o=o.find(r.delegate)),o=o.eq(a)),t._openclick({mfpel:o},i,r)}else t.isopen&&t[n].apply(t,array.prototype.slice.call(arguments,1));else n=e.extend(!0,{},n),b?i.data("magnificpopup",n):i[0].magnificpopup=n,t.addgroup(i,n);return i};var p,o,z,m="inline",b=function(){z&&(o.after(z.addclass(p)).detach(),z=null)};e.magnificpopup.registermodule(m,{options:{hiddenclass:"hide",markup:"",tnotfound:"content not found"},proto:{initinline:function(){t.types.push(m),x(l+"."+m,function(){b()})},getinline:function(n,i){if(b(),n.src){var o=t.st.inline,r=e(n.src);if(r.length){var a=r[0].parentnode;a&&a.tagname&&(o||(p=o.hiddenclass,o=k(p),p="mfp-"+p),z=r.after(o).detach().removeclass(p)),t.updatestatus("ready")}else t.updatestatus("error",o.tnotfound),r=e("