(function(l){var D,j,B,r,c,z,w,H,v,i,F,g=0,y={},h=[],d=0,a={},e=[],k=null,E=new Image(),u=/\.(jpg|gif|png|bmp|jpeg|webp)(.*)?$/i,p=/[^\.]\.(swf)\s*$/i,A=/[^\.]\.(svg)\s*$/i,G=/[^\.]\.(pdf)\s*$/i,m,o=1,q=0,b="",t,n,C=false,f=l.extend(l("
")[0],{prop:0}),x=navigator.userAgent.match(/msie [6]/i)&&!window.XMLHttpRequest,s=document.createTouch!==undefined;_abort=function(){l.fancybox.hideActivity();E.onerror=E.onload=null;if(k){k.abort()}D.empty()},_error=function(I){if(false===y.onError(h,g,y)){l.fancybox.hideActivity();C=false;return}if(typeof I==="undefined"){I="Please try again later."}y.titleShow=false;y.width="auto";y.height="auto";D.html('

The requested content cannot be loaded.
'+I+"

");_process_inline()},_start=function(){var M=h[g],J,L,O,N,I,K;_abort();y=l.extend({},l.fn.fancybox.defaults,(typeof l(M).data("fancybox")=="undefined"?y:l(M).data("fancybox")));if(document.documentElement.clientWidth0?"inline":"ajax"}y.type=L;y.href=J;y.title=O;if(y.autoDimensions){if(y.type=="html"||y.type=="inline"||y.type=="ajax"){y.width="auto";y.height="auto"}else{y.autoDimensions=false}}if(y.modal){y.overlayShow=true;y.hideOnOverlayClick=false;y.hideOnContentClick=false;y.enableEscapeButton=false;y.showCloseButton=false}y.padding=parseInt(y.padding,10);y.margin=parseInt(y.margin,10);D.css("padding",(y.padding+y.margin));l(".fancybox-inline-tmp").off("fancybox-cancel").on("fancybox-change",function(){l(this).replaceWith(z.children())});switch(L){case"html":D.html(y.content);_process_inline();break;case"inline":if(l(M).parent().is("#fancybox-content")===true){C=false;return}l('
').hide().insertBefore(l(M)).on("fancybox-cleanup",function(){l(this).replaceWith(z.find(M))}).on("fancybox-cancel",function(){l(this).replaceWith(D.find(M))});l(M).appendTo(D);_process_inline();break;case"image":y.keepRatio=true;C=false;l.fancybox.showActivity();E=new Image();E.onerror=function(){_error("No image found.")};E.onload=function(){C=true;E.onerror=E.onload=null;_process_image()};E.src=J;break;case"swf":y.scrolling="no";y.keepRatio=true;N='';I="";l.each(y.swf,function(P,Q){N+='';I+=" "+P+'="'+Q+'"'});N+='";D.html(N);_process_inline();break;case"svg":y.scrolling="no";y.keepRatio=true;N='';D.html(N);_process_inline();break;case"pdf":y.scrolling="no";y.enableKeyboardNav=false;y.showNavArrows=false;N=''+l(M).html()+"";D.html(N);_process_inline();break;case"ajax":C=false;l.fancybox.showActivity();y.ajax.win=y.ajax.success;k=l.ajax(l.extend({},y.ajax,{url:J,data:y.ajax.data||{},error:function(P,R,Q){if(P.status>0){_error(Q)}},success:function(Q,S,P){var R=typeof P=="object"?P:k;if(R.status==200){if(typeof y.ajax.win=="function"){K=y.ajax.win(J,Q,S,P);if(K===false){l.fancybox.hideActivity();return}else{if(typeof K=="string"||typeof K=="object"){Q=K}}}if(Q.indexOf("-1||Q.indexOf("-1||Q.indexOf("-1){_error("Unexpected response.")}else{D.html(Q);_process_inline()}}}}));break;case"iframe":y.enableKeyboardNav=false;y.showNavArrows=false;l.fancybox.showActivity();_show();break}},_process_inline=function(){var J=y.width,K=y.height,L=l(window).width()==0?window.innerWidth:l(window).width(),I=l(window).height()==0?window.innerHeight:l(window).height();if(J.toString().indexOf("%")>-1){J=parseInt((L-(y.margin*2))*parseFloat(J)/100,10)+"px"}else{J=J=="auto"?"auto":J+"px"}if(K.toString().indexOf("%")>-1){K=parseInt((I-(y.margin*2))*parseFloat(K)/100,10)+"px"}else{K=K=="auto"?"auto":K+"px"}D.wrapInner('
');y.width=D.width();y.height=D.height();_show()},_process_image=function(){y.width=E.width;y.height=E.height;l("").attr({id:"fancybox-img",src:E.src,alt:y.title}).appendTo(D);_show()},_show=function(){var J,I;if(y.type!=="iframe"){l.fancybox.hideActivity()}if(r.is(":visible")&&false===a.onCleanup(e,d,a)){l(".fancybox-inline-tmp").trigger("fancybox-cancel");C=false;return}C=true;l(z.add(B)).off();l(window).off("orientationchange.fb resize.fb scroll.fb");l(document).off("keydown.fb");if(r.is(":visible")&&a.titlePosition!=="outside"){r.css("height",r.height())}e=h;d=g;a=y;if(a.overlayShow){l("html").addClass("fancybox-active");B.css({"background-color":a.overlayColor,opacity:a.overlayOpacity,cursor:a.hideOnOverlayClick?"pointer":"auto",height:l(document).height()});if(!B.is(":visible")){if(x){l("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"})}B.show()}}else{B.hide()}n=_get_zoom_to();_process_title();if(r.is(":visible")){l(w.add(v).add(i)).hide();J=r.position(),t={top:J.top,left:J.left,width:r.width(),height:r.height()};I=(t.width==n.width&&t.height==n.height);z.fadeTo(a.changeFade,0.3,function(){var K=function(){z.html(D.contents()).fadeTo(a.changeFade,1,_finish)};l(".fancybox-inline-tmp").trigger("fancybox-change");z.empty().removeAttr("filter").css({"border-width":a.padding,width:n.width-a.padding*2,height:a.autoDimensions?"auto":n.height-q-a.padding*2});if(I){K()}else{f.prop=0;l(f).animate({prop:1},{duration:a.changeSpeed,easing:a.easingChange,step:_draw,complete:K})}});return}r.removeAttr("style");z.css("border-width",a.padding);if(a.transitionIn=="elastic"){t=_get_zoom_from();z.html(D.contents());r.show();if(a.opacity){n.opacity=0}f.prop=0;l(f).animate({prop:1},{duration:a.speedIn,easing:a.easingIn,step:_draw,complete:_finish});return}if(a.titlePosition=="inside"&&q>0){H.show()}z.css({width:n.width-a.padding*2,height:a.autoDimensions?"auto":n.height-q-a.padding*2}).html(D.contents());r.css(n).fadeIn(a.transitionIn=="none"?0:a.speedIn,_finish)},_format_title=function(I){if(I&&I.length){if(a.titlePosition=="float"){return'
'+I+'
'}return'
'+I+"
"}return false},_process_title=function(){b=a.title||"";q=0;H.empty().removeAttr("style").removeClass();if(a.titleShow===false){H.hide();return}b=l.isFunction(a.titleFormat)?a.titleFormat(b,e,d,a):_format_title(b);if(!b||b===""){H.hide();return}H.addClass("fancybox-title-"+a.titlePosition).html(b).appendTo("body").show();switch(a.titlePosition){case"inside":H.css({width:n.width-(a.padding*2),marginLeft:a.padding,marginRight:a.padding}).appendTo(c);q=H.outerHeight(true);n.height+=q;break;case"over":H.css({marginLeft:a.padding,width:n.width-(a.padding*2),bottom:a.padding}).appendTo(c);break;case"float":H.css("left",parseInt((H.width()-n.width)/2,10)*-1).appendTo(c);break;default:H.css({width:n.width-(a.padding*2),paddingLeft:a.padding,paddingRight:a.padding}).appendTo(r);break}H.hide()},_set_navigation=function(){if(a.enableEscapeButton||a.enableKeyboardNav){l(document).on("keydown.fb",function(I){if(I.keyCode==27&&a.enableEscapeButton){I.preventDefault();l.fancybox.close()}else{if((I.keyCode==37||I.keyCode==39)&&a.enableKeyboardNav&&I.target.tagName!=="INPUT"&&I.target.tagName!=="TEXTAREA"&&I.target.tagName!=="SELECT"){I.preventDefault();l.fancybox[I.keyCode==37?"prev":"next"]()}else{if((I.keyCode==9)&&a.enableKeyboardNav&&I.target.tagName!=="INPUT"&&I.target.tagName!=="TEXTAREA"&&I.target.tagName!=="SELECT"){I.preventDefault();l.fancybox[I.shiftKey?"prev":"next"]()}}}})}if(!a.showNavArrows){v.hide();i.hide();return}if((a.cyclic&&e.length>1)||d!==0){v.show()}if((a.cyclic&&e.length>1)||d!=(e.length-1)){i.show()}},_finish=function(){if(!l.support.opacity){z.css("filter",0);r.css("filter",0)}if(a.autoDimensions){z.css("height","auto")}r.css("height","auto");if(b&&b.length){H.show()}if(a.showCloseButton){w.show()}_set_navigation();if(a.hideOnContentClick){z.on("click",l.fancybox.close)}if(a.hideOnOverlayClick){B.on("click",l.fancybox.close)}if(a.autoResize){l(window).on("resize.fb",l.fancybox.resize)}if(a.centerOnScroll&&!s){l(window).on("scroll.fb",l.fancybox.center)}if(l.fn.mousewheel){r.on("mousewheel.fb",function(I,J){if(C){I.preventDefault()}else{if(a.type=="image"&&(l(I.target).outerHeight()==0||l(I.target).prop("scrollHeight")===l(I.target).outerHeight())){I.preventDefault();l.fancybox[J>0?"prev":"next"]()}}})}if(a.type=="iframe"){l('').appendTo(z).on("load",function(){l.fancybox.hideActivity()}).focus()}r.show();C=false;l.fancybox.center();a.onComplete(e,d,a);if(e.length>1){_preload_next();_preload_prev()}},_preload_next=function(){var I=typeof arguments[0]=="number"?arguments[0]:d+1;if(I>=e.length){if(a.cyclic){I=0}else{return}}if(I==d){a.enableKeyboardNav=false;r.off("mousewheel.fb");i.hide();return}if(_preload_image(I)){return}else{_preload_next(I+1)}},_preload_prev=function(){var I=typeof arguments[0]=="number"?arguments[0]:d-1;if(I<0){if(a.cyclic){I=e.length-1}else{return}}if(I==d){a.enableKeyboardNav=false;r.off("mousewheel.fb");v.hide();return}if(_preload_image(I)){return}else{_preload_prev(I-1)}},_preload_image=function(K){var J,I=e[K];if(typeof I!=="undefined"&&typeof I.href!=="undefined"&&I.href!==a.href&&(I.href.match(u)||l(I).hasClass("image"))){J=new Image();J.src=I.href;return true}else{return false}},_draw=function(J){var I={width:parseInt(t.width+(n.width-t.width)*J,10),height:parseInt(t.height+(n.height-t.height)*J,10),top:parseInt(t.top+(n.top-t.top)*J,10),left:parseInt(t.left+(n.left-t.left)*J,10)};if(typeof n.opacity!=="undefined"){I.opacity=J<0.5?0.5:J}r.css(I);z.css({width:I.width-a.padding*2,height:I.height-(q*J)-a.padding*2})},_get_viewport=function(){var I=!s&&window.innerWidth&&document.documentElement.clientWidth?Math.min(window.innerWidth,document.documentElement.clientWidth):window.innerWidth||document.documentElement.clientWidth||document.getElementsByTagName("body")[0].clientWidth,J=!s&&window.innerHeight&&document.documentElement.clientHeight?Math.min(window.innerHeight,document.documentElement.clientHeight):window.innerHeight||document.documentElement.clientHeight||document.getElementsByTagName("body")[0].clientHeight,K;K=arguments[0]===true?0:a.margin;return[I-(K*2),J-(K*2),l(document).scrollLeft()+K,l(document).scrollTop()+K]},_get_zoom_to=function(){var I=_get_viewport(),L={},J=a.padding*2,K;if(a.width.toString().indexOf("%")>-1){L.width=parseInt((I[0]*parseFloat(a.width))/100,10)}else{L.width=a.width+J}if(a.height.toString().indexOf("%")>-1){L.height=parseInt((I[1]*parseFloat(a.height))/100,10)}else{L.height=a.height+J}if(a.autoScale&&(L.width>I[0]||L.height>I[1])){if(a.keepRatio){K=a.width/a.height;if((L.width)>I[0]){L.width=I[0];L.height=parseInt(((L.width-J)/K)+J,10)}if((L.height)>I[1]){L.height=I[1];L.width=parseInt(((L.height-J)*K)+J,10)}}else{L.width=Math.min(L.width,I[0]);L.height=Math.min(L.height,I[1])}}L.top=parseInt(Math.max(I[3]-20,I[3]+((I[1]-L.height-40)*0.5)),10);L.left=parseInt(Math.max(I[2]-20,I[2]+((I[0]-L.width-40)*0.5)),10);return L},_get_obj_pos=function(I){var J=I.offset();J.top+=parseInt(I.css("paddingTop"),10)||0;J.left+=parseInt(I.css("paddingLeft"),10)||0;J.top+=parseInt(I.css("border-top-width"),10)||0;J.left+=parseInt(I.css("border-left-width"),10)||0;J.width=I.width();J.height=I.height();return J},_get_zoom_from=function(){var L=y.orig?l(y.orig):false,K={},J,I;if(L&&L.length){J=_get_obj_pos(L);K={width:J.width+(a.padding*2),height:J.height+(a.padding*2),top:J.top-a.padding-20,left:J.left-a.padding-20}}else{I=_get_viewport();K={width:a.padding*2,height:a.padding*2,top:parseInt((I[3]+I[1])*0.5,10),left:parseInt((I[2]+I[0])*0.5,10)}}return K},_animate_loading=function(){if(!j.is(":visible")){clearInterval(m);return}l("div",j).css("top",(o*-40)+"px");o=(o+1)%12};l.fn.fancybox=function(I){if(!l(this).length){return this}l(this).data("fancybox",l.extend({},I,(l.metadata?l(this).metadata():{}))).off("click.fb").on("click.fb",function(K){if(C){return}C=true;l(this).blur();h=[];g=0;var J=l(this).attr("rel")||"";if(J==""||J.replace(/alternate|external|help|license|nofollow|noreferrer|noopener|\s+/gi,"")==""){h.push(this)}else{h=l('a[rel="'+J+'"], area[rel="'+J+'"]');g=h.index(this)}_start(K);return});return this};l.fancybox=function(L){var K;if(C){return}C=true;K=typeof arguments[1]!=="undefined"?arguments[1]:{};h=[];g=parseInt(K.index,10)||0;if(l.isArray(L)){for(var J=0,I=L.length;Jh.length||g<0){g=0}_start()};l.fancybox.showActivity=function(){clearInterval(m);j.show();m=setInterval(_animate_loading,66)};l.fancybox.hideActivity=function(){j.hide()};l.fancybox.next=function(){var I,J=typeof arguments[0]=="number"?arguments[0]:d+1;if(J>=e.length){if(a.cyclic){J=0}else{return}}I=e[J];if(J!=d&&typeof I!=="undefined"&&typeof I.href!=="undefined"&&I.href===a.href){l.fancybox.next(J+1)}else{l.fancybox.pos(J)}return};l.fancybox.prev=function(){var I,J=typeof arguments[0]=="number"?arguments[0]:d-1;if(J<0){if(a.cyclic){J=e.length-1}else{return}}I=e[J];if(J!=d&&typeof I!=="undefined"&&typeof I.href!=="undefined"&&I.href===a.href){l.fancybox.prev(J-1)}else{l.fancybox.pos(J)}return};l.fancybox.pos=function(I){if(C){return}I=parseInt(I);h=e;if(I>-1&&II[0]||(r.height()+40)>I[1])){return}r.stop().animate({top:parseInt(Math.max(I[3]-20,I[3]+((I[1]-z.height()-40)*0.5)-a.padding)),left:parseInt(Math.max(I[2]-20,I[2]+((I[0]-z.width()-40)*0.5)-a.padding))},typeof arguments[0]=="number"?arguments[0]:300)};l.fancybox.init=function(){if(l("#fancybox-wrap").length){return}l("body").append(D=l('
'),j=l('
'),B=l('
'),r=l('
'));c=l('
').append('
').appendTo(r);c.append(z=l('
'),w=l(''),H=l('
'),v=l(''),i=l(''));w.click(l.fancybox.close);j.click(l.fancybox.cancel);v.click(function(I){I.preventDefault();l.fancybox.prev()});i.click(function(I){I.preventDefault();l.fancybox.next()});if(!l.support.opacity){r.addClass("fancybox-ie")}if(x){j.addClass("fancybox-ie6");r.addClass("fancybox-ie6");l('').prependTo(c)}};l.fn.fancybox.defaults={padding:10,margin:40,opacity:false,modal:false,cyclic:false,allowfullscreen:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,autoResize:true,keepRatio:false,minViewportWidth:0,ajax:{},swf:{wmode:"opaque"},svg:{wmode:"opaque"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.7,overlayColor:"#777",titleShow:true,titlePosition:"float",titleFormat:null,titleFromAlt:true,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",easingIn:"swing",easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,enableKeyboardNav:true,onStart:function(){},onCancel:function(){},onComplete:function(){},onCleanup:function(){},onClosed:function(){},onError:function(){}};l(document).ready(function(){l.fancybox.init()})})(jQuery);