HEX
Server: nginx/1.18.0
System: Linux mail.dakarash.co.id 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User: www-data (33)
PHP: 8.1.2-1ubuntu2.23
Disabled: NONE
Upload Files
File: /home/dakarash.co.id/public_html/wp-content/plugins/wp-carousel-free/public/js/fancybox.min.js
!function(window,document,$,undefined){"use strict";if(window.console=window.console||{info:function(stuff){}},$)if($.fn.fancybox)console.info("fancyBox already initialized");else{var defaults={closeExisting:!1,loop:!1,gutter:50,keyboard:!0,preventCaptionOverlap:!0,arrows:!0,infobar:!0,smallBtn:"auto",toolbar:"auto",buttons:["zoom","slideShow","thumbs","close"],idleTime:3,protect:!1,modal:!1,image:{preload:!1},ajax:{settings:{data:{fancybox:!0}}},iframe:{tpl:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" allowfullscreen="allowfullscreen" allow="autoplay; fullscreen" src=""></iframe>',preload:!0,css:{},attr:{scrolling:"auto"}},video:{tpl:'<video class="fancybox-video" controls controlsList="nodownload" poster="{{poster}}"><source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos, <a href="{{src}}">download</a> and watch with your favorite video player!</video>',format:"",autoStart:!0},defaultType:"image",animationEffect:"zoom",animationDuration:366,zoomOpacity:"auto",transitionEffect:"fade",transitionDuration:366,slideClass:"",baseClass:"",baseTpl:'<div class="fancybox-container" role="dialog" tabindex="-1"><div class="fancybox-bg"></div><div class="fancybox-inner"><div class="fancybox-infobar"><span data-fancybox-index></span>&nbsp;/&nbsp;<span data-fancybox-count></span></div><div class="fancybox-toolbar">{{buttons}}</div><div class="fancybox-navigation">{{arrows}}</div><div class="fancybox-stage"></div><div class="fancybox-caption"><div class="fancybox-caption__body"></div></div></div></div>',spinnerTpl:'<div class="fancybox-loading"></div>',errorTpl:'<div class="fancybox-error"><p>{{ERROR}}</p></div>',btnTpl:{download:'<a download data-fancybox-download class="fancybox-button fancybox-button--download" title="{{DOWNLOAD}}" href="javascript:;"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.62 17.09V19H5.38v-1.91zm-2.97-6.96L17 11.45l-5 4.87-5-4.87 1.36-1.32 2.68 2.64V5h1.92v7.77z"/></svg></a>',zoom:'<button data-fancybox-zoom class="fancybox-button fancybox-button--zoom" title="{{ZOOM}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.7 17.3l-3-3a5.9 5.9 0 0 0-.6-7.6 5.9 5.9 0 0 0-8.4 0 5.9 5.9 0 0 0 0 8.4 5.9 5.9 0 0 0 7.7.7l3 3a1 1 0 0 0 1.3 0c.4-.5.4-1 0-1.5zM8.1 13.8a4 4 0 0 1 0-5.7 4 4 0 0 1 5.7 0 4 4 0 0 1 0 5.7 4 4 0 0 1-5.7 0z"/></svg></button>',close:'<button data-fancybox-close class="fancybox-button fancybox-button--close" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 10.6L6.6 5.2 5.2 6.6l5.4 5.4-5.4 5.4 1.4 1.4 5.4-5.4 5.4 5.4 1.4-1.4-5.4-5.4 5.4-5.4-1.4-1.4-5.4 5.4z"/></svg></button>',arrowLeft:'<button data-fancybox-prev class="fancybox-button fancybox-button--arrow_left" title="{{PREV}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.28 15.7l-1.34 1.37L5 12l4.94-5.07 1.34 1.38-2.68 2.72H19v1.94H8.6z"/></svg></div></button>',arrowRight:'<button data-fancybox-next class="fancybox-button fancybox-button--arrow_right" title="{{NEXT}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.4 12.97l-2.68 2.72 1.34 1.38L19 12l-4.94-5.07-1.34 1.38 2.68 2.72H5v1.94z"/></svg></div></button>',smallBtn:'<button type="button" data-fancybox-close class="fancybox-button fancybox-close-small" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" version="1" viewBox="0 0 24 24"><path d="M13 12l5-5-1-1-5 5-5-5-1 1 5 5-5 5 1 1 5-5 5 5 1-1z"/></svg></button>'},parentEl:"body",hideScrollbar:!0,autoFocus:!0,backFocus:!0,trapFocus:!0,fullScreen:{autoStart:!1},touch:{vertical:!0,momentum:!0},hash:null,media:{},slideShow:{autoStart:!1,speed:3e3},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"},wheel:"auto",onInit:$.noop,beforeLoad:$.noop,afterLoad:$.noop,beforeShow:$.noop,afterShow:$.noop,beforeClose:$.noop,afterClose:$.noop,onActivate:$.noop,onDeactivate:$.noop,clickContent:function(current,event){return"image"===current.type&&"zoom"},clickSlide:"close",clickOutside:"close",dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1,mobile:{preventCaptionOverlap:!1,idleTime:!1,clickContent:function(current,event){return"image"===current.type&&"toggleControls"},clickSlide:function(current,event){return"image"===current.type?"toggleControls":"close"},dblclickContent:function(current,event){return"image"===current.type&&"zoom"},dblclickSlide:function(current,event){return"image"===current.type&&"zoom"}},lang:"en",i18n:{en:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",ERROR:"The requested content cannot be loaded. <br/> Please try again later.",PLAY_START:"Start slideshow",PLAY_STOP:"Pause slideshow",FULL_SCREEN:"Full screen",THUMBS:"Thumbnails",DOWNLOAD:"Download",SHARE:"Share",ZOOM:"Zoom"},de:{CLOSE:"Schlie&szlig;en",NEXT:"Weiter",PREV:"Zur&uuml;ck",ERROR:"Die angeforderten Daten konnten nicht geladen werden. <br/> Bitte versuchen Sie es sp&auml;ter nochmal.",PLAY_START:"Diaschau starten",PLAY_STOP:"Diaschau beenden",FULL_SCREEN:"Vollbild",THUMBS:"Vorschaubilder",DOWNLOAD:"Herunterladen",SHARE:"Teilen",ZOOM:"Vergr&ouml;&szlig;ern"}}},$W=$(window),$D=$(document),called=0,isQuery=function(obj){return obj&&obj.hasOwnProperty&&obj instanceof $},requestAFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||function(callback){return window.setTimeout(callback,1e3/60)},cancelAFrame=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||function(id){window.clearTimeout(id)},transitionEnd=function(){var el=document.createElement("fakeelement"),t,transitions={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in transitions)if(void 0!==el.style[t])return transitions[t];return"transitionend"}(),forceRedraw=function($el){return $el&&$el.length&&$el[0].offsetHeight},mergeOpts=function(opts1,opts2){var rez=$.extend(!0,{},opts1,opts2);return $.each(opts2,(function(key,value){$.isArray(value)&&(rez[key]=value)})),rez},inViewport=function(elem){var elemCenter,rez;return!(!elem||elem.ownerDocument!==document)&&($(".fancybox-container").css("pointer-events","none"),elemCenter={x:elem.getBoundingClientRect().left+elem.offsetWidth/2,y:elem.getBoundingClientRect().top+elem.offsetHeight/2},rez=document.elementFromPoint(elemCenter.x,elemCenter.y)===elem,$(".fancybox-container").css("pointer-events",""),rez)},FancyBox=function(content,opts,index){var self=this;this.opts=mergeOpts({index:index},$.fancybox.defaults),$.isPlainObject(opts)&&(this.opts=mergeOpts(this.opts,opts)),$.fancybox.isMobile&&(this.opts=mergeOpts(this.opts,this.opts.mobile)),this.id=this.opts.id||++called,this.currIndex=parseInt(this.opts.index,10)||0,this.prevIndex=null,this.prevPos=null,this.currPos=0,this.firstRun=!0,this.group=[],this.slides={},this.addContent(content),this.group.length&&this.init()},div,buttonStr,focusStr,$pressed;$.extend(FancyBox.prototype,{init:function(){var self=this,firstItem,firstItemOpts=self.group[self.currIndex].opts,$container,buttonStr;firstItemOpts.closeExisting&&$.fancybox.close(!0),$("body").addClass("fancybox-active"),!$.fancybox.getInstance()&&!1!==firstItemOpts.hideScrollbar&&!$.fancybox.isMobile&&document.body.scrollHeight>window.innerHeight&&($("head").append('<style id="fancybox-style-noscroll" type="text/css">.compensate-for-scrollbar{margin-right:'+(window.innerWidth-document.documentElement.clientWidth)+"px;}</style>"),$("body").addClass("compensate-for-scrollbar")),buttonStr="",$.each(firstItemOpts.buttons,(function(index,value){buttonStr+=firstItemOpts.btnTpl[value]||""})),$container=$(self.translate(self,firstItemOpts.baseTpl.replace("{{buttons}}",buttonStr).replace("{{arrows}}",firstItemOpts.btnTpl.arrowLeft+firstItemOpts.btnTpl.arrowRight))).attr("id","fancybox-container-"+self.id).addClass(firstItemOpts.baseClass).data("FancyBox",self).appendTo(firstItemOpts.parentEl),self.$refs={container:$container},["bg","inner","infobar","toolbar","stage","caption","navigation"].forEach((function(item){self.$refs[item]=$container.find(".fancybox-"+item)})),self.trigger("onInit"),self.activate(),self.jumpTo(self.currIndex)},translate:function(obj,str){var arr=obj.opts.i18n[obj.opts.lang]||obj.opts.i18n.en;return str.replace(/\{\{(\w+)\}\}/g,(function(match,n){return void 0===arr[n]?match:arr[n]}))},addContent:function(content){var self=this,items=$.makeArray(content),thumbs;$.each(items,(function(i,item){var obj={},opts={},$item,type,found,src,srcParts;$.isPlainObject(item)?(obj=item,opts=item.opts||item):"object"===$.type(item)&&$(item).length?(opts=($item=$(item)).data()||{},(opts=$.extend(!0,{},opts,opts.options)).$orig=$item,obj.src=self.opts.src||opts.src||$item.attr("href"),obj.type||obj.src||(obj.type="inline",obj.src=item)):obj={type:"html",src:item+""},obj.opts=$.extend(!0,{},self.opts,opts),$.isArray(opts.buttons)&&(obj.opts.buttons=opts.buttons),$.fancybox.isMobile&&obj.opts.mobile&&(obj.opts=mergeOpts(obj.opts,obj.opts.mobile)),type=obj.type||obj.opts.type,src=obj.src||"",!type&&src&&((found=src.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(type="video",obj.opts.video.format||(obj.opts.video.format="video/"+("ogv"===found[1]?"ogg":found[1]))):src.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?type="image":src.match(/\.(pdf)((\?|#).*)?$/i)?(type="iframe",obj=$.extend(!0,obj,{contentType:"pdf",opts:{iframe:{preload:!1}}})):"#"===src.charAt(0)&&(type="inline")),type?obj.type=type:self.trigger("objectNeedsType",obj),obj.contentType||(obj.contentType=$.inArray(obj.type,["html","inline","ajax"])>-1?"html":obj.type),obj.index=self.group.length,"auto"==obj.opts.smallBtn&&(obj.opts.smallBtn=$.inArray(obj.type,["html","inline","ajax"])>-1),"auto"===obj.opts.toolbar&&(obj.opts.toolbar=!obj.opts.smallBtn),obj.$thumb=obj.opts.$thumb||null,obj.opts.$trigger&&obj.index===self.opts.index&&(obj.$thumb=obj.opts.$trigger.find("img:first"),obj.$thumb.length&&(obj.opts.$orig=obj.opts.$trigger)),obj.$thumb&&obj.$thumb.length||!obj.opts.$orig||(obj.$thumb=obj.opts.$orig.find("img:first")),obj.$thumb&&!obj.$thumb.length&&(obj.$thumb=null),obj.thumb=obj.opts.thumb||(obj.$thumb?obj.$thumb[0].src:null),"function"===$.type(obj.opts.caption)&&(obj.opts.caption=obj.opts.caption.apply(item,[self,obj])),"function"===$.type(self.opts.caption)&&(obj.opts.caption=self.opts.caption.apply(item,[self,obj])),obj.opts.caption instanceof $||(obj.opts.caption=void 0===obj.opts.caption?"":obj.opts.caption+""),"ajax"===obj.type&&(srcParts=src.split(/\s+/,2)).length>1&&(obj.src=srcParts.shift(),obj.opts.filter=srcParts.shift()),obj.opts.modal&&(obj.opts=$.extend(!0,obj.opts,{trapFocus:!0,infobar:0,toolbar:0,smallBtn:0,keyboard:0,slideShow:0,fullScreen:0,thumbs:0,touch:0,clickContent:!1,clickSlide:!1,clickOutside:!1,dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1})),self.group.push(obj)})),Object.keys(self.slides).length&&(self.updateControls(),(thumbs=self.Thumbs)&&thumbs.isActive&&(thumbs.create(),thumbs.focus()))},addEvents:function(){var self=this;self.removeEvents(),self.$refs.container.on("click.fb-close","[data-fancybox-close]",(function(e){e.stopPropagation(),e.preventDefault(),self.close(e)})).on("touchstart.fb-prev click.fb-prev","[data-fancybox-prev]",(function(e){e.stopPropagation(),e.preventDefault(),self.previous()})).on("touchstart.fb-next click.fb-next","[data-fancybox-next]",(function(e){e.stopPropagation(),e.preventDefault(),self.next()})).on("click.fb","[data-fancybox-zoom]",(function(e){self[self.isScaledDown()?"scaleToActual":"scaleToFit"]()})),$W.on("orientationchange.fb resize.fb",(function(e){e&&e.originalEvent&&"resize"===e.originalEvent.type?(self.requestId&&cancelAFrame(self.requestId),self.requestId=requestAFrame((function(){self.update(e)}))):(self.current&&"iframe"===self.current.type&&self.$refs.stage.hide(),setTimeout((function(){self.$refs.stage.show(),self.update(e)}),$.fancybox.isMobile?600:250))})),$D.on("keydown.fb",(function(e){var instance,current=($.fancybox?$.fancybox.getInstance():null).current,keycode=e.keyCode||e.which;if(9!=keycode){if(!(!current.opts.keyboard||e.ctrlKey||e.altKey||e.shiftKey||$(e.target).is("input,textarea,video,audio,select")))return 8===keycode||27===keycode?(e.preventDefault(),void self.close(e)):37===keycode||38===keycode?(e.preventDefault(),void self.previous()):39===keycode||40===keycode?(e.preventDefault(),void self.next()):void self.trigger("afterKeydown",e,keycode)}else current.opts.trapFocus&&self.focus(e)})),self.group[self.currIndex].opts.idleTime&&(self.idleSecondsCounter=0,$D.on("mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle",(function(e){self.idleSecondsCounter=0,self.isIdle&&self.showControls(),self.isIdle=!1})),self.idleInterval=window.setInterval((function(){self.idleSecondsCounter++,self.idleSecondsCounter>=self.group[self.currIndex].opts.idleTime&&!self.isDragging&&(self.isIdle=!0,self.idleSecondsCounter=0,self.hideControls())}),1e3))},removeEvents:function(){var self=this;$W.off("orientationchange.fb resize.fb"),$D.off("keydown.fb .fb-idle"),this.$refs.container.off(".fb-close .fb-prev .fb-next"),this.idleInterval&&(window.clearInterval(this.idleInterval),this.idleInterval=null)},previous:function(duration){return this.jumpTo(this.currPos-1,duration)},next:function(duration){return this.jumpTo(this.currPos+1,duration)},jumpTo:function(pos,duration){var self=this,groupLen=self.group.length,firstRun,isMoved,loop,current,previous,slidePos,stagePos,prop,diff;if(!(self.isDragging||self.isClosing||self.isAnimating&&self.firstRun)){if(pos=parseInt(pos,10),!(loop=self.current?self.current.opts.loop:self.opts.loop)&&(pos<0||pos>=groupLen))return!1;if(firstRun=self.firstRun=!Object.keys(self.slides).length,previous=self.current,self.prevIndex=self.currIndex,self.prevPos=self.currPos,current=self.createSlide(pos),groupLen>1&&((loop||current.index<groupLen-1)&&self.createSlide(pos+1),(loop||current.index>0)&&self.createSlide(pos-1)),self.current=current,self.currIndex=current.index,self.currPos=current.pos,self.trigger("beforeShow",firstRun),self.updateControls(),current.forcedDuration=void 0,$.isNumeric(duration)?current.forcedDuration=duration:duration=current.opts[firstRun?"animationDuration":"transitionDuration"],duration=parseInt(duration,10),isMoved=self.isMoved(current),current.$slide.addClass("fancybox-slide--current"),firstRun)return current.opts.animationEffect&&duration&&self.$refs.container.css("transition-duration",duration+"ms"),self.$refs.container.addClass("fancybox-is-open").trigger("focus"),self.loadSlide(current),void self.preload("image");slidePos=$.fancybox.getTranslate(previous.$slide),stagePos=$.fancybox.getTranslate(self.$refs.stage),$.each(self.slides,(function(index,slide){$.fancybox.stop(slide.$slide,!0)})),previous.pos!==current.pos&&(previous.isComplete=!1),previous.$slide.removeClass("fancybox-slide--complete fancybox-slide--current"),isMoved?(diff=slidePos.left-(previous.pos*slidePos.width+previous.pos*previous.opts.gutter),$.each(self.slides,(function(index,slide){slide.$slide.removeClass("fancybox-animated").removeClass((function(index,className){return(className.match(/(^|\s)fancybox-fx-\S+/g)||[]).join(" ")}));var leftPos=slide.pos*slidePos.width+slide.pos*slide.opts.gutter;$.fancybox.setTranslate(slide.$slide,{top:0,left:leftPos-stagePos.left+diff}),slide.pos!==current.pos&&slide.$slide.addClass("fancybox-slide--"+(slide.pos>current.pos?"next":"previous")),forceRedraw(slide.$slide),$.fancybox.animate(slide.$slide,{top:0,left:(slide.pos-current.pos)*slidePos.width+(slide.pos-current.pos)*slide.opts.gutter},duration,(function(){slide.$slide.css({transform:"",opacity:""}).removeClass("fancybox-slide--next fancybox-slide--previous"),slide.pos===self.currPos&&self.complete()}))}))):duration&&current.opts.transitionEffect&&(prop="fancybox-animated fancybox-fx-"+current.opts.transitionEffect,previous.$slide.addClass("fancybox-slide--"+(previous.pos>current.pos?"next":"previous")),$.fancybox.animate(previous.$slide,prop,duration,(function(){previous.$slide.removeClass(prop).removeClass("fancybox-slide--next fancybox-slide--previous")}),!1)),current.isLoaded?self.revealContent(current):self.loadSlide(current),self.preload("image")}},createSlide:function(pos){var self=this,$slide,index;return index=(index=pos%this.group.length)<0?this.group.length+index:index,!this.slides[pos]&&this.group[index]&&($slide=$('<div class="fancybox-slide"></div>').appendTo(this.$refs.stage),this.slides[pos]=$.extend(!0,{},this.group[index],{pos:pos,$slide:$slide,isLoaded:!1}),this.updateSlide(this.slides[pos])),this.slides[pos]},scaleToActual:function(x,y,duration){var self=this,current=self.current,$content=current.$content,canvasWidth=$.fancybox.getTranslate(current.$slide).width,canvasHeight=$.fancybox.getTranslate(current.$slide).height,newImgWidth=current.width,newImgHeight=current.height,imgPos,posX,posY,scaleX,scaleY;self.isAnimating||self.isMoved()||!$content||"image"!=current.type||!current.isLoaded||current.hasError||(self.isAnimating=!0,$.fancybox.stop($content),x=void 0===x?.5*canvasWidth:x,y=void 0===y?.5*canvasHeight:y,(imgPos=$.fancybox.getTranslate($content)).top-=$.fancybox.getTranslate(current.$slide).top,imgPos.left-=$.fancybox.getTranslate(current.$slide).left,scaleX=newImgWidth/imgPos.width,scaleY=newImgHeight/imgPos.height,posX=.5*canvasWidth-.5*newImgWidth,posY=.5*canvasHeight-.5*newImgHeight,newImgWidth>canvasWidth&&((posX=imgPos.left*scaleX-(x*scaleX-x))>0&&(posX=0),posX<canvasWidth-newImgWidth&&(posX=canvasWidth-newImgWidth)),newImgHeight>canvasHeight&&((posY=imgPos.top*scaleY-(y*scaleY-y))>0&&(posY=0),posY<canvasHeight-newImgHeight&&(posY=canvasHeight-newImgHeight)),self.updateCursor(newImgWidth,newImgHeight),$.fancybox.animate($content,{top:posY,left:posX,scaleX:scaleX,scaleY:scaleY},duration||366,(function(){self.isAnimating=!1})),self.SlideShow&&self.SlideShow.isActive&&self.SlideShow.stop())},scaleToFit:function(duration){var self=this,current=self.current,$content=current.$content,end;self.isAnimating||self.isMoved()||!$content||"image"!=current.type||!current.isLoaded||current.hasError||(self.isAnimating=!0,$.fancybox.stop($content),end=self.getFitPos(current),self.updateCursor(end.width,end.height),$.fancybox.animate($content,{top:end.top,left:end.left,scaleX:end.width/$content.width(),scaleY:end.height/$content.height()},duration||366,(function(){self.isAnimating=!1})))},getFitPos:function(slide){var self=this,$content=slide.$content,$slide=slide.$slide,width=slide.width||slide.opts.width,height=slide.height||slide.opts.height,maxWidth,maxHeight,minRatio,aspectRatio,rez={};return!!(slide.isLoaded&&$content&&$content.length)&&(maxWidth=$.fancybox.getTranslate(this.$refs.stage).width,maxHeight=$.fancybox.getTranslate(this.$refs.stage).height,maxWidth-=parseFloat($slide.css("paddingLeft"))+parseFloat($slide.css("paddingRight"))+parseFloat($content.css("marginLeft"))+parseFloat($content.css("marginRight")),maxHeight-=parseFloat($slide.css("paddingTop"))+parseFloat($slide.css("paddingBottom"))+parseFloat($content.css("marginTop"))+parseFloat($content.css("marginBottom")),width&&height||(width=maxWidth,height=maxHeight),(width*=minRatio=Math.min(1,maxWidth/width,maxHeight/height))>maxWidth-.5&&(width=maxWidth),(height*=minRatio)>maxHeight-.5&&(height=maxHeight),"image"===slide.type?(rez.top=Math.floor(.5*(maxHeight-height))+parseFloat($slide.css("paddingTop")),rez.left=Math.floor(.5*(maxWidth-width))+parseFloat($slide.css("paddingLeft"))):"video"===slide.contentType&&(height>width/(aspectRatio=slide.opts.width&&slide.opts.height?width/height:slide.opts.ratio||16/9)?height=width/aspectRatio:width>height*aspectRatio&&(width=height*aspectRatio)),rez.width=width,rez.height=height,rez)},update:function(e){var self=this;$.each(self.slides,(function(key,slide){self.updateSlide(slide,e)}))},updateSlide:function(slide,e){var self=this,$content=slide&&slide.$content,width=slide.width||slide.opts.width,height=slide.height||slide.opts.height,$slide=slide.$slide;this.adjustCaption(slide),$content&&(width||height||"video"===slide.contentType)&&!slide.hasError&&($.fancybox.stop($content),$.fancybox.setTranslate($content,this.getFitPos(slide)),slide.pos===this.currPos&&(this.isAnimating=!1,this.updateCursor())),this.adjustLayout(slide),$slide.length&&($slide.trigger("refresh"),slide.pos===this.currPos&&this.$refs.toolbar.add(this.$refs.navigation.find(".fancybox-button--arrow_right")).toggleClass("compensate-for-scrollbar",$slide.get(0).scrollHeight>$slide.get(0).clientHeight)),this.trigger("onUpdate",slide,e)},centerSlide:function(duration){var self=this,current=self.current,$slide=current.$slide;!self.isClosing&&current&&($slide.siblings().css({transform:"",opacity:""}),$slide.parent().children().removeClass("fancybox-slide--previous fancybox-slide--next"),$.fancybox.animate($slide,{top:0,left:0,opacity:1},void 0===duration?0:duration,(function(){$slide.css({transform:"",opacity:""}),current.isComplete||self.complete()}),!1))},isMoved:function(slide){var current=slide||this.current,slidePos,stagePos;return!!current&&(stagePos=$.fancybox.getTranslate(this.$refs.stage),slidePos=$.fancybox.getTranslate(current.$slide),!current.$slide.hasClass("fancybox-animated")&&(Math.abs(slidePos.top-stagePos.top)>.5||Math.abs(slidePos.left-stagePos.left)>.5))},updateCursor:function(nextWidth,nextHeight){var self=this,current=this.current,$container=this.$refs.container,canPan,isZoomable;current&&!this.isClosing&&this.Guestures&&($container.removeClass("fancybox-is-zoomable fancybox-can-zoomIn fancybox-can-zoomOut fancybox-can-swipe fancybox-can-pan"),isZoomable=!!(canPan=this.canPan(nextWidth,nextHeight))||this.isZoomable(),$container.toggleClass("fancybox-is-zoomable",isZoomable),$("[data-fancybox-zoom]").prop("disabled",!isZoomable),canPan?$container.addClass("fancybox-can-pan"):isZoomable&&("zoom"===current.opts.clickContent||$.isFunction(current.opts.clickContent)&&"zoom"==current.opts.clickContent(current))?$container.addClass("fancybox-can-zoomIn"):current.opts.touch&&(current.opts.touch.vertical||this.group.length>1)&&"video"!==current.contentType&&$container.addClass("fancybox-can-swipe"))},isZoomable:function(){var self=this,current=this.current,fitPos;if(current&&!this.isClosing&&"image"===current.type&&!current.hasError){if(!current.isLoaded)return!0;if((fitPos=this.getFitPos(current))&&(current.width>fitPos.width||current.height>fitPos.height))return!0}return!1},isScaledDown:function(nextWidth,nextHeight){var self=this,rez=!1,current=this.current,$content=current.$content;return void 0!==nextWidth&&void 0!==nextHeight?rez=nextWidth<current.width&&nextHeight<current.height:$content&&(rez=(rez=$.fancybox.getTranslate($content)).width<current.width&&rez.height<current.height),rez},canPan:function(nextWidth,nextHeight){var self=this,current=this.current,pos=null,rez=!1;return"image"===current.type&&(current.isComplete||nextWidth&&nextHeight)&&!current.hasError&&(rez=this.getFitPos(current),void 0!==nextWidth&&void 0!==nextHeight?pos={width:nextWidth,height:nextHeight}:current.isComplete&&(pos=$.fancybox.getTranslate(current.$content)),pos&&rez&&(rez=Math.abs(pos.width-rez.width)>1.5||Math.abs(pos.height-rez.height)>1.5)),rez},loadSlide:function(slide){var self=this,type,$slide,ajaxLoad;if(!slide.isLoading&&!slide.isLoaded){if(slide.isLoading=!0,!1===self.trigger("beforeLoad",slide))return slide.isLoading=!1,!1;switch(type=slide.type,($slide=slide.$slide).off("refresh").trigger("onReset").addClass(slide.opts.slideClass),type){case"image":self.setImage(slide);break;case"iframe":self.setIframe(slide);break;case"html":self.setContent(slide,slide.src||slide.content);break;case"video":self.setContent(slide,slide.opts.video.tpl.replace(/\{\{src\}\}/gi,slide.src).replace("{{format}}",slide.opts.videoFormat||slide.opts.video.format||"").replace("{{poster}}",slide.thumb||""));break;case"inline":$(slide.src).length?self.setContent(slide,$(slide.src)):self.setError(slide);break;case"ajax":self.showLoading(slide),ajaxLoad=$.ajax($.extend({},slide.opts.ajax.settings,{url:slide.src,success:function(data,textStatus){"success"===textStatus&&self.setContent(slide,data)},error:function(jqXHR,textStatus){jqXHR&&"abort"!==textStatus&&self.setError(slide)}})),$slide.one("onReset",(function(){ajaxLoad.abort()}));break;default:self.setError(slide)}return!0}},setImage:function(slide){var self=this,ghost;setTimeout((function(){var $img=slide.$image;self.isClosing||!slide.isLoading||$img&&$img.length&&$img[0].complete||slide.hasError||self.showLoading(slide)}),50),self.checkSrcset(slide),slide.$content=$('<div class="fancybox-content"></div>').addClass("fancybox-is-hidden").appendTo(slide.$slide.addClass("fancybox-slide--image")),!1!==slide.opts.preload&&slide.opts.width&&slide.opts.height&&slide.thumb&&(slide.width=slide.opts.width,slide.height=slide.opts.height,(ghost=document.createElement("img")).onerror=function(){$(this).remove(),slide.$ghost=null},ghost.onload=function(){self.afterLoad(slide)},slide.$ghost=$(ghost).addClass("fancybox-image").appendTo(slide.$content).attr("src",slide.thumb)),self.setBigImage(slide)},checkSrcset:function(slide){var srcset=slide.opts.srcset||slide.opts.image.srcset,found,temp,pxRatio,windowWidth;if(srcset){pxRatio=window.devicePixelRatio||1,windowWidth=window.innerWidth*pxRatio,(temp=srcset.split(",").map((function(el){var ret={};return el.trim().split(/\s+/).forEach((function(el,i){var value=parseInt(el.substring(0,el.length-1),10);if(0===i)return ret.url=el;value&&(ret.value=value,ret.postfix=el[el.length-1])})),ret}))).sort((function(a,b){return a.value-b.value}));for(var j=0;j<temp.length;j++){var el=temp[j];if("w"===el.postfix&&el.value>=windowWidth||"x"===el.postfix&&el.value>=pxRatio){found=el;break}}!found&&temp.length&&(found=temp[temp.length-1]),found&&(slide.src=found.url,slide.width&&slide.height&&"w"==found.postfix&&(slide.height=slide.width/slide.height*found.value,slide.width=found.value),slide.opts.srcset=srcset)}},setBigImage:function(slide){var self=this,img=document.createElement("img"),$img=$(img);slide.$image=$img.one("error",(function(){self.setError(slide)})).one("load",(function(){var sizes;slide.$ghost||(self.resolveImageSlideSize(slide,this.naturalWidth,this.naturalHeight),self.afterLoad(slide)),self.isClosing||(slide.opts.srcset&&((sizes=slide.opts.sizes)&&"auto"!==sizes||(sizes=(slide.width/slide.height>1&&$W.width()/$W.height()>1?"100":Math.round(slide.width/slide.height*100))+"vw"),$img.attr("sizes",sizes).attr("srcset",slide.opts.srcset)),slide.$ghost&&setTimeout((function(){slide.$ghost&&!self.isClosing&&slide.$ghost.hide()}),Math.min(300,Math.max(1e3,slide.height/1600))),self.hideLoading(slide))})).addClass("fancybox-image").attr("src",slide.src).appendTo(slide.$content),(img.complete||"complete"==img.readyState)&&$img.naturalWidth&&$img.naturalHeight?$img.trigger("load"):img.error&&$img.trigger("error")},resolveImageSlideSize:function(slide,imgWidth,imgHeight){var maxWidth=parseInt(slide.opts.width,10),maxHeight=parseInt(slide.opts.height,10);slide.width=imgWidth,slide.height=imgHeight,maxWidth>0&&(slide.width=maxWidth,slide.height=Math.floor(maxWidth*imgHeight/imgWidth)),maxHeight>0&&(slide.width=Math.floor(maxHeight*imgWidth/imgHeight),slide.height=maxHeight)},setIframe:function(slide){var self=this,opts=slide.opts.iframe,$slide=slide.$slide,$iframe;slide.$content=$('<div class="fancybox-content'+(opts.preload?" fancybox-is-hidden":"")+'"></div>').css(opts.css).appendTo($slide),$slide.addClass("fancybox-slide--"+slide.contentType),slide.$iframe=$iframe=$(opts.tpl.replace(/\{rnd\}/g,(new Date).getTime())).attr(opts.attr).appendTo(slide.$content),opts.preload?(self.showLoading(slide),$iframe.on("load.fb error.fb",(function(e){this.isReady=1,slide.$slide.trigger("refresh"),self.afterLoad(slide)})),$slide.on("refresh.fb",(function(){var $content=slide.$content,frameWidth=opts.css.width,frameHeight=opts.css.height,$contents,$body;if(1===$iframe[0].isReady){try{$body=($contents=$iframe.contents()).find("body")}catch(ignore){}$body&&$body.length&&$body.children().length&&($slide.css("overflow","visible"),$content.css({width:"100%","max-width":"100%",height:"9999px"}),void 0===frameWidth&&(frameWidth=Math.ceil(Math.max($body[0].clientWidth,$body.outerWidth(!0)))),$content.css("width",frameWidth||"").css("max-width",""),void 0===frameHeight&&(frameHeight=Math.ceil(Math.max($body[0].clientHeight,$body.outerHeight(!0)))),$content.css("height",frameHeight||""),$slide.css("overflow","auto")),$content.removeClass("fancybox-is-hidden")}}))):self.afterLoad(slide),$iframe.attr("src",slide.src),$slide.one("onReset",(function(){try{$(this).find("iframe").hide().unbind().attr("src","//about:blank")}catch(ignore){}$(this).off("refresh.fb").empty(),slide.isLoaded=!1,slide.isRevealed=!1}))},setContent:function(slide,content){var self=this;this.isClosing||(this.hideLoading(slide),slide.$content&&$.fancybox.stop(slide.$content),slide.$slide.empty(),isQuery(content)&&content.parent().length?((content.hasClass("fancybox-content")||content.parent().hasClass("fancybox-content"))&&content.parents(".fancybox-slide").trigger("onReset"),slide.$placeholder=$("<div>").hide().insertAfter(content),content.css("display","inline-block")):slide.hasError||("string"===$.type(content)&&(content=$("<div>").append($.trim(content)).contents()),slide.opts.filter&&(content=$("<div>").html(content).find(slide.opts.filter))),slide.$slide.one("onReset",(function(){$(this).find("video,audio").trigger("pause"),slide.$placeholder&&(slide.$placeholder.after(content.removeClass("fancybox-content").hide()).remove(),slide.$placeholder=null),slide.$smallBtn&&(slide.$smallBtn.remove(),slide.$smallBtn=null),slide.hasError||($(this).empty(),slide.isLoaded=!1,slide.isRevealed=!1)})),$(content).appendTo(slide.$slide),$(content).is("video,audio")&&($(content).addClass("fancybox-video"),$(content).wrap("<div></div>"),slide.contentType="video",slide.opts.width=slide.opts.width||$(content).attr("width"),slide.opts.height=slide.opts.height||$(content).attr("height")),slide.$content=slide.$slide.children().filter("div,form,main,video,audio,article,.fancybox-content").first(),slide.$content.siblings().hide(),slide.$content.length||(slide.$content=slide.$slide.wrapInner("<div></div>").children().first()),slide.$content.addClass("fancybox-content"),slide.$slide.addClass("fancybox-slide--"+slide.contentType),this.afterLoad(slide))},setError:function(slide){slide.hasError=!0,slide.$slide.trigger("onReset").removeClass("fancybox-slide--"+slide.contentType).addClass("fancybox-slide--error"),slide.contentType="html",this.setContent(slide,this.translate(slide,slide.opts.errorTpl)),slide.pos===this.currPos&&(this.isAnimating=!1)},showLoading:function(slide){var self=this;(slide=slide||this.current)&&!slide.$spinner&&(slide.$spinner=$(this.translate(this,this.opts.spinnerTpl)).appendTo(slide.$slide).hide().fadeIn("fast"))},hideLoading:function(slide){var self=this;(slide=slide||this.current)&&slide.$spinner&&(slide.$spinner.stop().remove(),delete slide.$spinner)},afterLoad:function(slide){var self=this;this.isClosing||(slide.isLoading=!1,slide.isLoaded=!0,this.trigger("afterLoad",slide),this.hideLoading(slide),!slide.opts.smallBtn||slide.$smallBtn&&slide.$smallBtn.length||(slide.$smallBtn=$(this.translate(slide,slide.opts.btnTpl.smallBtn)).appendTo(slide.$content)),slide.opts.protect&&slide.$content&&!slide.hasError&&(slide.$content.on("contextmenu.fb",(function(e){return 2==e.button&&e.preventDefault(),!0})),"image"===slide.type&&$('<div class="fancybox-spaceball"></div>').appendTo(slide.$content)),this.adjustCaption(slide),this.adjustLayout(slide),slide.pos===this.currPos&&this.updateCursor(),this.revealContent(slide))},adjustCaption:function(slide){var self=this,current=slide||this.current,caption=current.opts.caption,preventOverlap=current.opts.preventCaptionOverlap,$caption=this.$refs.caption,$clone,captionH=!1;$caption.toggleClass("fancybox-caption--separate",preventOverlap),preventOverlap&&caption&&caption.length&&(current.pos!==this.currPos?(($clone=$caption.clone().appendTo($caption.parent())).children().eq(0).empty().html(caption),captionH=$clone.outerHeight(!0),$clone.empty().remove()):this.$caption&&(captionH=this.$caption.outerHeight(!0)),current.$slide.css("padding-bottom",captionH||""))},adjustLayout:function(slide){var self=this,current=slide||this.current,scrollHeight,marginBottom,inlinePadding,actualPadding;current.isLoaded&&!0!==current.opts.disableLayoutFix&&(current.$content.css("margin-bottom",""),current.$content.outerHeight()>current.$slide.height()+.5&&(inlinePadding=current.$slide[0].style["padding-bottom"],actualPadding=current.$slide.css("padding-bottom"),parseFloat(actualPadding)>0&&(scrollHeight=current.$slide[0].scrollHeight,current.$slide.css("padding-bottom",0),Math.abs(scrollHeight-current.$slide[0].scrollHeight)<1&&(marginBottom=actualPadding),current.$slide.css("padding-bottom",inlinePadding))),current.$content.css("margin-bottom",marginBottom))},revealContent:function(slide){var self=this,$slide=slide.$slide,end=!1,start=!1,isMoved=self.isMoved(slide),isRevealed=slide.isRevealed,effect,effectClassName,duration,opacity;return slide.isRevealed=!0,effect=slide.opts[self.firstRun?"animationEffect":"transitionEffect"],duration=slide.opts[self.firstRun?"animationDuration":"transitionDuration"],duration=parseInt(void 0===slide.forcedDuration?duration:slide.forcedDuration,10),!isMoved&&slide.pos===self.currPos&&duration||(effect=!1),"zoom"===effect&&(slide.pos===self.currPos&&duration&&"image"===slide.type&&!slide.hasError&&(start=self.getThumbPos(slide))?end=self.getFitPos(slide):effect="fade"),"zoom"===effect?(self.isAnimating=!0,end.scaleX=end.width/start.width,end.scaleY=end.height/start.height,"auto"==(opacity=slide.opts.zoomOpacity)&&(opacity=Math.abs(slide.width/slide.height-start.width/start.height)>.1),opacity&&(start.opacity=.1,end.opacity=1),$.fancybox.setTranslate(slide.$content.removeClass("fancybox-is-hidden"),start),forceRedraw(slide.$content),void $.fancybox.animate(slide.$content,end,duration,(function(){self.isAnimating=!1,self.complete()}))):(self.updateSlide(slide),effect?($.fancybox.stop($slide),effectClassName="fancybox-slide--"+(slide.pos>=self.prevPos?"next":"previous")+" fancybox-animated fancybox-fx-"+effect,$slide.addClass(effectClassName).removeClass("fancybox-slide--current"),slide.$content.removeClass("fancybox-is-hidden"),forceRedraw($slide),"image"!==slide.type&&slide.$content.hide().show(0),void $.fancybox.animate($slide,"fancybox-slide--current",duration,(function(){$slide.removeClass(effectClassName).css({transform:"",opacity:""}),slide.pos===self.currPos&&self.complete()}),!0)):(slide.$content.removeClass("fancybox-is-hidden"),isRevealed||!isMoved||"image"!==slide.type||slide.hasError||slide.$content.hide().fadeIn("fast"),void(slide.pos===self.currPos&&self.complete())))},getThumbPos:function(slide){var rez=!1,$thumb=slide.$thumb,thumbPos,btw,brw,bbw,blw;return!(!$thumb||!inViewport($thumb[0]))&&(thumbPos=$.fancybox.getTranslate($thumb),btw=parseFloat($thumb.css("border-top-width")||0),brw=parseFloat($thumb.css("border-right-width")||0),bbw=parseFloat($thumb.css("border-bottom-width")||0),blw=parseFloat($thumb.css("border-left-width")||0),rez={top:thumbPos.top+btw,left:thumbPos.left+blw,width:thumbPos.width-brw-blw,height:thumbPos.height-btw-bbw,scaleX:1,scaleY:1},thumbPos.width>0&&thumbPos.height>0&&rez)},complete:function(){var self=this,current=self.current,slides={},$el;!self.isMoved()&&current.isLoaded&&(current.isComplete||(current.isComplete=!0,current.$slide.siblings().trigger("onReset"),self.preload("inline"),forceRedraw(current.$slide),current.$slide.addClass("fancybox-slide--complete"),$.each(self.slides,(function(key,slide){slide.pos>=self.currPos-1&&slide.pos<=self.currPos+1?slides[slide.pos]=slide:slide&&($.fancybox.stop(slide.$slide),slide.$slide.off().remove())})),self.slides=slides),self.isAnimating=!1,self.updateCursor(),self.trigger("afterShow"),current.opts.video.autoStart&&current.$slide.find("video,audio").filter(":visible:first").trigger("play").one("ended",(function(){Document.exitFullscreen?Document.exitFullscreen():this.webkitExitFullscreen&&this.webkitExitFullscreen(),self.next()})),current.opts.autoFocus&&"html"===current.contentType&&(($el=current.$content.find("input[autofocus]:enabled:visible:first")).length?$el.trigger("focus"):self.focus(null,!0)),current.$slide.scrollTop(0).scrollLeft(0))},preload:function(type){var self=this,prev,next;this.group.length<2||(next=this.slides[this.currPos+1],(prev=this.slides[this.currPos-1])&&prev.type===type&&this.loadSlide(prev),next&&next.type===type&&this.loadSlide(next))},focus:function(e,firstRun){var self=this,focusableStr=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not([tabindex^="-"])'].join(","),focusableItems,focusedItemIndex;this.isClosing||((focusableItems=(focusableItems=!e&&this.current&&this.current.isComplete?this.current.$slide.find("*:visible"+(firstRun?":not(.fancybox-close-small)":"")):this.$refs.container.find("*:visible")).filter(focusableStr).filter((function(){return"hidden"!==$(this).css("visibility")&&!$(this).hasClass("disabled")}))).length?(focusedItemIndex=focusableItems.index(document.activeElement),e&&e.shiftKey?(focusedItemIndex<0||0==focusedItemIndex)&&(e.preventDefault(),focusableItems.eq(focusableItems.length-1).trigger("focus")):(focusedItemIndex<0||focusedItemIndex==focusableItems.length-1)&&(e&&e.preventDefault(),focusableItems.eq(0).trigger("focus"))):this.$refs.container.trigger("focus"))},activate:function(){var self=this;$(".fancybox-container").each((function(){var instance=$(this).data("FancyBox");instance&&instance.id!==self.id&&!instance.isClosing&&(instance.trigger("onDeactivate"),instance.removeEvents(),instance.isVisible=!1)})),self.isVisible=!0,(self.current||self.isIdle)&&(self.update(),self.updateControls()),self.trigger("onActivate"),self.addEvents()},close:function(e,d){var self=this,current=self.current,effect,duration,$content,domRect,opacity,start,end,done=function(){self.cleanUp(e)};return!self.isClosing&&(self.isClosing=!0,!1===self.trigger("beforeClose",e)?(self.isClosing=!1,requestAFrame((function(){self.update()})),!1):(self.removeEvents(),$content=current.$content,effect=current.opts.animationEffect,duration=$.isNumeric(d)?d:effect?current.opts.animationDuration:0,current.$slide.removeClass("fancybox-slide--complete fancybox-slide--next fancybox-slide--previous fancybox-animated"),!0!==e?$.fancybox.stop(current.$slide):effect=!1,current.$slide.siblings().trigger("onReset").remove(),duration&&self.$refs.container.removeClass("fancybox-is-open").addClass("fancybox-is-closing").css("transition-duration",duration+"ms"),self.hideLoading(current),self.hideControls(!0),self.updateCursor(),"zoom"!==effect||$content&&duration&&"image"===current.type&&!self.isMoved()&&!current.hasError&&(end=self.getThumbPos(current))||(effect="fade"),"zoom"===effect?($.fancybox.stop($content),start={top:(domRect=$.fancybox.getTranslate($content)).top,left:domRect.left,scaleX:domRect.width/end.width,scaleY:domRect.height/end.height,width:end.width,height:end.height},"auto"==(opacity=current.opts.zoomOpacity)&&(opacity=Math.abs(current.width/current.height-end.width/end.height)>.1),opacity&&(end.opacity=0),$.fancybox.setTranslate($content,start),forceRedraw($content),$.fancybox.animate($content,end,duration,done),!0):(effect&&duration?$.fancybox.animate(current.$slide.addClass("fancybox-slide--previous").removeClass("fancybox-slide--current"),"fancybox-animated fancybox-fx-"+effect,duration,done):!0===e?setTimeout(done,duration):done(),!0)))},cleanUp:function(e){var self=this,instance,$focus=this.current.opts.$orig,x,y;this.current.$slide.trigger("onReset"),this.$refs.container.empty().remove(),this.trigger("afterClose",e),this.current.opts.backFocus&&($focus&&$focus.length&&$focus.is(":visible")||($focus=this.$trigger),$focus&&$focus.length&&(x=window.scrollX,y=window.scrollY,$focus.trigger("focus"),$("html, body").scrollTop(y).scrollLeft(x))),this.current=null,(instance=$.fancybox.getInstance())?instance.activate():($("body").removeClass("fancybox-active compensate-for-scrollbar"),$("#fancybox-style-noscroll").remove())},trigger:function(name,slide){var args=Array.prototype.slice.call(arguments,1),self=this,obj=slide&&slide.opts?slide:self.current,rez;if(obj?args.unshift(obj):obj=self,args.unshift(self),$.isFunction(obj.opts[name])&&(rez=obj.opts[name].apply(obj,args)),!1===rez)return rez;"afterClose"!==name&&self.$refs?self.$refs.container.trigger(name+".fb",args):$D.trigger(name+".fb",args)},updateControls:function(){var self=this,current=this.current,index=current.index,$container=this.$refs.container,$caption=this.$refs.caption,caption=current.opts.caption;current.$slide.trigger("refresh"),caption&&caption.length?(this.$caption=$caption,$caption.children().eq(0).html(caption)):this.$caption=null,this.hasHiddenControls||this.isIdle||this.showControls(),$container.find("[data-fancybox-count]").html(this.group.length),$container.find("[data-fancybox-index]").html(index+1),$container.find("[data-fancybox-prev]").prop("disabled",!current.opts.loop&&index<=0),$container.find("[data-fancybox-next]").prop("disabled",!current.opts.loop&&index>=this.group.length-1),"image"===current.type?$container.find("[data-fancybox-zoom]").show().end().find("[data-fancybox-download]").attr("href",current.opts.image.src||current.src).show():current.opts.toolbar&&$container.find("[data-fancybox-download],[data-fancybox-zoom]").hide(),$(document.activeElement).is(":hidden,[disabled]")&&this.$refs.container.trigger("focus")},hideControls:function(andCaption){var self=this,arr=["infobar","toolbar","nav"];!andCaption&&this.current.opts.preventCaptionOverlap||arr.push("caption"),this.$refs.container.removeClass(arr.map((function(i){return"fancybox-show-"+i})).join(" ")),this.hasHiddenControls=!0},showControls:function(){var self=this,opts=this.current?this.current.opts:this.opts,$container=this.$refs.container;this.hasHiddenControls=!1,this.idleSecondsCounter=0,$container.toggleClass("fancybox-show-toolbar",!(!opts.toolbar||!opts.buttons)).toggleClass("fancybox-show-infobar",!!(opts.infobar&&this.group.length>1)).toggleClass("fancybox-show-caption",!!this.$caption).toggleClass("fancybox-show-nav",!!(opts.arrows&&this.group.length>1)).toggleClass("fancybox-is-modal",!!opts.modal)},toggleControls:function(){this.hasHiddenControls?this.showControls():this.hideControls()}}),$.fancybox={version:"3.5.7",defaults:defaults,getInstance:function(command){var instance=$('.fancybox-container:not(".fancybox-is-closing"):last').data("FancyBox"),args=Array.prototype.slice.call(arguments,1);return instance instanceof FancyBox&&("string"===$.type(command)?instance[command].apply(instance,args):"function"===$.type(command)&&command.apply(instance,args),instance)},open:function(items,opts,index){return new FancyBox(items,opts,index)},close:function(all){var instance=this.getInstance();instance&&(instance.close(),!0===all&&this.close(all))},destroy:function(){this.close(!0),$D.add("body").off("click.fb-start","**")},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:(div=document.createElement("div"),window.getComputedStyle&&window.getComputedStyle(div)&&window.getComputedStyle(div).getPropertyValue("transform")&&!(document.documentMode&&document.documentMode<11)),getTranslate:function($el){var domRect;return!(!$el||!$el.length)&&{top:(domRect=$el[0].getBoundingClientRect()).top||0,left:domRect.left||0,width:domRect.width,height:domRect.height,opacity:parseFloat($el.css("opacity"))}},setTranslate:function($el,props){var str="",css={};if($el&&props)return void 0===props.left&&void 0===props.top||(str=(void 0===props.left?$el.position().left:props.left)+"px, "+(void 0===props.top?$el.position().top:props.top)+"px",str=this.use3d?"translate3d("+str+", 0px)":"translate("+str+")"),void 0!==props.scaleX&&void 0!==props.scaleY?str+=" scale("+props.scaleX+", "+props.scaleY+")":void 0!==props.scaleX&&(str+=" scaleX("+props.scaleX+")"),str.length&&(css.transform=str),void 0!==props.opacity&&(css.opacity=props.opacity),void 0!==props.width&&(css.width=props.width),void 0!==props.height&&(css.height=props.height),$el.css(css)},animate:function($el,to,duration,callback,leaveAnimationName){var self=this,from;$.isFunction(duration)&&(callback=duration,duration=null),self.stop($el),from=self.getTranslate($el),$el.on(transitionEnd,(function(e){(!e||!e.originalEvent||$el.is(e.originalEvent.target)&&"z-index"!=e.originalEvent.propertyName)&&(self.stop($el),$.isNumeric(duration)&&$el.css("transition-duration",""),$.isPlainObject(to)?void 0!==to.scaleX&&void 0!==to.scaleY&&self.setTranslate($el,{top:to.top,left:to.left,width:from.width*to.scaleX,height:from.height*to.scaleY,scaleX:1,scaleY:1}):!0!==leaveAnimationName&&$el.removeClass(to),$.isFunction(callback)&&callback(e))})),$.isNumeric(duration)&&$el.css("transition-duration",duration+"ms"),$.isPlainObject(to)?(void 0!==to.scaleX&&void 0!==to.scaleY&&(delete to.width,delete to.height,$el.parent().hasClass("fancybox-slide--image")&&$el.parent().addClass("fancybox-is-scaling")),$.fancybox.setTranslate($el,to)):$el.addClass(to),$el.data("timer",setTimeout((function(){$el.trigger(transitionEnd)}),duration+33))},stop:function($el,callCallback){$el&&$el.length&&(clearTimeout($el.data("timer")),callCallback&&$el.trigger(transitionEnd),$el.off(transitionEnd).css("transition-duration",""),$el.parent().removeClass("fancybox-is-scaling"))}},$.fn.fancybox=function(options){var selector;return(selector=(options=options||{}).selector||!1)?$("body").off("click.fb-start",selector).on("click.fb-start",selector,{options:options},_run):this.off("click.fb-start").on("click.fb-start",{items:this,options:options},_run),this},$D.on("click.fb-start","[data-fancybox]",_run),$D.on("click.fb-start","[data-fancybox-trigger]",(function(e){$('[data-fancybox="'+$(this).attr("data-fancybox-trigger")+'"]').eq($(this).attr("data-fancybox-index")||0).trigger("click.fb-start",{$trigger:$(this)})})),buttonStr=".fancybox-button",focusStr="fancybox-focus",$pressed=null,$D.on("mousedown mouseup focus blur",buttonStr,(function(e){switch(e.type){case"mousedown":$pressed=$(this);break;case"mouseup":$pressed=null;break;case"focusin":$(buttonStr).removeClass(focusStr),$(this).is($pressed)||$(this).is("[disabled]")||$(this).addClass(focusStr);break;case"focusout":$(buttonStr).removeClass(focusStr)}}))}function _run(e,opts){var items=[],index=0,$target,value,instance;e&&e.isDefaultPrevented()||(e.preventDefault(),opts=opts||{},e&&e.data&&(opts=mergeOpts(e.data.options,opts)),$target=opts.$target||$(e.currentTarget).trigger("blur"),(instance=$.fancybox.getInstance())&&instance.$trigger&&instance.$trigger.is($target)||(items=opts.selector?$(opts.selector):(value=$target.attr("data-fancybox")||"")?(items=e.data?e.data.items:[]).length?items.filter('[data-fancybox="'+value+'"]'):$('[data-fancybox="'+value+'"]'):[$target],(index=$(items).index($target))<0&&(index=0),(instance=$.fancybox.open(items,opts,index)).$trigger=$target))}}(window,document,jQuery),function($){"use strict";var defaults={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramPlace:8,type:"iframe",url:"https://www.youtube-nocookie.com/embed/$4",thumb:"https://img.youtube.com/vi/$4/hqdefault.jpg"},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(rez){return"//maps.google."+rez[2]+"/?ll="+(rez[9]?rez[9]+"&z="+Math.floor(rez[10])+(rez[12]?rez[12].replace(/^\//,"&"):""):rez[12]+"").replace(/\?/,"&")+"&output="+(rez[12]&&rez[12].indexOf("layer=c")>0?"svembed":"embed")}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:"iframe",url:function(rez){return"//maps.google."+rez[2]+"/maps?q="+rez[5].replace("query=","q=").replace("api=1","")+"&output=embed"}}},format=function(url,rez,params){if(url)return params=params||"","object"===$.type(params)&&(params=$.param(params,!0)),$.each(rez,(function(key,value){url=url.replace("$"+key,value||"")})),params.length&&(url+=(url.indexOf("?")>0?"&":"?")+params),url};$(document).on("objectNeedsType.fb",(function(e,instance,item){var url=item.src||"",type=!1,media,thumb,rez,params,urlParams,paramObj,provider;media=$.extend(!0,{},defaults,item.opts.media),$.each(media,(function(providerName,providerOpts){if(rez=url.match(providerOpts.matcher)){if(type=providerOpts.type,provider=providerName,paramObj={},providerOpts.paramPlace&&rez[providerOpts.paramPlace]){"?"==(urlParams=rez[providerOpts.paramPlace])[0]&&(urlParams=urlParams.substring(1)),urlParams=urlParams.split("&");for(var m=0;m<urlParams.length;++m){var p=urlParams[m].split("=",2);2==p.length&&(paramObj[p[0]]=decodeURIComponent(p[1].replace(/\+/g," ")))}}return params=$.extend(!0,{},providerOpts.params,item.opts[providerName],paramObj),url="function"===$.type(providerOpts.url)?providerOpts.url.call(this,rez,params,item):format(providerOpts.url,rez,params),thumb="function"===$.type(providerOpts.thumb)?providerOpts.thumb.call(this,rez,params,item):format(providerOpts.thumb,rez),"youtube"===providerName?url=url.replace(/&t=((\d+)m)?(\d+)s/,(function(match,p1,m,s){return"&start="+((m?60*parseInt(m,10):0)+parseInt(s,10))})):"vimeo"===providerName&&(url=url.replace("&%23","#")),!1}})),type?(item.opts.thumb||item.opts.$thumb&&item.opts.$thumb.length||(item.opts.thumb=thumb),"iframe"===type&&(item.opts=$.extend(!0,item.opts,{iframe:{preload:!1,attr:{scrolling:"no"}}})),$.extend(item,{type:type,src:url,origSrc:item.src,contentSource:provider,contentType:"image"===type?"image":"gmap_place"==provider||"gmap_search"==provider?"map":"video"})):url&&(item.type=item.opts.defaultType)}));var VideoAPILoader={youtube:{src:"https://www.youtube.com/iframe_api",class:"YT",loading:!1,loaded:!1},vimeo:{src:"https://player.vimeo.com/api/player.js",class:"Vimeo",loading:!1,loaded:!1},load:function(vendor){var _this=this,script;this[vendor].loaded?setTimeout((function(){_this.done(vendor)})):this[vendor].loading||(this[vendor].loading=!0,(script=document.createElement("script")).type="text/javascript",script.src=this[vendor].src,"youtube"===vendor?window.onYouTubeIframeAPIReady=function(){_this[vendor].loaded=!0,_this.done(vendor)}:script.onload=function(){_this[vendor].loaded=!0,_this.done(vendor)},document.body.appendChild(script))},done:function(vendor){var instance,$el,player;"youtube"===vendor&&delete window.onYouTubeIframeAPIReady,(instance=$.fancybox.getInstance())&&($el=instance.current.$content.find("iframe"),"youtube"===vendor&&void 0!==YT&&YT?player=new YT.Player($el.attr("id"),{events:{onStateChange:function(e){0==e.data&&instance.next()}}}):"vimeo"===vendor&&void 0!==Vimeo&&Vimeo&&(player=new Vimeo.Player($el)).on("ended",(function(){instance.next()})))}};$(document).on({"afterShow.fb":function(e,instance,current){instance.group.length>1&&("youtube"===current.contentSource||"vimeo"===current.contentSource)&&VideoAPILoader.load(current.contentSource)}})}(jQuery),function(window,document,$){"use strict";var requestAFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||function(callback){return window.setTimeout(callback,1e3/60)},cancelAFrame=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||function(id){window.clearTimeout(id)},getPointerXY=function(e){var result=[];for(var key in e=(e=e.originalEvent||e||window.e).touches&&e.touches.length?e.touches:e.changedTouches&&e.changedTouches.length?e.changedTouches:[e])e[key].pageX?result.push({x:e[key].pageX,y:e[key].pageY}):e[key].clientX&&result.push({x:e[key].clientX,y:e[key].clientY});return result},distance=function(point2,point1,what){return point1&&point2?"x"===what?point2.x-point1.x:"y"===what?point2.y-point1.y:Math.sqrt(Math.pow(point2.x-point1.x,2)+Math.pow(point2.y-point1.y,2)):0},isClickable=function($el){if($el.is('a,area,button,[role="button"],input,label,select,summary,textarea,video,audio,iframe')||$.isFunction($el.get(0).onclick)||$el.data("selectable"))return!0;for(var i=0,atts=$el[0].attributes,n=atts.length;i<n;i++)if("data-fancybox-"===atts[i].nodeName.substr(0,14))return!0;return!1},hasScrollbars=function(el){var overflowY=window.getComputedStyle(el)["overflow-y"],overflowX=window.getComputedStyle(el)["overflow-x"],vertical=("scroll"===overflowY||"auto"===overflowY)&&el.scrollHeight>el.clientHeight,horizontal=("scroll"===overflowX||"auto"===overflowX)&&el.scrollWidth>el.clientWidth;return vertical||horizontal},isScrollable=function($el){for(var rez=!1;!(rez=hasScrollbars($el.get(0)))&&($el=$el.parent()).length&&!$el.hasClass("fancybox-stage")&&!$el.is("body"););return rez},Guestures=function(instance){var self=this;this.instance=instance,this.$bg=instance.$refs.bg,this.$stage=instance.$refs.stage,this.$container=instance.$refs.container,this.destroy(),this.$container.on("touchstart.fb.touch mousedown.fb.touch",$.proxy(this,"ontouchstart"))};Guestures.prototype.destroy=function(){var self=this;this.$container.off(".fb.touch"),$(document).off(".fb.touch"),this.requestId&&(cancelAFrame(this.requestId),this.requestId=null),this.tapped&&(clearTimeout(this.tapped),this.tapped=null)},Guestures.prototype.ontouchstart=function(e){var self=this,$target=$(e.target),instance=this.instance,current=instance.current,$slide=current.$slide,$content=current.$content,isTouchDevice="touchstart"==e.type;if(isTouchDevice&&this.$container.off("mousedown.fb.touch"),(!e.originalEvent||2!=e.originalEvent.button)&&$slide.length&&$target.length&&!isClickable($target)&&!isClickable($target.parent())&&($target.is("img")||!(e.originalEvent.clientX>$target[0].clientWidth+$target.offset().left))){if(!current||instance.isAnimating||current.$slide.hasClass("fancybox-animated"))return e.stopPropagation(),void e.preventDefault();this.realPoints=this.startPoints=getPointerXY(e),this.startPoints.length&&(current.touch&&e.stopPropagation(),this.startEvent=e,this.canTap=!0,this.$target=$target,this.$content=$content,this.opts=current.opts.touch,this.isPanning=!1,this.isSwiping=!1,this.isZooming=!1,this.isScrolling=!1,this.canPan=instance.canPan(),this.startTime=(new Date).getTime(),this.distanceX=this.distanceY=this.distance=0,this.canvasWidth=Math.round($slide[0].clientWidth),this.canvasHeight=Math.round($slide[0].clientHeight),this.contentLastPos=null,this.contentStartPos=$.fancybox.getTranslate(this.$content)||{top:0,left:0},this.sliderStartPos=$.fancybox.getTranslate($slide),this.stagePos=$.fancybox.getTranslate(instance.$refs.stage),this.sliderStartPos.top-=this.stagePos.top,this.sliderStartPos.left-=this.stagePos.left,this.contentStartPos.top-=this.stagePos.top,this.contentStartPos.left-=this.stagePos.left,$(document).off(".fb.touch").on(isTouchDevice?"touchend.fb.touch touchcancel.fb.touch":"mouseup.fb.touch mouseleave.fb.touch",$.proxy(this,"ontouchend")).on(isTouchDevice?"touchmove.fb.touch":"mousemove.fb.touch",$.proxy(this,"ontouchmove")),$.fancybox.isMobile&&document.addEventListener("scroll",this.onscroll,!0),((this.opts||this.canPan)&&($target.is(this.$stage)||this.$stage.find($target).length)||($target.is(".fancybox-image")&&e.preventDefault(),$.fancybox.isMobile&&$target.parents(".fancybox-caption").length))&&(this.isScrollable=isScrollable($target)||isScrollable($target.parent()),$.fancybox.isMobile&&this.isScrollable||e.preventDefault(),(1===this.startPoints.length||current.hasError)&&(this.canPan?($.fancybox.stop(this.$content),this.isPanning=!0):this.isSwiping=!0,this.$container.addClass("fancybox-is-grabbing")),2===this.startPoints.length&&"image"===current.type&&(current.isLoaded||current.$ghost)&&(this.canTap=!1,this.isSwiping=!1,this.isPanning=!1,this.isZooming=!0,$.fancybox.stop(this.$content),this.centerPointStartX=.5*(this.startPoints[0].x+this.startPoints[1].x)-$(window).scrollLeft(),this.centerPointStartY=.5*(this.startPoints[0].y+this.startPoints[1].y)-$(window).scrollTop(),this.percentageOfImageAtPinchPointX=(this.centerPointStartX-this.contentStartPos.left)/this.contentStartPos.width,this.percentageOfImageAtPinchPointY=(this.centerPointStartY-this.contentStartPos.top)/this.contentStartPos.height,this.startDistanceBetweenFingers=distance(this.startPoints[0],this.startPoints[1]))))}},Guestures.prototype.onscroll=function(e){var self=this;this.isScrolling=!0,document.removeEventListener("scroll",this.onscroll,!0)},Guestures.prototype.ontouchmove=function(e){var self=this;void 0===e.originalEvent.buttons||0!==e.originalEvent.buttons?this.isScrolling?this.canTap=!1:(this.newPoints=getPointerXY(e),(this.opts||this.canPan)&&this.newPoints.length&&this.newPoints.length&&(this.isSwiping&&!0===this.isSwiping||e.preventDefault(),this.distanceX=distance(this.newPoints[0],this.startPoints[0],"x"),this.distanceY=distance(this.newPoints[0],this.startPoints[0],"y"),this.distance=distance(this.newPoints[0],this.startPoints[0]),this.distance>0&&(this.isSwiping?this.onSwipe(e):this.isPanning?this.onPan():this.isZooming&&this.onZoom()))):this.ontouchend(e)},Guestures.prototype.onSwipe=function(e){var self=this,instance=self.instance,swiping=self.isSwiping,left=self.sliderStartPos.left||0,angle;if(!0!==swiping)"x"==swiping&&(self.distanceX>0&&(self.instance.group.length<2||0===self.instance.current.index&&!self.instance.current.opts.loop)?left+=Math.pow(self.distanceX,.8):self.distanceX<0&&(self.instance.group.length<2||self.instance.current.index===self.instance.group.length-1&&!self.instance.current.opts.loop)?left-=Math.pow(-self.distanceX,.8):left+=self.distanceX),self.sliderLastPos={top:"x"==swiping?0:self.sliderStartPos.top+self.distanceY,left:left},self.requestId&&(cancelAFrame(self.requestId),self.requestId=null),self.requestId=requestAFrame((function(){self.sliderLastPos&&($.each(self.instance.slides,(function(index,slide){var pos=slide.pos-self.instance.currPos;$.fancybox.setTranslate(slide.$slide,{top:self.sliderLastPos.top,left:self.sliderLastPos.left+pos*self.canvasWidth+pos*slide.opts.gutter})})),self.$container.addClass("fancybox-is-sliding"))}));else if(Math.abs(self.distance)>10){if(self.canTap=!1,instance.group.length<2&&self.opts.vertical?self.isSwiping="y":instance.isDragging||!1===self.opts.vertical||"auto"===self.opts.vertical&&$(window).width()>800?self.isSwiping="x":(angle=Math.abs(180*Math.atan2(self.distanceY,self.distanceX)/Math.PI),self.isSwiping=angle>45&&angle<135?"y":"x"),"y"===self.isSwiping&&$.fancybox.isMobile&&self.isScrollable)return void(self.isScrolling=!0);instance.isDragging=self.isSwiping,self.startPoints=self.newPoints,$.each(instance.slides,(function(index,slide){var slidePos,stagePos;$.fancybox.stop(slide.$slide),slidePos=$.fancybox.getTranslate(slide.$slide),stagePos=$.fancybox.getTranslate(instance.$refs.stage),slide.$slide.css({transform:"",opacity:"","transition-duration":""}).removeClass("fancybox-animated").removeClass((function(index,className){return(className.match(/(^|\s)fancybox-fx-\S+/g)||[]).join(" ")})),slide.pos===instance.current.pos&&(self.sliderStartPos.top=slidePos.top-stagePos.top,self.sliderStartPos.left=slidePos.left-stagePos.left),$.fancybox.setTranslate(slide.$slide,{top:slidePos.top-stagePos.top,left:slidePos.left-stagePos.left})})),instance.SlideShow&&instance.SlideShow.isActive&&instance.SlideShow.stop()}},Guestures.prototype.onPan=function(){var self=this;distance(self.newPoints[0],self.realPoints[0])<($.fancybox.isMobile?10:5)?self.startPoints=self.newPoints:(self.canTap=!1,self.contentLastPos=self.limitMovement(),self.requestId&&cancelAFrame(self.requestId),self.requestId=requestAFrame((function(){$.fancybox.setTranslate(self.$content,self.contentLastPos)})))},Guestures.prototype.limitMovement=function(){var self=this,canvasWidth=this.canvasWidth,canvasHeight=this.canvasHeight,distanceX=this.distanceX,distanceY=this.distanceY,contentStartPos=this.contentStartPos,currentOffsetX=contentStartPos.left,currentOffsetY=contentStartPos.top,currentWidth=contentStartPos.width,currentHeight=contentStartPos.height,minTranslateX,minTranslateY,maxTranslateX,maxTranslateY,newOffsetX,newOffsetY;return newOffsetX=currentWidth>canvasWidth?currentOffsetX+distanceX:currentOffsetX,newOffsetY=currentOffsetY+distanceY,minTranslateX=Math.max(0,.5*canvasWidth-.5*currentWidth),minTranslateY=Math.max(0,.5*canvasHeight-.5*currentHeight),maxTranslateX=Math.min(canvasWidth-currentWidth,.5*canvasWidth-.5*currentWidth),maxTranslateY=Math.min(canvasHeight-currentHeight,.5*canvasHeight-.5*currentHeight),distanceX>0&&newOffsetX>minTranslateX&&(newOffsetX=minTranslateX-1+Math.pow(-minTranslateX+currentOffsetX+distanceX,.8)||0),distanceX<0&&newOffsetX<maxTranslateX&&(newOffsetX=maxTranslateX+1-Math.pow(maxTranslateX-currentOffsetX-distanceX,.8)||0),distanceY>0&&newOffsetY>minTranslateY&&(newOffsetY=minTranslateY-1+Math.pow(-minTranslateY+currentOffsetY+distanceY,.8)||0),distanceY<0&&newOffsetY<maxTranslateY&&(newOffsetY=maxTranslateY+1-Math.pow(maxTranslateY-currentOffsetY-distanceY,.8)||0),{top:newOffsetY,left:newOffsetX}},Guestures.prototype.limitPosition=function(newOffsetX,newOffsetY,newWidth,newHeight){var self=this,canvasWidth=this.canvasWidth,canvasHeight=this.canvasHeight;return newOffsetX=newWidth>canvasWidth?(newOffsetX=newOffsetX>0?0:newOffsetX)<canvasWidth-newWidth?canvasWidth-newWidth:newOffsetX:Math.max(0,canvasWidth/2-newWidth/2),{top:newOffsetY=newHeight>canvasHeight?(newOffsetY=newOffsetY>0?0:newOffsetY)<canvasHeight-newHeight?canvasHeight-newHeight:newOffsetY:Math.max(0,canvasHeight/2-newHeight/2),left:newOffsetX}},Guestures.prototype.onZoom=function(){var self=this,contentStartPos=self.contentStartPos,currentWidth=contentStartPos.width,currentHeight=contentStartPos.height,currentOffsetX=contentStartPos.left,currentOffsetY=contentStartPos.top,endDistanceBetweenFingers,pinchRatio=distance(self.newPoints[0],self.newPoints[1])/self.startDistanceBetweenFingers,newWidth=Math.floor(currentWidth*pinchRatio),newHeight=Math.floor(currentHeight*pinchRatio),translateFromZoomingX=(currentWidth-newWidth)*self.percentageOfImageAtPinchPointX,translateFromZoomingY=(currentHeight-newHeight)*self.percentageOfImageAtPinchPointY,centerPointEndX=(self.newPoints[0].x+self.newPoints[1].x)/2-$(window).scrollLeft(),centerPointEndY=(self.newPoints[0].y+self.newPoints[1].y)/2-$(window).scrollTop(),translateFromTranslatingX=centerPointEndX-self.centerPointStartX,translateFromTranslatingY,newOffsetX,newOffsetY,newPos={top:currentOffsetY+(translateFromZoomingY+(centerPointEndY-self.centerPointStartY)),left:currentOffsetX+(translateFromZoomingX+translateFromTranslatingX),scaleX:pinchRatio,scaleY:pinchRatio};self.canTap=!1,self.newWidth=newWidth,self.newHeight=newHeight,self.contentLastPos=newPos,self.requestId&&cancelAFrame(self.requestId),self.requestId=requestAFrame((function(){$.fancybox.setTranslate(self.$content,self.contentLastPos)}))},Guestures.prototype.ontouchend=function(e){var self=this,swiping=this.isSwiping,panning=this.isPanning,zooming=this.isZooming,scrolling=this.isScrolling;if(this.endPoints=getPointerXY(e),this.dMs=Math.max((new Date).getTime()-this.startTime,1),this.$container.removeClass("fancybox-is-grabbing"),$(document).off(".fb.touch"),document.removeEventListener("scroll",this.onscroll,!0),this.requestId&&(cancelAFrame(this.requestId),this.requestId=null),this.isSwiping=!1,this.isPanning=!1,this.isZooming=!1,this.isScrolling=!1,this.instance.isDragging=!1,this.canTap)return this.onTap(e);this.speed=100,this.velocityX=this.distanceX/this.dMs*.5,this.velocityY=this.distanceY/this.dMs*.5,panning?this.endPanning():zooming?this.endZooming():this.endSwiping(swiping,scrolling)},Guestures.prototype.endSwiping=function(swiping,scrolling){var self=this,ret=!1,len=this.instance.group.length,distanceX=Math.abs(this.distanceX),canAdvance="x"==swiping&&len>1&&(this.dMs>130&&distanceX>10||distanceX>50),speedX=300;this.sliderLastPos=null,"y"==swiping&&!scrolling&&Math.abs(this.distanceY)>50?($.fancybox.animate(this.instance.current.$slide,{top:this.sliderStartPos.top+this.distanceY+150*this.velocityY,opacity:0},200),ret=this.instance.close(!0,250)):canAdvance&&this.distanceX>0?ret=this.instance.previous(300):canAdvance&&this.distanceX<0&&(ret=this.instance.next(300)),!1!==ret||"x"!=swiping&&"y"!=swiping||this.instance.centerSlide(200),this.$container.removeClass("fancybox-is-sliding")},Guestures.prototype.endPanning=function(){var self=this,newOffsetX,newOffsetY,newPos;this.contentLastPos&&(!1===this.opts.momentum||this.dMs>350?(newOffsetX=this.contentLastPos.left,newOffsetY=this.contentLastPos.top):(newOffsetX=this.contentLastPos.left+500*this.velocityX,newOffsetY=this.contentLastPos.top+500*this.velocityY),(newPos=this.limitPosition(newOffsetX,newOffsetY,this.contentStartPos.width,this.contentStartPos.height)).width=this.contentStartPos.width,newPos.height=this.contentStartPos.height,$.fancybox.animate(this.$content,newPos,366))},Guestures.prototype.endZooming=function(){var self=this,current=this.instance.current,newOffsetX,newOffsetY,newPos,reset,newWidth=this.newWidth,newHeight=this.newHeight;this.contentLastPos&&(newOffsetX=this.contentLastPos.left,reset={top:newOffsetY=this.contentLastPos.top,left:newOffsetX,width:newWidth,height:newHeight,scaleX:1,scaleY:1},$.fancybox.setTranslate(this.$content,reset),newWidth<this.canvasWidth&&newHeight<this.canvasHeight?this.instance.scaleToFit(150):newWidth>current.width||newHeight>current.height?this.instance.scaleToActual(this.centerPointStartX,this.centerPointStartY,150):(newPos=this.limitPosition(newOffsetX,newOffsetY,newWidth,newHeight),$.fancybox.animate(this.$content,newPos,150)))},Guestures.prototype.onTap=function(e){var self=this,$target=$(e.target),instance=self.instance,current=instance.current,endPoints=e&&getPointerXY(e)||self.startPoints,tapX=endPoints[0]?endPoints[0].x-$(window).scrollLeft()-self.stagePos.left:0,tapY=endPoints[0]?endPoints[0].y-$(window).scrollTop()-self.stagePos.top:0,where,process=function(prefix){var action=current.opts[prefix];if($.isFunction(action)&&(action=action.apply(instance,[current,e])),action)switch(action){case"close":instance.close(self.startEvent);break;case"toggleControls":instance.toggleControls();break;case"next":instance.next();break;case"nextOrClose":instance.group.length>1?instance.next():instance.close(self.startEvent);break;case"zoom":"image"==current.type&&(current.isLoaded||current.$ghost)&&(instance.canPan()?instance.scaleToFit():instance.isScaledDown()?instance.scaleToActual(tapX,tapY):instance.group.length<2&&instance.close(self.startEvent))}};if((!e.originalEvent||2!=e.originalEvent.button)&&($target.is("img")||!(tapX>$target[0].clientWidth+$target.offset().left))){if($target.is(".fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-container"))where="Outside";else if($target.is(".fancybox-slide"))where="Slide";else{if(!instance.current.$content||!instance.current.$content.find($target).addBack().filter($target).length)return;where="Content"}if(self.tapped){if(clearTimeout(self.tapped),self.tapped=null,Math.abs(tapX-self.tapX)>50||Math.abs(tapY-self.tapY)>50)return this;process("dblclick"+where)}else self.tapX=tapX,self.tapY=tapY,current.opts["dblclick"+where]&&current.opts["dblclick"+where]!==current.opts["click"+where]?self.tapped=setTimeout((function(){self.tapped=null,instance.isAnimating||process("click"+where)}),500):process("click"+where);return this}},$(document).on("onActivate.fb",(function(e,instance){instance&&!instance.Guestures&&(instance.Guestures=new Guestures(instance))})).on("beforeClose.fb",(function(e,instance){instance&&instance.Guestures&&instance.Guestures.destroy()}))}(window,document,jQuery),function(document,$){"use strict";$.extend(!0,$.fancybox.defaults,{btnTpl:{slideShow:'<button data-fancybox-play class="fancybox-button fancybox-button--play" title="{{PLAY_START}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.5 5.4v13.2l11-6.6z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.33 5.75h2.2v12.5h-2.2V5.75zm5.15 0h2.2v12.5h-2.2V5.75z"/></svg></button>'},slideShow:{autoStart:!1,speed:3e3,progress:!0}});var SlideShow=function(instance){this.instance=instance,this.init()};$.extend(SlideShow.prototype,{timer:null,isActive:!1,$button:null,init:function(){var self=this,instance=self.instance,opts=instance.group[instance.currIndex].opts.slideShow;self.$button=instance.$refs.toolbar.find("[data-fancybox-play]").on("click",(function(){self.toggle()})),instance.group.length<2||!opts?self.$button.hide():opts.progress&&(self.$progress=$('<div class="fancybox-progress"></div>').appendTo(instance.$refs.inner))},set:function(force){var self=this,instance=this.instance,current=instance.current;current&&(!0===force||current.opts.loop||instance.currIndex<instance.group.length-1)?this.isActive&&"video"!==current.contentType&&(this.$progress&&$.fancybox.animate(this.$progress.show(),{scaleX:1},current.opts.slideShow.speed),this.timer=setTimeout((function(){instance.current.opts.loop||instance.current.index!=instance.group.length-1?instance.next():instance.jumpTo(0)}),current.opts.slideShow.speed)):(this.stop(),instance.idleSecondsCounter=0,instance.showControls())},clear:function(){var self=this;clearTimeout(this.timer),this.timer=null,this.$progress&&this.$progress.removeAttr("style").hide()},start:function(){var self=this,current=this.instance.current;current&&(this.$button.attr("title",(current.opts.i18n[current.opts.lang]||current.opts.i18n.en).PLAY_STOP).removeClass("fancybox-button--play").addClass("fancybox-button--pause"),this.isActive=!0,current.isComplete&&this.set(!0),this.instance.trigger("onSlideShowChange",!0))},stop:function(){var self=this,current=this.instance.current;this.clear(),this.$button.attr("title",(current.opts.i18n[current.opts.lang]||current.opts.i18n.en).PLAY_START).removeClass("fancybox-button--pause").addClass("fancybox-button--play"),this.isActive=!1,this.instance.trigger("onSlideShowChange",!1),this.$progress&&this.$progress.removeAttr("style").hide()},toggle:function(){var self=this;this.isActive?this.stop():this.start()}}),$(document).on({"onInit.fb":function(e,instance){instance&&!instance.SlideShow&&(instance.SlideShow=new SlideShow(instance))},"beforeShow.fb":function(e,instance,current,firstRun){var SlideShow=instance&&instance.SlideShow;firstRun?SlideShow&&current.opts.slideShow.autoStart&&SlideShow.start():SlideShow&&SlideShow.isActive&&SlideShow.clear()},"afterShow.fb":function(e,instance,current){var SlideShow=instance&&instance.SlideShow;SlideShow&&SlideShow.isActive&&SlideShow.set()},"afterKeydown.fb":function(e,instance,current,keypress,keycode){var SlideShow=instance&&instance.SlideShow;!SlideShow||!current.opts.slideShow||80!==keycode&&32!==keycode||$(document.activeElement).is("button,a,input")||(keypress.preventDefault(),SlideShow.toggle())},"beforeClose.fb onDeactivate.fb":function(e,instance){var SlideShow=instance&&instance.SlideShow;SlideShow&&SlideShow.stop()}}),$(document).on("visibilitychange",(function(){var instance=$.fancybox.getInstance(),SlideShow=instance&&instance.SlideShow;SlideShow&&SlideShow.isActive&&(document.hidden?SlideShow.clear():SlideShow.set())}))}(document,jQuery),function(document,$){"use strict";var fn=function(){for(var fnMap=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],ret={},i=0;i<fnMap.length;i++){var val=fnMap[i];if(val&&val[1]in document){for(var j=0;j<val.length;j++)ret[fnMap[0][j]]=val[j];return ret}}return!1}();if(fn){var FullScreen={request:function(elem){(elem=elem||document.documentElement)[fn.requestFullscreen](elem.ALLOW_KEYBOARD_INPUT)},exit:function(){document[fn.exitFullscreen]()},toggle:function(elem){elem=elem||document.documentElement,this.isFullscreen()?this.exit():this.request(elem)},isFullscreen:function(){return Boolean(document[fn.fullscreenElement])},enabled:function(){return Boolean(document[fn.fullscreenEnabled])}};$.extend(!0,$.fancybox.defaults,{btnTpl:{fullScreen:'<button data-fancybox-fullscreen class="fancybox-button fancybox-button--fsenter" title="{{FULL_SCREEN}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"/></svg></button>'},fullScreen:{autoStart:!1}}),$(document).on(fn.fullscreenchange,(function(){var isFullscreen=FullScreen.isFullscreen(),instance=$.fancybox.getInstance();instance&&(instance.current&&"image"===instance.current.type&&instance.isAnimating&&(instance.isAnimating=!1,instance.update(!0,!0,0),instance.isComplete||instance.complete()),instance.trigger("onFullscreenChange",isFullscreen),instance.$refs.container.toggleClass("fancybox-is-fullscreen",isFullscreen),instance.$refs.toolbar.find("[data-fancybox-fullscreen]").toggleClass("fancybox-button--fsenter",!isFullscreen).toggleClass("fancybox-button--fsexit",isFullscreen))}))}$(document).on({"onInit.fb":function(e,instance){var $container;fn?instance&&instance.group[instance.currIndex].opts.fullScreen?(($container=instance.$refs.container).on("click.fb-fullscreen","[data-fancybox-fullscreen]",(function(e){e.stopPropagation(),e.preventDefault(),FullScreen.toggle()})),instance.opts.fullScreen&&!0===instance.opts.fullScreen.autoStart&&FullScreen.request(),instance.FullScreen=FullScreen):instance&&instance.$refs.toolbar.find("[data-fancybox-fullscreen]").hide():instance.$refs.toolbar.find("[data-fancybox-fullscreen]").remove()},"afterKeydown.fb":function(e,instance,current,keypress,keycode){instance&&instance.FullScreen&&70===keycode&&(keypress.preventDefault(),instance.FullScreen.toggle())},"beforeClose.fb":function(e,instance){instance&&instance.FullScreen&&instance.$refs.container.hasClass("fancybox-is-fullscreen")&&FullScreen.exit()}})}(document,jQuery),function(document,$){"use strict";var CLASS="fancybox-thumbs",CLASS_ACTIVE=CLASS+"-active";$.fancybox.defaults=$.extend(!0,{btnTpl:{thumbs:'<button data-fancybox-thumbs class="fancybox-button fancybox-button--thumbs" title="{{THUMBS}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14.59 14.59h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76H5.65V5.65z"/></svg></button>'},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"}},$.fancybox.defaults);var FancyThumbs=function(instance){this.init(instance)};$.extend(FancyThumbs.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,isActive:!1,init:function(instance){var self=this,group=instance.group,enabled=0;self.instance=instance,self.opts=group[instance.currIndex].opts.thumbs,instance.Thumbs=self,self.$button=instance.$refs.toolbar.find("[data-fancybox-thumbs]");for(var i=0,len=group.length;i<len&&(group[i].thumb&&enabled++,!(enabled>1));i++);enabled>1&&self.opts?(self.$button.removeAttr("style").on("click",(function(){self.toggle()})),self.isActive=!0):self.$button.hide()},create:function(){var self=this,instance=this.instance,parentEl=this.opts.parentEl,list=[],src;this.$grid||(this.$grid=$('<div class="'+CLASS+" "+CLASS+"-"+this.opts.axis+'"></div>').appendTo(instance.$refs.container.find(parentEl).addBack().filter(parentEl)),this.$grid.on("click","a",(function(){instance.jumpTo($(this).attr("data-index"))}))),this.$list||(this.$list=$('<div class="'+CLASS+'__list">').appendTo(this.$grid)),$.each(instance.group,(function(i,item){(src=item.thumb)||"image"!==item.type||(src=item.src),list.push('<a href="javascript:;" tabindex="0" data-index="'+i+'"'+(src&&src.length?' style="background-image:url('+src+')"':'class="fancybox-thumbs-missing"')+"></a>")})),this.$list[0].innerHTML=list.join(""),"x"===this.opts.axis&&this.$list.width(parseInt(this.$grid.css("padding-right"),10)+instance.group.length*this.$list.children().eq(0).outerWidth(!0))},focus:function(duration){var self=this,$list=this.$list,$grid=this.$grid,thumb,thumbPos;this.instance.current&&(thumbPos=(thumb=$list.children().removeClass(CLASS_ACTIVE).filter('[data-index="'+this.instance.current.index+'"]').addClass(CLASS_ACTIVE)).position(),"y"===this.opts.axis&&(thumbPos.top<0||thumbPos.top>$list.height()-thumb.outerHeight())?$list.stop().animate({scrollTop:$list.scrollTop()+thumbPos.top},duration):"x"===this.opts.axis&&(thumbPos.left<$grid.scrollLeft()||thumbPos.left>$grid.scrollLeft()+($grid.width()-thumb.outerWidth()))&&$list.parent().stop().animate({scrollLeft:thumbPos.left},duration))},update:function(){var that=this;this.instance.$refs.container.toggleClass("fancybox-show-thumbs",this.isVisible),this.isVisible?(this.$grid||this.create(),this.instance.trigger("onThumbsShow"),this.focus(0)):this.$grid&&this.instance.trigger("onThumbsHide"),this.instance.update()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible=!this.isVisible,this.update()}}),$(document).on({"onInit.fb":function(e,instance){var Thumbs;instance&&!instance.Thumbs&&(Thumbs=new FancyThumbs(instance)).isActive&&!0===Thumbs.opts.autoStart&&Thumbs.show()},"beforeShow.fb":function(e,instance,item,firstRun){var Thumbs=instance&&instance.Thumbs;Thumbs&&Thumbs.isVisible&&Thumbs.focus(firstRun?0:250)},"afterKeydown.fb":function(e,instance,current,keypress,keycode){var Thumbs=instance&&instance.Thumbs;Thumbs&&Thumbs.isActive&&71===keycode&&(keypress.preventDefault(),Thumbs.toggle())},"beforeClose.fb":function(e,instance){var Thumbs=instance&&instance.Thumbs;Thumbs&&Thumbs.isVisible&&!1!==Thumbs.opts.hideOnClose&&Thumbs.$grid.hide()}})}(document,jQuery),function(document,$){"use strict";function escapeHtml(string){var entityMap={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};return String(string).replace(/[&<>"'`=\/]/g,(function(s){return entityMap[s]}))}$.extend(!0,$.fancybox.defaults,{btnTpl:{share:'<button data-fancybox-share class="fancybox-button fancybox-button--share" title="{{SHARE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.55 19c1.4-8.4 9.1-9.8 11.9-9.8V5l7 7-7 6.3v-3.5c-2.8 0-10.5 2.1-11.9 4.2z"/></svg></button>'},share:{url:function(instance,item){return!instance.currentHash&&"inline"!==item.type&&"html"!==item.type&&(item.origSrc||item.src)||window.location},tpl:'<div class="fancybox-share"><h1>{{SHARE}}</h1><p><a class="fancybox-share__button fancybox-share__button--fb" href="https://www.facebook.com/sharer/sharer.php?u={{url}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m287 456v-299c0-21 6-35 35-35h38v-63c-7-1-29-3-55-3-54 0-91 33-91 94v306m143-254h-205v72h196" /></svg><span>Facebook</span></a><a class="fancybox-share__button fancybox-share__button--tw" href="https://twitter.com/intent/tweet?url={{url}}&text={{descr}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m456 133c-14 7-31 11-47 13 17-10 30-27 37-46-15 10-34 16-52 20-61-62-157-7-141 75-68-3-129-35-169-85-22 37-11 86 26 109-13 0-26-4-37-9 0 39 28 72 65 80-12 3-25 4-37 2 10 33 41 57 77 57-42 30-77 38-122 34 170 111 378-32 359-208 16-11 30-25 41-42z" /></svg><span>Twitter</span></a><a class="fancybox-share__button fancybox-share__button--pt" href="https://www.pinterest.com/pin/create/button/?url={{url}}&description={{descr}}&media={{media}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m265 56c-109 0-164 78-164 144 0 39 15 74 47 87 5 2 10 0 12-5l4-19c2-6 1-8-3-13-9-11-15-25-15-45 0-58 43-110 113-110 62 0 96 38 96 88 0 67-30 122-73 122-24 0-42-19-36-44 6-29 20-60 20-81 0-19-10-35-31-35-25 0-44 26-44 60 0 21 7 36 7 36l-30 125c-8 37-1 83 0 87 0 3 4 4 5 2 2-3 32-39 42-75l16-64c8 16 31 29 56 29 74 0 124-67 124-157 0-69-58-132-146-132z" fill="#fff"/></svg><span>Pinterest</span></a></p><p><input class="fancybox-share__input" type="text" value="{{url_raw}}" onclick="select()" /></p></div>'}}),$(document).on("click","[data-fancybox-share]",(function(){var instance=$.fancybox.getInstance(),current=instance.current||null,url,tpl;current&&("function"===$.type(current.opts.share.url)&&(url=current.opts.share.url.apply(current,[instance,current])),tpl=current.opts.share.tpl.replace(/\{\{media\}\}/g,"image"===current.type?encodeURIComponent(current.src):"").replace(/\{\{url\}\}/g,encodeURIComponent(url)).replace(/\{\{url_raw\}\}/g,escapeHtml(url)).replace(/\{\{descr\}\}/g,instance.$caption?encodeURIComponent(instance.$caption.text()):""),$.fancybox.open({src:instance.translate(instance,tpl),type:"html",opts:{touch:!1,animationEffect:!1,afterLoad:function(shareInstance,shareCurrent){instance.$refs.container.one("beforeClose.fb",(function(){shareInstance.close(null,0)})),shareCurrent.$content.find(".fancybox-share__button").click((function(){return window.open(this.href,"Share","width=550, height=450"),!1}))},mobile:{autoFocus:!1}}}))}))}(document,jQuery),function(window,document,$){"use strict";function parseUrl(){var hash=window.location.hash.substr(1),rez=hash.split("-"),index=rez.length>1&&/^\+?\d+$/.test(rez[rez.length-1])&&parseInt(rez.pop(-1),10)||1,gallery;return{hash:hash,index:index<1?1:index,gallery:rez.join("-")}}function triggerFromUrl(url){""!==url.gallery&&$("[data-fancybox='"+$.escapeSelector(url.gallery)+"']").eq(url.index-1).focus().trigger("click.fb-start")}function getGalleryID(instance){var opts,ret;return!!instance&&(""!==(ret=(opts=instance.current?instance.current.opts:instance.opts).hash||(opts.$orig?opts.$orig.data("fancybox")||opts.$orig.data("fancybox-trigger"):""))&&ret)}$.escapeSelector||($.escapeSelector=function(sel){var rcssescape,fcssescape;return(sel+"").replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,(function(ch,asCodePoint){return asCodePoint?"\0"===ch?"�":ch.slice(0,-1)+"\\"+ch.charCodeAt(ch.length-1).toString(16)+" ":"\\"+ch}))}),$((function(){!1!==$.fancybox.defaults.hash&&($(document).on({"onInit.fb":function(e,instance){var url,gallery;!1!==instance.group[instance.currIndex].opts.hash&&(url=parseUrl(),(gallery=getGalleryID(instance))&&url.gallery&&gallery==url.gallery&&(instance.currIndex=url.index-1))},"beforeShow.fb":function(e,instance,current,firstRun){var gallery;current&&!1!==current.opts.hash&&(gallery=getGalleryID(instance))&&(instance.currentHash=gallery+(instance.group.length>1?"-"+(current.index+1):""),window.location.hash!=="#"+instance.currentHash&&(firstRun&&!instance.origHash&&(instance.origHash=window.location.hash),instance.hashTimer&&clearTimeout(instance.hashTimer),instance.hashTimer=setTimeout((function(){"replaceState"in window.history?(window.history[firstRun?"pushState":"replaceState"]({},document.title,window.location.pathname+window.location.search+"#"+instance.currentHash),firstRun&&(instance.hasCreatedHistory=!0)):window.location.hash=instance.currentHash,instance.hashTimer=null}),300)))},"beforeClose.fb":function(e,instance,current){current&&!1!==current.opts.hash&&(clearTimeout(instance.hashTimer),instance.currentHash&&instance.hasCreatedHistory?window.history.back():instance.currentHash&&("replaceState"in window.history?window.history.replaceState({},document.title,window.location.pathname+window.location.search+(instance.origHash||"")):window.location.hash=instance.origHash),instance.currentHash=null)}}),$(window).on("hashchange.fb",(function(){var url=parseUrl(),fb=null;$.each($(".fancybox-container").get().reverse(),(function(index,value){var tmp=$(value).data("FancyBox");if(tmp&&tmp.currentHash)return fb=tmp,!1})),fb?fb.currentHash===url.gallery+"-"+url.index||1===url.index&&fb.currentHash==url.gallery||(fb.currentHash=null,fb.close()):""!==url.gallery&&triggerFromUrl(url)})),setTimeout((function(){$.fancybox.getInstance()||triggerFromUrl(parseUrl())}),50))}))}(window,document,jQuery),function(document,$){"use strict";var prevTime=(new Date).getTime();$(document).on({"onInit.fb":function(e,instance,current){instance.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll",(function(e){var current=instance.current,currTime=(new Date).getTime();instance.group.length<2||!1===current.opts.wheel||"auto"===current.opts.wheel&&"image"!==current.type||(e.preventDefault(),e.stopPropagation(),current.$slide.hasClass("fancybox-animated")||(e=e.originalEvent||e,currTime-prevTime<250||(prevTime=currTime,instance[(-e.deltaY||-e.deltaX||e.wheelDelta||-e.detail)<0?"next":"previous"]())))}))}})}(document,jQuery);