(function(i,n,H,p){"use strict";var a=H("html"),o=H(i),f=H(n),M=H.fancybox=function(){M.open.apply(this,arguments)},r=navigator.userAgent.match(/msie/i),s=null,l=n.createTouch!==p,u=function(e){return e&&e.hasOwnProperty&&e instanceof H},h=function(e){return e&&H.type(e)==="string"},A=function(e){return h(e)&&e.indexOf("%")>0},c=function(e){return e&&!(e.style.overflow&&e.style.overflow==="hidden")&&(e.clientWidth&&e.scrollWidth>e.clientWidth||e.clientHeight&&e.scrollHeight>e.clientHeight)},I=function(e,t){var i=parseInt(e,10)||0;if(t&&A(e)){i=M.getViewport()[t]/100*i}return Math.ceil(i)},D=function(e,t){return I(e,t)+"px"};H.extend(M,{version:"2.1.5",defaults:{padding:0,margin:50,width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:800,pixelRatio:1,autoSize:true,autoHeight:true,autoWidth:true,autoResize:true,autoCenter:!l,fitToView:true,aspectRatio:false,topRatio:.5,leftRatio:.5,scrolling:"auto",wrapCSS:"",arrows:true,closeBtn:true,closeClick:false,nextClick:false,mouseWheel:true,autoPlay:false,playSpeed:3e3,preload:3,modal:false,loop:true,ajax:{dataType:"html",headers:{"X-fancyBox":true}},iframe:{scrolling:"auto",preload:true},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"},keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:false,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'
',image:'
',iframe:'",error:'The requested content cannot be loaded.
Please try again later.
',closeBtn:'',next:'',prev:''},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:true,openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:true,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:{locked:true},title:true},onCancel:H.noop,beforeLoad:H.noop,afterLoad:H.noop,beforeShow:H.noop,afterShow:function(){H(".tooltip").detach()},beforeChange:H.noop,beforeClose:H.noop,afterClose:H.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:false,isOpen:false,isOpened:false,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:false},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(c,d){if(!c){return}if(!H.isPlainObject(d)){d={}}if(false===M.close(true)){return}if(!H.isArray(c)){c=u(c)?H(c).get():[c]}H.each(c,function(e,t){var i={},n,a,o,r,s,l,f;if(H.type(t)==="object"){if(t.nodeType){t=H(t)}if(u(t)){i={href:t.data("fancybox-href")||t.attr("href"),title:t.data("fancybox-title")||t.attr("title"),isDom:true,element:t};if(H.metadata){H.extend(true,i,t.metadata())}}else{i=t}}n=d.href||i.href||(h(t)?t:null);a=d.title!==p?d.title:i.title||"";o=d.content||i.content;r=o?"html":d.type||i.type;if(!r&&i.isDom){r=t.data("fancybox-type");if(!r){s=t.prop("class").match(/fancybox\.(\w+)/);r=s?s[1]:null}}if(h(n)){if(!r){if(M.isImage(n)){r="image"}else if(M.isSWF(n)){r="swf"}else if(n.charAt(0)==="#"){r="inline"}else if(h(t)){r="html";o=t}}if(r==="ajax"){l=n.split(/\s+/,2);n=l.shift();f=l.shift()}}if(!o){if(r==="inline"){if(n){o=H(h(n)?n.replace(/.*(?=#[^\s]+$)/,""):n)}else if(i.isDom){o=t}}else if(r==="html"){o=n}else if(!r&&!n&&i.isDom){r="inline";o=t}}H.extend(i,{href:n,type:r,content:o,title:a,selector:f});c[e]=i});M.opts=H.extend(true,{},M.defaults,d);if(d.keys!==p){M.opts.keys=d.keys?H.extend({},M.defaults.keys,d.keys):false}M.group=c;return M._start(M.opts.index)},cancel:function(){var e=M.coming;if(!e||false===M.trigger("onCancel")){return}M.hideLoading();if(M.ajaxLoad){M.ajaxLoad.abort()}M.ajaxLoad=null;if(M.imgPreload){M.imgPreload.onload=M.imgPreload.onerror=null}if(e.wrap){e.wrap.stop(true,true).trigger("onReset").remove()}M.coming=null;if(!M.current){M._afterZoomOut(e)}},close:function(e){if(H("body").hasClass("be")){var t=H("#view-player>div").attr("id");if(t!="undefined"){if(H("#"+t).hasClass("video-js")){var i=n.getElementById(t);videojs(i).dispose()}}}M.cancel();if(false===M.trigger("beforeClose")){return}M.unbindEvents();if(!M.isActive){return}if(!M.isOpen||e===true){H(".fancybox-wrap").stop(true).trigger("onReset").remove();M._afterZoomOut()}else{M.isOpen=M.isOpened=false;M.isClosing=true;H(".fancybox-item, .fancybox-nav").remove();M.wrap.stop(true,true).removeClass("fancybox-opened");M.transitions[M.current.closeMethod]()}},play:function(e){e=false;var t=function(){clearTimeout(M.player.timer)},i=function(){t();if(M.current&&M.player.isActive){M.player.timer=setTimeout(M.next,M.current.playSpeed)}},n=function(){t();f.unbind(".player");M.player.isActive=false;M.trigger("onPlayEnd")},a=function(){if(M.current&&(M.current.loop||M.current.index=n.index?"next":"prev"];M.router=i||"jumpto";if(n.loop){if(e<0){e=n.group.length+e%n.group.length}e=e%n.group.length}if(n.group[e]!==p){M.cancel();M._start(e)}},reposition:function(e,t){var i=M.current,n=i?i.wrap:null,a;if(n){a=M._getPosition(t);if(e&&e.type==="scroll"){delete a.position;n.stop(true,true).animate(a,200)}else{n.css(a);i.pos=H.extend({},i.dim,a)}}},update:function(t){var i=t&&t.type,n=!i||i==="orientationchange";if(n){clearTimeout(s);s=null}if(!M.isOpen||s){return}s=setTimeout(function(){var e=M.current;if(!e||M.isClosing){return}M.wrap.removeClass("fancybox-tmp");if(n||i==="load"||i==="resize"&&e.autoResize){M._setDimension()}if(!(i==="scroll"&&e.canShrink)){M.reposition(t)}M.trigger("onUpdate");s=null},n&&!l?0:300)},toggle:function(e){if(M.isOpen){M.current.fitToView=H.type(e)==="boolean"?e:!M.current.fitToView;if(l){M.wrap.removeAttr("style").addClass("fancybox-tmp");M.trigger("onUpdate")}M.update()}},hideLoading:function(){f.unbind(".loading");H("#fancybox-loading").remove()},showLoading:function(){var e,t;M.hideLoading();e=H('').click(M.cancel).appendTo("body");f.bind("keydown.loading",function(e){if((e.which||e.keyCode)===27){e.preventDefault();M.cancel()}});if(!M.defaults.fixed){t=M.getViewport();e.css({position:"absolute",top:t.h*.5+t.y,left:t.w*.5+t.x})}},getViewport:function(){var e=M.current&&M.current.locked||false,t={x:o.scrollLeft(),y:o.scrollTop()};if(e){t.w=e[0].clientWidth;t.h=e[0].clientHeight}else{t.w=l&&i.innerWidth?i.innerWidth:o.width();t.h=l&&i.innerHeight?i.innerHeight:o.height()}return t},unbindEvents:function(){if(M.wrap&&u(M.wrap)){M.wrap.unbind(".fb")}f.unbind(".fb");o.unbind(".fb")},bindEvents:function(){var s=M.current,t;if(!s){return}o.bind("orientationchange.fb"+(l?"":" resize.fb")+(s.autoCenter&&!s.locked?" scroll.fb":""),M.update);t=s.keys;if(t){f.bind("keydown.fb",function(i){var n=i.which||i.keyCode,e=i.target||i.srcElement;if(n===27&&M.coming){return false}if(!i.ctrlKey&&!i.altKey&&!i.shiftKey&&!i.metaKey&&!(e&&(e.type||H(e).is("[contenteditable]")))){H.each(t,function(e,t){if(s.group.length>1&&t[n]!==p){M[e](t[n]);i.preventDefault();return false}if(H.inArray(n,t)>-1){M[e]();i.preventDefault();return false}})}})}if(H.fn.mousewheel&&s.mouseWheel){M.wrap.bind("mousewheel.fb",function(e,t,i,n){var a=e.target||null,o=H(a),r=false;while(o.length){if(r||o.is(".fancybox-skin")||o.is(".fancybox-wrap")){break}r=c(o[0]);o=H(o).parent()}if(t!==0&&!r){if(M.group.length>1&&!s.canShrink){if(n>0||i>0){M.prev(n>0?"down":"left")}else if(n<0||i<0){M.next(n<0?"up":"right")}e.preventDefault()}}})}},trigger:function(i,e){var t,n=e||M.coming||M.current;if(!n){return}if(H.isFunction(n[i])){t=n[i].apply(n,Array.prototype.slice.call(arguments,1))}if(t===false){return false}if(n.helpers){H.each(n.helpers,function(e,t){if(t&&M.helpers[e]&&H.isFunction(M.helpers[e][i])){M.helpers[e][i](H.extend(true,{},M.helpers[e].defaults,t),n)}})}f.trigger(i)},isImage:function(e){return h(e)&&e.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(e){return h(e)&&e.match(/\.(swf)((\?|#).*)?$/i)},_start:function(e){var i={},t,n,a,o,r;e=I(e);t=M.group[e]||null;if(!t){return false}i=H.extend(true,{},M.opts,t);o=i.margin;r=i.padding;if(H.type(o)==="number"){i.margin=[o,o,o,o]}if(H.type(r)==="number"){i.padding=[r,r,r,r]}if(i.modal){H.extend(true,i,{closeBtn:false,closeClick:false,nextClick:false,arrows:false,mouseWheel:false,keys:null,helpers:{overlay:{closeClick:false}}})}if(i.autoSize){i.autoWidth=i.autoHeight=true}if(i.width==="auto"){i.autoWidth=true}if(i.height==="auto"){i.autoHeight=true}i.group=M.group;i.index=e;M.coming=i;if(false===M.trigger("beforeLoad")){M.coming=null;return}a=i.type;n=i.href;if(!a){M.coming=null;if(M.current&&M.router&&M.router!=="jumpto"){M.current.index=e;return M[M.router](M.direction)}return false}M.isActive=true;if(a==="image"||a==="swf"){i.autoHeight=i.autoWidth=false;i.scrolling="visible"}if(a==="image"){i.aspectRatio=true}if(a==="iframe"&&l){i.scrolling="scroll"}i.wrap=H(i.tpl.wrap).addClass("fancybox-"+(l?"mobile":"desktop")+" fancybox-type-"+a+" fancybox-tmp "+i.wrapCSS).appendTo(i.parent||"body");H.extend(i,{skin:H(".fancybox-skin",i.wrap),outer:H(".fancybox-outer",i.wrap),inner:H(".fancybox-inner",i.wrap)});H.each(["Top","Right","Bottom","Left"],function(e,t){i.skin.css("padding"+t,D(i.padding[e]))});M.trigger("onReady");if(a==="inline"||a==="html"){if(!i.content||!i.content.length){return M._error("content")}}else if(!n){return M._error("href")}if(a==="image"){M._loadImage()}else if(a==="ajax"){M._loadAjax()}else if(a==="iframe"){M._loadIframe()}else{M._afterLoad()}},_error:function(e){H.extend(M.coming,{type:"html",autoWidth:true,autoHeight:true,minWidth:0,minHeight:0,scrolling:"no",hasError:e,content:M.coming.tpl.error});M._afterLoad()},_loadImage:function(){var e=M.imgPreload=new Image;e.onload=function(){this.onload=this.onerror=null;M.coming.width=this.width/M.opts.pixelRatio;M.coming.height=this.height/M.opts.pixelRatio;M._afterLoad()};e.onerror=function(){this.onload=this.onerror=null;M._error("image")};e.src=M.coming.href;if(e.complete!==true){M.showLoading()}},_loadAjax:function(){var i=M.coming;M.showLoading();M.ajaxLoad=H.ajax(H.extend({},i.ajax,{url:i.href,error:function(e,t){if(M.coming&&t!=="abort"){M._error("ajax",e)}else{M.hideLoading()}},success:function(e,t){if(t==="success"){i.content=e;M._afterLoad()}}}))},_loadIframe:function(){var e=M.coming,t=H(e.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",l?"auto":e.iframe.scrolling).attr("src",e.href);H(e.wrap).bind("onReset",function(){try{H(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(e){}});if(e.iframe.preload){M.showLoading();t.one("load",function(){H(this).data("ready",1);if(!l){H(this).bind("load.fb",M.update)}H(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();M._afterLoad()})}e.content=t.appendTo(e.inner);if(!e.iframe.preload){M._afterLoad()}},_preloadImages:function(){var e=M.group,t=M.current,i=e.length,n=t.preload?Math.min(t.preload,i-1):0,a,o;for(o=1;o<=n;o+=1){a=e[(t.index+o)%i];if(a.type==="image"&&a.href){(new Image).src=a.href}}},_afterLoad:function(){var e=M.coming,t=M.current,i="fancybox-placeholder",n,a,o,r,s,l;M.hideLoading();if(!e||M.isActive===false){return}if(false===M.trigger("afterLoad",e,t)){e.wrap.stop(true).trigger("onReset").remove();M.coming=null;return}if(t){M.trigger("beforeChange",t);t.wrap.stop(true).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove()}M.unbindEvents();n=e;a=e.content;o=e.type;r=e.scrolling;H.extend(M,{wrap:n.wrap,skin:n.skin,outer:n.outer,inner:n.inner,current:n,previous:t});s=n.href;switch(o){case"inline":case"ajax":case"html":if(n.selector){a=H("").html(a).find(n.selector)}else if(u(a)){if(!a.data(i)){a.data(i,H('
').insertAfter(a).hide())}a=a.show().detach();n.wrap.bind("onReset",function(){if(H(this).find(a).length){a.hide().replaceAll(a.data(i)).data(i,false)}})}break;case"image":a=n.tpl.image.replace("{href}",s);break;case"swf":a='
";break}if(!(u(a)&&a.parent().is(n.inner))){n.inner.append(a)}M.trigger("beforeShow");n.inner.css("overflow",r==="yes"?"scroll":r==="no"?"hidden":r);M._setDimension();M.reposition();M.isOpen=false;M.coming=null;M.bindEvents();if(!M.isOpened){H(".fancybox-wrap").not(n.wrap).stop(true).trigger("onReset").remove()}else if(t.prevMethod){M.transitions[t.prevMethod]()}M.transitions[M.isOpened?n.nextMethod:n.openMethod]();M._preloadImages()},_setDimension:function(){var e=M.getViewport(),t=0,i=false,n=false,a=M.wrap,o=M.skin,r=M.inner,s=M.current,l=s.width,f=s.height,c=s.minWidth,d=s.minHeight,p=s.maxWidth,u=s.maxHeight,h=s.scrolling,g=s.scrollOutside?s.scrollbarWidth:0,m=s.margin,y=I(m[1]+m[3]),x=I(m[0]+m[2]),v,w,b,k,C,O,W,_,S,T,L,E,j,R,P;a.add(o).add(r).width("auto").height("auto").removeClass("fancybox-tmp");v=I(o.outerWidth(true)-o.width());w=I(o.outerHeight(true)-o.height());b=y+v;k=x+w;C=A(l)?(e.w-b)*I(l)/100:l;O=A(f)?(e.h-k)*I(f)/100:f;if(s.type==="iframe"){R=s.content;if(s.autoHeight&&R.data("ready")===1){try{if(R[0].contentWindow.document.location){r.width(C).height(9999);P=R.contents().find("body");if(g){P.css("overflow-x","hidden")}O=P.outerHeight(true)}}catch(e){}}}else if(s.autoWidth||s.autoHeight){r.addClass("fancybox-tmp");if(!s.autoWidth){r.width(C)}if(!s.autoHeight){r.height(O)}if(s.autoWidth){C=r.width()}if(s.autoHeight){O=r.height()}r.removeClass("fancybox-tmp")}l=I(C);f=I(O);S=C/O;c=I(A(c)?I(c,"w")-b:c);p=I(A(p)?I(p,"w")-b:p);d=I(A(d)?I(d,"h")-k:d);u=I(A(u)?I(u,"h")-k:u);W=p;_=u;if(s.fitToView){p=Math.min(e.w-b,p);u=Math.min(e.h-k,u)}E=e.w-y;j=e.h-x;if(s.aspectRatio){if(l>p){l=p;f=I(l/S)}if(f>u){f=u;l=I(f*S)}if(l
E||L>j)&&l>c&&f>d){if(t++>19){break}f=Math.max(d,Math.min(u,f-10));l=I(f*S);if(lp){l=p;f=I(l/S)}r.width(l).height(f);a.width(l+v);T=a.width();L=a.height()}}else{l=Math.max(c,Math.min(l,l-(T-E)));f=Math.max(d,Math.min(f,f-(L-j)))}}if(g&&h==="auto"&&fE||L>j)&&l>c&&f>d;n=s.aspectRatio?ld&&f1){M.inner.css("cursor","pointer").bind("click.fb",function(e){if(!H(e.target).is("a")&&!H(e.target).parent().is("a")){e.preventDefault();M[t.closeClick?"close":"next"]()}})}if(t.closeBtn){H(t.tpl.closeBtn).appendTo(M.skin).bind("click.fb",function(e){e.preventDefault();M.close()})}if(t.arrows&&M.group.length>1){if(t.loop||t.index>0){H(t.tpl.prev).appendTo(M.outer).bind("click.fb",M.prev)}if(t.loop||t.index ').appendTo(M.coming?M.coming.parent:e.parent);this.fixed=false;if(e.fixed&&M.defaults.fixed){this.overlay.addClass("fancybox-overlay-fixed");this.fixed=true}},open:function(e){var t=this;e=H.extend({},this.defaults,e);if(this.overlay){this.overlay.unbind(".overlay").width("auto").height("auto")}else{this.create(e)}if(!this.fixed){o.bind("resize.overlay",H.proxy(this.update,this));this.update()}if(e.closeClick){this.overlay.bind("click.overlay",function(e){if(H(e.target).hasClass("fancybox-overlay")){if(M.isActive){M.close()}else{t.close()}return false}})}this.overlay.css(e.css).show()},close:function(){var e,t;o.unbind("resize.overlay");if(this.el.hasClass("fancybox-lock")){H(".fancybox-margin").removeClass("fancybox-margin");e=o.scrollTop();t=o.scrollLeft();this.el.removeClass("fancybox-lock");o.scrollTop(e).scrollLeft(t)}H(".fancybox-overlay").remove().hide();H.extend(this,{overlay:null,fixed:false})},update:function(){var e="100%",t;this.overlay.width(e).height("100%");if(r){t=Math.max(n.documentElement.offsetWidth,n.body.offsetWidth);if(f.width()>t){e=f.width()}}else if(f.width()>o.width()){e=f.width()}this.overlay.width(e).height(f.height())},onReady:function(e,t){var i=this.overlay;H(".fancybox-overlay").stop(true,true);if(!i){this.create(e)}if(e.locked&&this.fixed&&t.fixed){if(!i){this.margin=f.height()>o.height()?H("html").css("margin-right").replace("px",""):false}t.locked=this.overlay.append(t.wrap);t.fixed=false}if(e.showEarly===true){this.beforeShow.apply(this,arguments)}},beforeShow:function(e,t){var i,n;if(t.locked){if(this.margin!==false){H("*").filter(function(){return H(this).css("position")==="fixed"&&!H(this).hasClass("fancybox-overlay")&&!H(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin");this.el.addClass("fancybox-margin")}i=o.scrollTop();n=o.scrollLeft();this.el.addClass("fancybox-lock");o.scrollTop(i).scrollLeft(n)}this.open(e)},onUpdate:function(){if(!this.fixed){this.update()}},afterClose:function(e){if(this.overlay&&!M.coming){this.overlay.fadeOut(e.speedOut,H.proxy(this.close,this))}}};M.helpers.title={defaults:{type:"float",position:"bottom"},beforeShow:function(e){var t=M.current,i=t.title,n=e.type,a,o;if(H.isFunction(i)){i=i.call(t.element,t)}if(!h(i)||H.trim(i)===""){return}a=H(''+i+"
");switch(n){case"inside":o=M.skin;break;case"outside":o=M.wrap;break;case"over":o=M.inner;break;default:o=M.skin;a.appendTo("body");if(r){a.width(a.width())}a.wrapInner('');M.current.margin[2]+=Math.abs(I(a.css("margin-bottom")));break}a[e.position==="top"?"prependTo":"appendTo"](o)}};H.fn.fancybox=function(o){var r,s=H(this),l=this.selector||"",e=function(e){var t=H(this).blur(),i=r,n,a;if(!(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&!t.is(".fancybox-wrap")){n=o.groupAttr||"data-fancybox-group";a=t.attr(n);if(!a){n="rel";a=t.get(0)[n]}if(a&&a!==""&&a!=="nofollow"){t=l.length?H(l):s;t=t.filter("["+n+'="'+a+'"]');i=t.index(this)}o.index=i;if(M.open(t,o)!==false){e.preventDefault()}}};o=o||{};r=o.index||0;if(!l||o.live===false){s.unbind("click.fb-start").bind("click.fb-start",e)}else{f.undelegate(l,"click.fb-start").delegate(l+":not('.fancybox-item, .fancybox-nav')","click.fb-start",e)}this.filter("[data-fancybox-start=1]").trigger("click");return this};f.ready(function(){var e,t;if(H.scrollbarWidth===p){H.scrollbarWidth=function(){var e=H('').appendTo("body"),t=e.children(),i=t.innerWidth()-t.height(99).innerWidth();e.remove();return i}}if(H.support.fixedPosition===p){H.support.fixedPosition=function(){var e=H('').appendTo("body"),t=e[0].offsetTop===20||e[0].offsetTop===15;e.remove();return t}()}H.extend(M.defaults,{scrollbarWidth:H.scrollbarWidth(),fixed:H.support.fixedPosition,parent:H("body")});e=H(i).width();a.addClass("fancybox-lock-test");t=H(i).width();a.removeClass("fancybox-lock-test")})})(window,document,jQuery);