| Server IP : 216.250.13.251 / Your IP : 216.73.217.37 Web Server : nginx/1.24.0 System : Linux gunay 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : root ( 0) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/gunay/wp-content/themes/rttheme19/js/ |
Upload File : |
/*! lightgallery - v1.2.16 - 2016-03-29
* http://sachinchoolur.github.io/lightGallery/
* Copyright (c) 2016 Sachin N; Licensed Apache 2.0 */
!function(e,t,o,s){"use strict";function i(t,s){if(this.el=t,this.$el=e(t),this.s=e.extend({},l,s),this.s.dynamic&&"undefined"!==this.s.dynamicEl&&this.s.dynamicEl.constructor===Array&&!this.s.dynamicEl.length)throw"When using dynamic mode, you must also define dynamicEl as an Array.";return this.modules={},this.lGalleryOn=!1,this.lgBusy=!1,this.hideBartimeout=!1,this.isTouch="ontouchstart"in o.documentElement,this.s.slideEndAnimatoin&&(this.s.hideControlOnEnd=!1),this.s.dynamic?this.$items=this.s.dynamicEl:"this"===this.s.selector?this.$items=this.$el:""!==this.s.selector?this.s.selectWithin?this.$items=e(this.s.selectWithin).find(this.s.selector):this.$items=this.$el.find(e(this.s.selector)):this.$items=this.$el.children(),this.$slide="",this.$outer="",this.init(),this}var l={mode:"lg-slide",cssEasing:"ease",easing:"linear",speed:600,height:"100%",width:"100%",addClass:"",startClass:"lg-start-zoom",backdropDuration:150,hideBarsDelay:6e3,useLeft:!1,closable:!0,loop:!0,escKey:!0,keyPress:!0,controls:!0,slideEndAnimatoin:!0,hideControlOnEnd:!1,mousewheel:!0,appendSubHtmlTo:".lg-sub-html",preload:1,showAfterLoad:!0,selector:"",selectWithin:"",nextHtml:"",prevHtml:"",index:!1,iframeMaxWidth:"100%",download:!0,counter:!0,appendCounterTo:".lg-toolbar",swipeThreshold:50,enableSwipe:!0,enableDrag:!0,dynamic:!1,dynamicEl:[],galleryId:1};i.prototype.init=function(){var o=this;o.s.preload>o.$items.length&&(o.s.preload=o.$items.length);var s=t.location.hash;s.indexOf("lg="+this.s.galleryId)>0&&(o.index=parseInt(s.split("&slide=")[1],10),e("body").addClass("lg-from-hash"),e("body").hasClass("lg-on")||setTimeout(function(){o.build(o.index),e("body").addClass("lg-on")})),o.s.dynamic?(o.$el.trigger("onBeforeOpen.lg"),o.index=o.s.index||0,e("body").hasClass("lg-on")||setTimeout(function(){o.build(o.index),e("body").addClass("lg-on")})):o.$items.on("click.lgcustom",function(t){try{t.preventDefault(),t.preventDefault()}catch(s){t.returnValue=!1}o.$el.trigger("onBeforeOpen.lg"),o.index=o.s.index||o.$items.index(this),e("body").hasClass("lg-on")||(o.build(o.index),e("body").addClass("lg-on"))})},i.prototype.build=function(t){var o=this;o.structure(),e.each(e.fn.lightGallery.modules,function(t){o.modules[t]=new e.fn.lightGallery.modules[t](o.el)}),o.slide(t,!1,!1),o.s.keyPress&&o.keyPress(),o.$items.length>1&&(o.arrow(),setTimeout(function(){o.enableDrag(),o.enableSwipe()},50),o.s.mousewheel&&o.mousewheel()),o.counter(),o.closeGallery(),o.$el.trigger("onAfterOpen.lg"),o.$outer.on("mousemove.lg click.lg touchstart.lg",function(){o.$outer.removeClass("lg-hide-items"),clearTimeout(o.hideBartimeout),o.hideBartimeout=setTimeout(function(){o.$outer.addClass("lg-hide-items")},o.s.hideBarsDelay)})},i.prototype.structure=function(){var o,s="",i="",l=0,r="",a=this;for(e("body").append('<div class="lg-backdrop"></div>'),e(".lg-backdrop").css("transition-duration",this.s.backdropDuration+"ms"),l=0;l<this.$items.length;l++)s+='<div class="lg-item"></div>';if(this.s.controls&&this.$items.length>1&&(i='<div class="lg-actions"><div class="lg-prev lg-icon">'+this.s.prevHtml+'</div><div class="lg-next lg-icon">'+this.s.nextHtml+"</div></div>"),".lg-sub-html"===this.s.appendSubHtmlTo&&(r='<div class="lg-sub-html"></div>'),o='<div class="lg-outer '+this.s.addClass+" "+this.s.startClass+'"><div class="lg" style="width:'+this.s.width+"; height:"+this.s.height+'"><div class="lg-inner">'+s+'</div><div class="lg-toolbar group"><span class="lg-close lg-icon"></span></div>'+i+r+"</div></div>",e("body").append(o),this.$outer=e(".lg-outer"),this.$slide=this.$outer.find(".lg-item"),this.s.useLeft?(this.$outer.addClass("lg-use-left"),this.s.mode="lg-slide"):this.$outer.addClass("lg-use-css3"),a.setTop(),e(t).on("resize.lg orientationchange.lg",function(){setTimeout(function(){a.setTop()},100)}),this.$slide.eq(this.index).addClass("lg-current"),this.doCss()?this.$outer.addClass("lg-css3"):(this.$outer.addClass("lg-css"),this.s.speed=0),this.$outer.addClass(this.s.mode),this.s.enableDrag&&this.$items.length>1&&this.$outer.addClass("lg-grab"),this.s.showAfterLoad&&this.$outer.addClass("lg-show-after-load"),this.doCss()){var n=this.$outer.find(".lg-inner");n.css("transition-timing-function",this.s.cssEasing),n.css("transition-duration",this.s.speed+"ms")}e(".lg-backdrop").addClass("in"),setTimeout(function(){a.$outer.addClass("lg-visible")},this.s.backdropDuration),this.s.download&&this.$outer.find(".lg-toolbar").append('<a id="lg-download" target="_blank" download class="lg-download lg-icon"></a>'),this.prevScrollTop=e(t).scrollTop()},i.prototype.setTop=function(){if("100%"!==this.s.height){var o=e(t).height(),s=(o-parseInt(this.s.height,10))/2,i=this.$outer.find(".lg");o>=parseInt(this.s.height,10)?i.css("top",s+"px"):i.css("top","0px")}},i.prototype.doCss=function(){var e=function(){var e=["transition","MozTransition","WebkitTransition","OTransition","msTransition","KhtmlTransition"],t=o.documentElement,s=0;for(s=0;s<e.length;s++)if(e[s]in t.style)return!0};return e()?!0:!1},i.prototype.isVideo=function(e,t){var o;if(o=this.s.dynamic?this.s.dynamicEl[t].html:this.$items.eq(t).attr("data-html"),!e&&o)return{html5:!0};var s=e.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i),i=e.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i),l=e.match(/\/\/(?:www\.)?dai.ly\/([0-9a-z\-_]+)/i),r=e.match(/\/\/(?:www\.)?(?:vk\.com|vkontakte\.ru)\/(?:video_ext\.php\?)(.*)/i);return s?{youtube:s}:i?{vimeo:i}:l?{dailymotion:l}:r?{vk:r}:void 0},i.prototype.counter=function(){this.s.counter&&e(this.s.appendCounterTo).append('<div id="lg-counter"><span id="lg-counter-current">'+(parseInt(this.index,10)+1)+'</span> / <span id="lg-counter-all">'+this.$items.length+"</span></div>")},i.prototype.addHtml=function(t){var o,s=null;if(this.s.dynamic?this.s.dynamicEl[t].subHtmlUrl?o=this.s.dynamicEl[t].subHtmlUrl:s=this.s.dynamicEl[t].subHtml:this.$items.eq(t).attr("data-sub-html-url")?o=this.$items.eq(t).attr("data-sub-html-url"):s=this.$items.eq(t).attr("data-sub-html"),!o)if("undefined"!=typeof s&&null!==s){var i=s.substring(0,1);s="."===i||"#"===i?e(s).html():s}else s="";".lg-sub-html"===this.s.appendSubHtmlTo?o?this.$outer.find(this.s.appendSubHtmlTo).load(o):this.$outer.find(this.s.appendSubHtmlTo).html(s):o?this.$slide.eq(t).load(o):this.$slide.eq(t).append(s),"undefined"!=typeof s&&null!==s&&(""===s?this.$outer.find(this.s.appendSubHtmlTo).addClass("lg-empty-html"):this.$outer.find(this.s.appendSubHtmlTo).removeClass("lg-empty-html")),this.$el.trigger("onAfterAppendSubHtml.lg",[t])},i.prototype.preload=function(e){var t=1,o=1;for(t=1;t<=this.s.preload&&!(t>=this.$items.length-e);t++)this.loadContent(e+t,!1,0);for(o=1;o<=this.s.preload&&!(0>e-o);o++)this.loadContent(e-o,!1,0)},i.prototype.loadContent=function(o,s,i){var l,r,a,n,d,c,u=this,h=!1,g=function(o){for(var s=[],i=[],l=0;l<o.length;l++){var a=o[l].split(" ");""===a[0]&&a.splice(0,1),i.push(a[0]),s.push(a[1])}for(var n=e(t).width(),d=0;d<s.length;d++)if(parseInt(s[d],10)>n){r=i[d];break}};if(u.s.dynamic){if(u.s.dynamicEl[o].poster&&(h=!0,a=u.s.dynamicEl[o].poster),c=u.s.dynamicEl[o].html,r=u.s.dynamicEl[o].src,u.s.dynamicEl[o].responsive){var m=u.s.dynamicEl[o].responsive.split(",");g(m)}n=u.s.dynamicEl[o].srcset,d=u.s.dynamicEl[o].sizes}else{if(u.$items.eq(o).attr("data-poster")&&(h=!0,a=u.$items.eq(o).attr("data-poster")),c=u.$items.eq(o).attr("data-html"),r=u.$items.eq(o).attr("href")||u.$items.eq(o).attr("data-src"),u.$items.eq(o).attr("data-responsive")){var p=u.$items.eq(o).attr("data-responsive").split(",");g(p)}n=u.$items.eq(o).attr("data-srcset"),d=u.$items.eq(o).attr("data-sizes")}var f=!1;u.s.dynamic?u.s.dynamicEl[o].iframe&&(f=!0):"true"===u.$items.eq(o).attr("data-iframe")&&(f=!0);var v=u.isVideo(r,o);if(!u.$slide.eq(o).hasClass("lg-loaded")){if(f)u.$slide.eq(o).prepend('<div class="lg-video-cont" style="max-width:'+u.s.iframeMaxWidth+'"><div class="lg-video"><iframe class="lg-object" frameborder="0" src="'+r+'" allowfullscreen="true"></iframe></div></div>');else if(h){var b="";b=v&&v.youtube?"lg-has-youtube":v&&v.vimeo?"lg-has-vimeo":"lg-has-html5",u.$slide.eq(o).prepend('<div class="lg-video-cont '+b+' "><div class="lg-video"><span class="lg-video-play"></span><img class="lg-object lg-has-poster" src="'+a+'" /></div></div>')}else v?(u.$slide.eq(o).prepend('<div class="lg-video-cont "><div class="lg-video"></div></div>'),u.$el.trigger("hasVideo.lg",[o,r,c])):u.$slide.eq(o).prepend('<div class="lg-img-wrap"><img class="lg-object lg-image" src="'+r+'" /></div>');if(u.$el.trigger("onAferAppendSlide.lg",[o]),l=u.$slide.eq(o).find(".lg-object"),d&&l.attr("sizes",d),n){l.attr("srcset",n);try{picturefill({elements:[l[0]]})}catch(y){console.error("Make sure you have included Picturefill version 2")}}".lg-sub-html"!==this.s.appendSubHtmlTo&&u.addHtml(o),u.$slide.eq(o).addClass("lg-loaded")}u.$slide.eq(o).find(".lg-object").on("load.lg error.lg",function(){var t=0;i&&!e("body").hasClass("lg-from-hash")&&(t=i),setTimeout(function(){u.$slide.eq(o).addClass("lg-complete"),u.$el.trigger("onSlideItemLoad.lg",[o,i||0])},t)}),v&&v.html5&&!h&&u.$slide.eq(o).addClass("lg-complete"),s===!0&&(u.$slide.eq(o).hasClass("lg-complete")?u.preload(o):u.$slide.eq(o).find(".lg-object").on("load.lg error.lg",function(){u.preload(o)}))},i.prototype.slide=function(t,o,s){var i=this.$outer.find(".lg-current").index(),l=this;if(!l.lGalleryOn||i!==t){var r=this.$slide.length,a=l.lGalleryOn?this.s.speed:0,n=!1,d=!1;if(!l.lgBusy){if(this.s.download){var c;c=l.s.dynamic?l.s.dynamicEl[t].downloadUrl!==!1&&(l.s.dynamicEl[t].downloadUrl||l.s.dynamicEl[t].src):"false"!==l.$items.eq(t).attr("data-download-url")&&(l.$items.eq(t).attr("data-download-url")||l.$items.eq(t).attr("href")||l.$items.eq(t).attr("data-src")),c?(e("#lg-download").attr("href",c),l.$outer.removeClass("lg-hide-download")):l.$outer.addClass("lg-hide-download")}if(this.$el.trigger("onBeforeSlide.lg",[i,t,o,s]),l.lgBusy=!0,clearTimeout(l.hideBartimeout),".lg-sub-html"===this.s.appendSubHtmlTo&&setTimeout(function(){l.addHtml(t)},a),this.arrowDisable(t),o){var u=t-1,h=t+1;0===t&&i===r-1?(h=0,u=r-1):t===r-1&&0===i&&(h=0,u=r-1),this.$slide.removeClass("lg-prev-slide lg-current lg-next-slide"),l.$slide.eq(u).addClass("lg-prev-slide"),l.$slide.eq(h).addClass("lg-next-slide"),l.$slide.eq(t).addClass("lg-current")}else l.$outer.addClass("lg-no-trans"),this.$slide.removeClass("lg-prev-slide lg-next-slide"),i>t?(d=!0,0!==t||i!==r-1||s||(d=!1,n=!0)):t>i&&(n=!0,t!==r-1||0!==i||s||(d=!0,n=!1)),d?(this.$slide.eq(t).addClass("lg-prev-slide"),this.$slide.eq(i).addClass("lg-next-slide")):n&&(this.$slide.eq(t).addClass("lg-next-slide"),this.$slide.eq(i).addClass("lg-prev-slide")),setTimeout(function(){l.$slide.removeClass("lg-current"),l.$slide.eq(t).addClass("lg-current"),l.$outer.removeClass("lg-no-trans")},50);l.lGalleryOn?(setTimeout(function(){l.loadContent(t,!0,0)},this.s.speed+50),setTimeout(function(){l.lgBusy=!1,l.$el.trigger("onAfterSlide.lg",[i,t,o,s])},this.s.speed)):(l.loadContent(t,!0,l.s.backdropDuration),l.lgBusy=!1,l.$el.trigger("onAfterSlide.lg",[i,t,o,s])),l.lGalleryOn=!0,this.s.counter&&e("#lg-counter-current").text(t+1)}}},i.prototype.goToNextSlide=function(e){var t=this;t.lgBusy||(t.index+1<t.$slide.length?(t.index++,t.$el.trigger("onBeforeNextSlide.lg",[t.index]),t.slide(t.index,e,!1)):t.s.loop?(t.index=0,t.$el.trigger("onBeforeNextSlide.lg",[t.index]),t.slide(t.index,e,!1)):t.s.slideEndAnimatoin&&(t.$outer.addClass("lg-right-end"),setTimeout(function(){t.$outer.removeClass("lg-right-end")},400)))},i.prototype.goToPrevSlide=function(e){var t=this;t.lgBusy||(t.index>0?(t.index--,t.$el.trigger("onBeforePrevSlide.lg",[t.index,e]),t.slide(t.index,e,!1)):t.s.loop?(t.index=t.$items.length-1,t.$el.trigger("onBeforePrevSlide.lg",[t.index,e]),t.slide(t.index,e,!1)):t.s.slideEndAnimatoin&&(t.$outer.addClass("lg-left-end"),setTimeout(function(){t.$outer.removeClass("lg-left-end")},400)))},i.prototype.keyPress=function(){var o=this;this.$items.length>1&&e(t).on("keyup.lg",function(e){o.$items.length>1&&(37===e.keyCode&&(e.preventDefault(),o.goToPrevSlide()),39===e.keyCode&&(e.preventDefault(),o.goToNextSlide()))}),e(t).on("keydown.lg",function(e){o.s.escKey===!0&&27===e.keyCode&&(e.preventDefault(),o.$outer.hasClass("lg-thumb-open")?o.$outer.removeClass("lg-thumb-open"):o.destroy())})},i.prototype.arrow=function(){var e=this;this.$outer.find(".lg-prev").on("click.lg",function(){e.goToPrevSlide()}),this.$outer.find(".lg-next").on("click.lg",function(){e.goToNextSlide()})},i.prototype.arrowDisable=function(e){!this.s.loop&&this.s.hideControlOnEnd&&(e+1<this.$slide.length?this.$outer.find(".lg-next").removeAttr("disabled").removeClass("disabled"):this.$outer.find(".lg-next").attr("disabled","disabled").addClass("disabled"),e>0?this.$outer.find(".lg-prev").removeAttr("disabled").removeClass("disabled"):this.$outer.find(".lg-prev").attr("disabled","disabled").addClass("disabled"))},i.prototype.setTranslate=function(e,t,o){this.s.useLeft?e.css("left",t):e.css({transform:"translate3d("+t+"px, "+o+"px, 0px)"})},i.prototype.touchMove=function(t,o){var s=o-t;Math.abs(s)>15&&(this.$outer.addClass("lg-dragging"),this.setTranslate(this.$slide.eq(this.index),s,0),this.setTranslate(e(".lg-prev-slide"),-this.$slide.eq(this.index).width()+s,0),this.setTranslate(e(".lg-next-slide"),this.$slide.eq(this.index).width()+s,0))},i.prototype.touchEnd=function(e){var t=this;"lg-slide"!==t.s.mode&&t.$outer.addClass("lg-slide"),this.$slide.not(".lg-current, .lg-prev-slide, .lg-next-slide").css("opacity","0"),setTimeout(function(){t.$outer.removeClass("lg-dragging"),0>e&&Math.abs(e)>t.s.swipeThreshold?t.goToNextSlide(!0):e>0&&Math.abs(e)>t.s.swipeThreshold?t.goToPrevSlide(!0):Math.abs(e)<5&&t.$el.trigger("onSlideClick.lg"),t.$slide.removeAttr("style")}),setTimeout(function(){t.$outer.hasClass("lg-dragging")||"lg-slide"===t.s.mode||t.$outer.removeClass("lg-slide")},t.s.speed+100)},i.prototype.enableSwipe=function(){var e=this,t=0,o=0,s=!1;e.s.enableSwipe&&e.isTouch&&e.doCss()&&(e.$slide.on("touchstart.lg",function(o){e.$outer.hasClass("lg-zoomed")||e.lgBusy||(o.preventDefault(),e.manageSwipeClass(),t=o.originalEvent.targetTouches[0].pageX)}),e.$slide.on("touchmove.lg",function(i){e.$outer.hasClass("lg-zoomed")||(i.preventDefault(),o=i.originalEvent.targetTouches[0].pageX,e.touchMove(t,o),s=!0)}),e.$slide.on("touchend.lg",function(){e.$outer.hasClass("lg-zoomed")||(s?(s=!1,e.touchEnd(o-t)):e.$el.trigger("onSlideClick.lg"))}))},i.prototype.enableDrag=function(){var o=this,s=0,i=0,l=!1,r=!1;o.s.enableDrag&&!o.isTouch&&o.doCss()&&(o.$slide.on("mousedown.lg",function(t){o.$outer.hasClass("lg-zoomed")||(e(t.target).hasClass("lg-object")||e(t.target).hasClass("lg-video-play"))&&(t.preventDefault(),o.lgBusy||(o.manageSwipeClass(),s=t.pageX,l=!0,o.$outer.scrollLeft+=1,o.$outer.scrollLeft-=1,o.$outer.removeClass("lg-grab").addClass("lg-grabbing"),o.$el.trigger("onDragstart.lg")))}),e(t).on("mousemove.lg",function(e){l&&(r=!0,i=e.pageX,o.touchMove(s,i),o.$el.trigger("onDragmove.lg"))}),e(t).on("mouseup.lg",function(t){r?(r=!1,o.touchEnd(i-s),o.$el.trigger("onDragend.lg")):(e(t.target).hasClass("lg-object")||e(t.target).hasClass("lg-video-play"))&&o.$el.trigger("onSlideClick.lg"),l&&(l=!1,o.$outer.removeClass("lg-grabbing").addClass("lg-grab"))}))},i.prototype.manageSwipeClass=function(){var e=this.index+1,t=this.index-1,o=this.$slide.length;this.s.loop&&(0===this.index?t=o-1:this.index===o-1&&(e=0)),this.$slide.removeClass("lg-next-slide lg-prev-slide"),t>-1&&this.$slide.eq(t).addClass("lg-prev-slide"),this.$slide.eq(e).addClass("lg-next-slide")},i.prototype.mousewheel=function(){var e=this;e.$outer.on("mousewheel.lg",function(t){t.deltaY&&(t.deltaY>0?e.goToPrevSlide():e.goToNextSlide(),t.preventDefault())})},i.prototype.closeGallery=function(){var t=this,o=!1;this.$outer.find(".lg-close").on("click.lg",function(){t.destroy()}),t.s.closable&&(t.$outer.on("mousedown.lg",function(t){o=e(t.target).is(".lg-outer")||e(t.target).is(".lg-item ")||e(t.target).is(".lg-img-wrap")?!0:!1}),t.$outer.on("mouseup.lg",function(s){(e(s.target).is(".lg-outer")||e(s.target).is(".lg-item ")||e(s.target).is(".lg-img-wrap")&&o)&&(t.$outer.hasClass("lg-dragging")||t.destroy())}))},i.prototype.destroy=function(o){var s=this;o||s.$el.trigger("onBeforeClose.lg"),e(t).scrollTop(s.prevScrollTop),o&&(s.s.dynamic||this.$items.off("click.lg click.lgcustom"),e.removeData(s.el,"lightGallery")),this.$el.off(".lg.tm"),e.each(e.fn.lightGallery.modules,function(e){s.modules[e]&&s.modules[e].destroy()}),this.lGalleryOn=!1,clearTimeout(s.hideBartimeout),this.hideBartimeout=!1,e(t).off(".lg"),e("body").removeClass("lg-on lg-from-hash"),s.$outer&&s.$outer.removeClass("lg-visible"),e(".lg-backdrop").removeClass("in"),setTimeout(function(){s.$outer&&s.$outer.remove(),e(".lg-backdrop").remove(),o||s.$el.trigger("onCloseAfter.lg")},s.s.backdropDuration+50)},e.fn.lightGallery=function(t){return this.each(function(){if(e.data(this,"lightGallery"))try{e(this).data("lightGallery").init()}catch(o){console.error("lightGallery has not initiated properly")}else e.data(this,"lightGallery",new i(this,t))})},e.fn.lightGallery.modules={}}(jQuery,window,document),function(e,t,o,s){"use strict";var i={autoplay:!1,pause:5e3,progressBar:!0,fourceAutoplay:!1,autoplayControls:!0,appendAutoplayControlsTo:".lg-toolbar"},l=function(t){return this.core=e(t).data("lightGallery"),this.$el=e(t),this.core.$items.length<2?!1:(this.core.s=e.extend({},i,this.core.s),this.interval=!1,this.fromAuto=!0,this.canceledOnTouch=!1,this.fourceAutoplayTemp=this.core.s.fourceAutoplay,this.core.doCss()||(this.core.s.progressBar=!1),this.init(),this)};l.prototype.init=function(){var e=this;e.core.s.autoplayControls&&e.controls(),e.core.s.progressBar&&e.core.$outer.find(".lg").append('<div class="lg-progress-bar"><div class="lg-progress"></div></div>'),e.progress(),e.core.s.autoplay&&e.startlAuto(),e.$el.on("onDragstart.lg.tm touchstart.lg.tm",function(){e.interval&&(e.cancelAuto(),e.canceledOnTouch=!0)}),e.$el.on("onDragend.lg.tm touchend.lg.tm onSlideClick.lg.tm",function(){!e.interval&&e.canceledOnTouch&&(e.startlAuto(),e.canceledOnTouch=!1)})},l.prototype.progress=function(){var e,t,o=this;o.$el.on("onBeforeSlide.lg.tm",function(){o.core.s.progressBar&&o.fromAuto&&(e=o.core.$outer.find(".lg-progress-bar"),t=o.core.$outer.find(".lg-progress"),o.interval&&(t.removeAttr("style"),e.removeClass("lg-start"),setTimeout(function(){t.css("transition","width "+(o.core.s.speed+o.core.s.pause)+"ms ease 0s"),e.addClass("lg-start")},20))),o.fromAuto||o.core.s.fourceAutoplay||o.cancelAuto(),o.fromAuto=!1})},l.prototype.controls=function(){var t=this,o='<span class="lg-autoplay-button lg-icon"></span>';e(this.core.s.appendAutoplayControlsTo).append(o),t.core.$outer.find(".lg-autoplay-button").on("click.lg",function(){e(t.core.$outer).hasClass("lg-show-autoplay")?(t.cancelAuto(),t.core.s.fourceAutoplay=!1):t.interval||(t.startlAuto(),t.core.s.fourceAutoplay=t.fourceAutoplayTemp)})},l.prototype.startlAuto=function(){var e=this;e.core.$outer.find(".lg-progress").css("transition","width "+(e.core.s.speed+e.core.s.pause)+"ms ease 0s"),e.core.$outer.addClass("lg-show-autoplay"),e.core.$outer.find(".lg-progress-bar").addClass("lg-start"),e.interval=setInterval(function(){e.core.index+1<e.core.$items.length?e.core.index=e.core.index:e.core.index=-1,e.core.index++,e.fromAuto=!0,e.core.slide(e.core.index,!1,!1)},e.core.s.speed+e.core.s.pause)},l.prototype.cancelAuto=function(){clearInterval(this.interval),this.interval=!1,this.core.$outer.find(".lg-progress").removeAttr("style"),this.core.$outer.removeClass("lg-show-autoplay"),this.core.$outer.find(".lg-progress-bar").removeClass("lg-start")},l.prototype.destroy=function(){this.cancelAuto(),this.core.$outer.find(".lg-progress-bar").remove()},e.fn.lightGallery.modules.autoplay=l}(jQuery,window,document),function(e,t,o,s){"use strict";var i={fullScreen:!0},l=function(t){return this.core=e(t).data("lightGallery"),this.$el=e(t),this.core.s=e.extend({},i,this.core.s),this.init(),this};l.prototype.init=function(){var e="";if(this.core.s.fullScreen){if(!(o.fullscreenEnabled||o.webkitFullscreenEnabled||o.mozFullScreenEnabled||o.msFullscreenEnabled))return;e='<span class="lg-fullscreen lg-icon"></span>',this.core.$outer.find(".lg-toolbar").append(e),this.fullScreen()}},l.prototype.requestFullscreen=function(){var e=o.documentElement;e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen()},l.prototype.exitFullscreen=function(){o.exitFullscreen?o.exitFullscreen():o.msExitFullscreen?o.msExitFullscreen():o.mozCancelFullScreen?o.mozCancelFullScreen():o.webkitExitFullscreen&&o.webkitExitFullscreen()},l.prototype.fullScreen=function(){var t=this;e(o).on("fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg",function(){t.core.$outer.toggleClass("lg-fullscreen-on")}),this.core.$outer.find(".lg-fullscreen").on("click.lg",function(){o.fullscreenElement||o.mozFullScreenElement||o.webkitFullscreenElement||o.msFullscreenElement?t.exitFullscreen():t.requestFullscreen()})},l.prototype.destroy=function(){this.exitFullscreen(),e(o).off("fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg")},e.fn.lightGallery.modules.fullscreen=l}(jQuery,window,document),function(e,t,o,s){"use strict";var i={pager:!1},l=function(t){return this.core=e(t).data("lightGallery"),this.$el=e(t),this.core.s=e.extend({},i,this.core.s),this.core.s.pager&&this.core.$items.length>1&&this.init(),this};l.prototype.init=function(){var t,o,s,i=this,l="";if(i.core.$outer.find(".lg").append('<div class="lg-pager-outer"></div>'),i.core.s.dynamic)for(var r=0;r<i.core.s.dynamicEl.length;r++)l+='<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="'+i.core.s.dynamicEl[r].thumb+'" /></div></span>';else i.core.$items.each(function(){l+=i.core.s.exThumbImage?'<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="'+e(this).attr(i.core.s.exThumbImage)+'" /></div></span>':'<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="'+e(this).find("img").attr("src")+'" /></div></span>'});o=i.core.$outer.find(".lg-pager-outer"),o.html(l),t=i.core.$outer.find(".lg-pager-cont"),t.on("click.lg touchend.lg",function(){var t=e(this);i.core.index=t.index(),i.core.slide(i.core.index,!1,!1)}),o.on("mouseover.lg",function(){clearTimeout(s),o.addClass("lg-pager-hover")}),o.on("mouseout.lg",function(){s=setTimeout(function(){o.removeClass("lg-pager-hover")})}),i.core.$el.on("onBeforeSlide.lg.tm",function(e,o,s){t.removeClass("lg-pager-active"),t.eq(s).addClass("lg-pager-active")})},l.prototype.destroy=function(){},e.fn.lightGallery.modules.pager=l}(jQuery,window,document),function(e,t,o,s){"use strict";var i={thumbnail:!0,animateThumb:!0,currentPagerPosition:"middle",thumbWidth:100,thumbContHeight:100,thumbMargin:5,exThumbImage:!1,showThumbByDefault:!0,toogleThumb:!0,pullCaptionUp:!0,enableThumbDrag:!0,enableThumbSwipe:!0,swipeThreshold:50,loadYoutubeThumbnail:!0,youtubeThumbSize:1,loadVimeoThumbnail:!0,vimeoThumbSize:"thumbnail_small",loadDailymotionThumbnail:!0},l=function(t){return this.core=e(t).data("lightGallery"),this.core.s=e.extend({},i,this.core.s),this.$el=e(t),this.$thumbOuter=null,this.thumbOuterWidth=0,this.thumbTotalWidth=this.core.$items.length*(this.core.s.thumbWidth+this.core.s.thumbMargin),this.thumbIndex=this.core.index,this.left=0,this.init(),this};l.prototype.init=function(){var e=this;this.core.s.thumbnail&&this.core.$items.length>1&&(this.core.s.showThumbByDefault&&setTimeout(function(){e.core.$outer.addClass("lg-thumb-open")},700),this.core.s.pullCaptionUp&&this.core.$outer.addClass("lg-pull-caption-up"),this.build(),this.core.s.animateThumb?(this.core.s.enableThumbDrag&&!this.core.isTouch&&this.core.doCss()&&this.enableThumbDrag(),this.core.s.enableThumbSwipe&&this.core.isTouch&&this.core.doCss()&&this.enableThumbSwipe(),this.thumbClickable=!1):this.thumbClickable=!0,this.toogle(),this.thumbkeyPress())},l.prototype.build=function(){function o(e,t,o){var s,a=i.core.isVideo(e,o)||{},n="";a.youtube||a.vimeo||a.dailymotion?a.youtube?s=i.core.s.loadYoutubeThumbnail?"//img.youtube.com/vi/"+a.youtube[1]+"/"+i.core.s.youtubeThumbSize+".jpg":t:a.vimeo?i.core.s.loadVimeoThumbnail?(s="//i.vimeocdn.com/video/error_"+r+".jpg",n=a.vimeo[1]):s=t:a.dailymotion&&(s=i.core.s.loadDailymotionThumbnail?"//www.dailymotion.com/thumbnail/video/"+a.dailymotion[1]:t):s=t,l+='<div data-vimeo-id="'+n+'" class="lg-thumb-item" style="width:'+i.core.s.thumbWidth+"px; margin-right: "+i.core.s.thumbMargin+'px"><img src="'+s+'" /></div>',n=""}var s,i=this,l="",r="",a='<div class="lg-thumb-outer"><div class="lg-thumb group"></div></div>';switch(this.core.s.vimeoThumbSize){case"thumbnail_large":r="640";break;case"thumbnail_medium":r="200x150";break;case"thumbnail_small":r="100x75"}if(i.core.$outer.addClass("lg-has-thumb"),i.core.$outer.find(".lg").append(a),i.$thumbOuter=i.core.$outer.find(".lg-thumb-outer"),i.thumbOuterWidth=i.$thumbOuter.width(),i.core.s.animateThumb&&i.core.$outer.find(".lg-thumb").css({width:i.thumbTotalWidth+"px",position:"relative"}),this.core.s.animateThumb&&i.$thumbOuter.css("height",i.core.s.thumbContHeight+"px"),i.core.s.dynamic)for(var n=0;n<i.core.s.dynamicEl.length;n++)o(i.core.s.dynamicEl[n].src,i.core.s.dynamicEl[n].thumb,n);else i.core.$items.each(function(t){i.core.s.exThumbImage?o(e(this).attr("href")||e(this).attr("data-src"),e(this).attr(i.core.s.exThumbImage),t):o(e(this).attr("href")||e(this).attr("data-src"),e(this).find("img").attr("src"),t)});i.core.$outer.find(".lg-thumb").html(l),s=i.core.$outer.find(".lg-thumb-item"),s.each(function(){var t=e(this),o=t.attr("data-vimeo-id");o&&e.getJSON("//www.vimeo.com/api/v2/video/"+o+".json?callback=?",{format:"json"},function(e){t.find("img").attr("src",e[0][i.core.s.vimeoThumbSize])})}),s.eq(i.core.index).addClass("active"),i.core.$el.on("onBeforeSlide.lg.tm",function(){s.removeClass("active"),s.eq(i.core.index).addClass("active")}),s.on("click.lg touchend.lg",function(){var t=e(this);setTimeout(function(){(i.thumbClickable&&!i.core.lgBusy||!i.core.doCss())&&(i.core.index=t.index(),i.core.slide(i.core.index,!1,!0))},50)}),i.core.$el.on("onBeforeSlide.lg.tm",function(){i.animateThumb(i.core.index)}),e(t).on("resize.lg.thumb orientationchange.lg.thumb",function(){setTimeout(function(){i.animateThumb(i.core.index),i.thumbOuterWidth=i.$thumbOuter.width()},200)})},l.prototype.setTranslate=function(e){this.core.$outer.find(".lg-thumb").css({transform:"translate3d(-"+e+"px, 0px, 0px)"})},l.prototype.animateThumb=function(e){var t=this.core.$outer.find(".lg-thumb");if(this.core.s.animateThumb){var o;switch(this.core.s.currentPagerPosition){case"left":o=0;break;case"middle":o=this.thumbOuterWidth/2-this.core.s.thumbWidth/2;break;case"right":o=this.thumbOuterWidth-this.core.s.thumbWidth}this.left=(this.core.s.thumbWidth+this.core.s.thumbMargin)*e-1-o,this.left>this.thumbTotalWidth-this.thumbOuterWidth&&(this.left=this.thumbTotalWidth-this.thumbOuterWidth),this.left<0&&(this.left=0),this.core.lGalleryOn?(t.hasClass("on")||this.core.$outer.find(".lg-thumb").css("transition-duration",this.core.s.speed+"ms"),this.core.doCss()||t.animate({left:-this.left+"px"},this.core.s.speed)):this.core.doCss()||t.css("left",-this.left+"px"),this.setTranslate(this.left)}},l.prototype.enableThumbDrag=function(){var o=this,s=0,i=0,l=!1,r=!1,a=0;o.$thumbOuter.addClass("lg-grab"),o.core.$outer.find(".lg-thumb").on("mousedown.lg.thumb",function(e){o.thumbTotalWidth>o.thumbOuterWidth&&(e.preventDefault(),s=e.pageX,l=!0,o.core.$outer.scrollLeft+=1,o.core.$outer.scrollLeft-=1,o.thumbClickable=!1,o.$thumbOuter.removeClass("lg-grab").addClass("lg-grabbing"))}),e(t).on("mousemove.lg.thumb",function(e){l&&(a=o.left,r=!0,i=e.pageX,o.$thumbOuter.addClass("lg-dragging"),a-=i-s,a>o.thumbTotalWidth-o.thumbOuterWidth&&(a=o.thumbTotalWidth-o.thumbOuterWidth),0>a&&(a=0),o.setTranslate(a))}),e(t).on("mouseup.lg.thumb",function(){r?(r=!1,o.$thumbOuter.removeClass("lg-dragging"),o.left=a,Math.abs(i-s)<o.core.s.swipeThreshold&&(o.thumbClickable=!0)):o.thumbClickable=!0,l&&(l=!1,o.$thumbOuter.removeClass("lg-grabbing").addClass("lg-grab"))})},l.prototype.enableThumbSwipe=function(){var e=this,t=0,o=0,s=!1,i=0;e.core.$outer.find(".lg-thumb").on("touchstart.lg",function(o){e.thumbTotalWidth>e.thumbOuterWidth&&(o.preventDefault(),t=o.originalEvent.targetTouches[0].pageX,e.thumbClickable=!1)}),e.core.$outer.find(".lg-thumb").on("touchmove.lg",function(l){e.thumbTotalWidth>e.thumbOuterWidth&&(l.preventDefault(),o=l.originalEvent.targetTouches[0].pageX,s=!0,e.$thumbOuter.addClass("lg-dragging"),i=e.left,i-=o-t,i>e.thumbTotalWidth-e.thumbOuterWidth&&(i=e.thumbTotalWidth-e.thumbOuterWidth),0>i&&(i=0),e.setTranslate(i))}),e.core.$outer.find(".lg-thumb").on("touchend.lg",function(){e.thumbTotalWidth>e.thumbOuterWidth&&s?(s=!1,e.$thumbOuter.removeClass("lg-dragging"),Math.abs(o-t)<e.core.s.swipeThreshold&&(e.thumbClickable=!0),e.left=i):e.thumbClickable=!0})},l.prototype.toogle=function(){var e=this;e.core.s.toogleThumb&&(e.core.$outer.addClass("lg-can-toggle"),e.$thumbOuter.append('<span class="lg-toogle-thumb lg-icon"></span>'),e.core.$outer.find(".lg-toogle-thumb").on("click.lg",function(){e.core.$outer.toggleClass("lg-thumb-open")}))},l.prototype.thumbkeyPress=function(){var o=this;e(t).on("keydown.lg.thumb",function(e){38===e.keyCode?(e.preventDefault(),o.core.$outer.addClass("lg-thumb-open")):40===e.keyCode&&(e.preventDefault(),o.core.$outer.removeClass("lg-thumb-open"))})},l.prototype.destroy=function(){this.core.s.thumbnail&&this.core.$items.length>1&&(e(t).off("resize.lg.thumb orientationchange.lg.thumb keydown.lg.thumb"),this.$thumbOuter.remove(),this.core.$outer.removeClass("lg-has-thumb"))},e.fn.lightGallery.modules.Thumbnail=l}(jQuery,window,document),function(e,t,o,s){"use strict";var i={videoMaxWidth:"855px",youtubePlayerParams:!1,vimeoPlayerParams:!1,dailymotionPlayerParams:!1,vkPlayerParams:!1,videojs:!1},l=function(t){return this.core=e(t).data("lightGallery"),this.$el=e(t),this.core.s=e.extend({},i,this.core.s),this.videoLoaded=!1,this.init(),this};l.prototype.init=function(){var t=this;t.core.$el.on("hasVideo.lg.tm",function(e,o,s,i){if(t.core.$slide.eq(o).find(".lg-video").append(t.loadVideo(s,"lg-object",!0,o,i)),i)if(t.core.s.videojs)try{videojs(t.core.$slide.eq(o).find(".lg-html5").get(0),{},function(){t.videoLoaded||this.play()})}catch(l){console.error("Make sure you have included videojs")}else t.core.$slide.eq(o).find(".lg-html5").get(0).play()}),t.core.$el.on("onAferAppendSlide.lg.tm",function(e,o){t.core.$slide.eq(o).find(".lg-video-cont").css("max-width",t.core.s.videoMaxWidth),t.videoLoaded=!0});var o=function(e){if(e.find(".lg-object").hasClass("lg-has-poster")&&e.find(".lg-object").is(":visible"))if(e.hasClass("lg-has-video")){var o=e.find(".lg-youtube").get(0),s=e.find(".lg-vimeo").get(0),i=e.find(".lg-dailymotion").get(0),l=e.find(".lg-html5").get(0);if(o)o.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*");else if(s)try{$f(s).api("play")}catch(r){console.error("Make sure you have included froogaloop2 js")}else if(i)i.contentWindow.postMessage("play","*");else if(l)if(t.core.s.videojs)try{videojs(l).play()}catch(r){console.error("Make sure you have included videojs")}else l.play();e.addClass("lg-video-playing")}else{e.addClass("lg-video-playing lg-has-video");var a,n,d=function(o,s){if(e.find(".lg-video").append(t.loadVideo(o,"",!1,t.core.index,s)),s)if(t.core.s.videojs)try{videojs(t.core.$slide.eq(t.core.index).find(".lg-html5").get(0),{},function(){
this.play()})}catch(i){console.error("Make sure you have included videojs")}else t.core.$slide.eq(t.core.index).find(".lg-html5").get(0).play()};t.core.s.dynamic?(a=t.core.s.dynamicEl[t.core.index].src,n=t.core.s.dynamicEl[t.core.index].html,d(a,n)):(a=t.core.$items.eq(t.core.index).attr("href")||t.core.$items.eq(t.core.index).attr("data-src"),n=t.core.$items.eq(t.core.index).attr("data-html"),d(a,n));var c=e.find(".lg-object");e.find(".lg-video").append(c),e.find(".lg-video-object").hasClass("lg-html5")||(e.removeClass("lg-complete"),e.find(".lg-video-object").on("load.lg error.lg",function(){e.addClass("lg-complete")}))}};t.core.doCss()&&t.core.$items.length>1&&(t.core.s.enableSwipe&&t.core.isTouch||t.core.s.enableDrag&&!t.core.isTouch)?t.core.$el.on("onSlideClick.lg.tm",function(){var e=t.core.$slide.eq(t.core.index);o(e)}):t.core.$slide.on("click.lg",function(){o(e(this))}),t.core.$el.on("onBeforeSlide.lg.tm",function(o,s,i){var l=t.core.$slide.eq(s),r=l.find(".lg-youtube").get(0),a=l.find(".lg-vimeo").get(0),n=l.find(".lg-dailymotion").get(0),d=l.find(".lg-vk").get(0),c=l.find(".lg-html5").get(0);if(r)r.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*");else if(a)try{$f(a).api("pause")}catch(u){console.error("Make sure you have included froogaloop2 js")}else if(n)n.contentWindow.postMessage("pause","*");else if(c)if(t.core.s.videojs)try{videojs(c).pause()}catch(u){console.error("Make sure you have included videojs")}else c.pause();d&&e(d).attr("src",e(d).attr("src").replace("&autoplay","&noplay"));var h;h=t.core.s.dynamic?t.core.s.dynamicEl[i].src:t.core.$items.eq(i).attr("href")||t.core.$items.eq(i).attr("data-src");var g=t.core.isVideo(h,i)||{};(g.youtube||g.vimeo||g.dailymotion||g.vk)&&t.core.$outer.addClass("lg-hide-download")}),t.core.$el.on("onAfterSlide.lg.tm",function(e,o){t.core.$slide.eq(o).removeClass("lg-video-playing")})},l.prototype.loadVideo=function(t,o,s,i,l){var r="",a=1,n="",d=this.core.isVideo(t,i)||{};if(s&&(a=this.videoLoaded?0:1),d.youtube)n="?wmode=opaque&autoplay="+a+"&enablejsapi=1",this.core.s.youtubePlayerParams&&(n=n+"&"+e.param(this.core.s.youtubePlayerParams)),r='<iframe class="lg-video-object lg-youtube '+o+'" width="560" height="315" src="//www.youtube.com/embed/'+d.youtube[1]+n+'" frameborder="0" allowfullscreen></iframe>';else if(d.vimeo)n="?autoplay="+a+"&api=1",this.core.s.vimeoPlayerParams&&(n=n+"&"+e.param(this.core.s.vimeoPlayerParams)),r='<iframe class="lg-video-object lg-vimeo '+o+'" width="560" height="315" src="//player.vimeo.com/video/'+d.vimeo[1]+n+'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';else if(d.dailymotion)n="?wmode=opaque&autoplay="+a+"&api=postMessage",this.core.s.dailymotionPlayerParams&&(n=n+"&"+e.param(this.core.s.dailymotionPlayerParams)),r='<iframe class="lg-video-object lg-dailymotion '+o+'" width="560" height="315" src="//www.dailymotion.com/embed/video/'+d.dailymotion[1]+n+'" frameborder="0" allowfullscreen></iframe>';else if(d.html5){var c=l.substring(0,1);("."===c||"#"===c)&&(l=e(l).html()),r=l}else d.vk&&(n="&autoplay="+a,this.core.s.vkPlayerParams&&(n=n+"&"+e.param(this.core.s.vkPlayerParams)),r='<iframe class="lg-video-object lg-vk '+o+'" width="560" height="315" src="http://vk.com/video_ext.php?'+d.vk[1]+n+'" frameborder="0" allowfullscreen></iframe>');return r},l.prototype.destroy=function(){this.videoLoaded=!1},e.fn.lightGallery.modules.video=l}(jQuery,window,document),function(e,t,o,s){"use strict";var i={scale:1,zoom:!0,enableZoomAfter:300},l=function(o){return this.core=e(o).data("lightGallery"),this.core.s=e.extend({},i,this.core.s),this.core.s.zoom&&this.core.doCss()&&(this.init(),this.zoomabletimeout=!1,this.pageX=e(t).width()/2,this.pageY=e(t).height()/2+e(t).scrollTop()),this};l.prototype.init=function(){var o=this,s='<span id="lg-zoom-in" class="lg-icon"></span><span id="lg-zoom-out" class="lg-icon"></span>';this.core.$outer.find(".lg-toolbar").append(s),o.core.$el.on("onSlideItemLoad.lg.tm.zoom",function(t,s,i){var l=o.core.s.enableZoomAfter+i;e("body").hasClass("lg-from-hash")&&i?l=0:e("body").removeClass("lg-from-hash"),o.zoomabletimeout=setTimeout(function(){o.core.$slide.eq(s).addClass("lg-zoomable")},l+30)});var i=1,l=function(s){var i,l,r=o.core.$outer.find(".lg-current .lg-image"),a=(e(t).width()-r.width())/2,n=(e(t).height()-r.height())/2+e(t).scrollTop();i=o.pageX-a,l=o.pageY-n;var d=(s-1)*i,c=(s-1)*l;r.css("transform","scale3d("+s+", "+s+", 1)").attr("data-scale",s),r.parent().css("transform","translate3d(-"+d+"px, -"+c+"px, 0)").attr("data-x",d).attr("data-y",c)},r=function(){i>1?o.core.$outer.addClass("lg-zoomed"):o.resetZoom(),1>i&&(i=1),l(i)},a=function(e,t,s){var l,a=t.width();l=o.core.s.dynamic?o.core.s.dynamicEl[s].width||t[0].naturalWidth||a:o.core.$items.eq(s).attr("data-width")||t[0].naturalWidth||a;var n;o.core.$outer.hasClass("lg-zoomed")?i=1:l>a&&(n=l/a,i=n||2),o.pageX=e.pageX||e.originalEvent.targetTouches[0].pageX,o.pageY=e.pageY||e.originalEvent.targetTouches[0].pageY,r(),setTimeout(function(){o.core.$outer.removeClass("lg-grabbing").addClass("lg-grab")},10)},n=!1;o.core.$el.on("onAferAppendSlide.lg.tm.zoom",function(e,t){var s=o.core.$slide.eq(t).find(".lg-image");s.on("dblclick",function(e){a(e,s,t)}),s.on("touchstart",function(e){n?(clearTimeout(n),n=null,a(e,s,t)):n=setTimeout(function(){n=null},300),e.preventDefault()})}),e(t).on("resize.lg.zoom scroll.lg.zoom orientationchange.lg.zoom",function(){o.pageX=e(t).width()/2,o.pageY=e(t).height()/2+e(t).scrollTop(),l(i)}),e("#lg-zoom-out").on("click.lg",function(){o.core.$outer.find(".lg-current .lg-image").length&&(i-=o.core.s.scale,r())}),e("#lg-zoom-in").on("click.lg",function(){o.core.$outer.find(".lg-current .lg-image").length&&(i+=o.core.s.scale,r())}),o.core.$el.on("onBeforeSlide.lg.tm",function(){i=1,o.resetZoom()}),o.core.isTouch||o.zoomDrag(),o.core.isTouch&&o.zoomSwipe()},l.prototype.resetZoom=function(){this.core.$outer.removeClass("lg-zoomed"),this.core.$slide.find(".lg-img-wrap").removeAttr("style data-x data-y"),this.core.$slide.find(".lg-image").removeAttr("style data-scale"),this.pageX=e(t).width()/2,this.pageY=e(t).height()/2+e(t).scrollTop()},l.prototype.zoomSwipe=function(){var e=this,t={},o={},s=!1,i=!1,l=!1;e.core.$slide.on("touchstart.lg",function(o){if(e.core.$outer.hasClass("lg-zoomed")){var s=e.core.$slide.eq(e.core.index).find(".lg-object");l=s.outerHeight()*s.attr("data-scale")>e.core.$outer.find(".lg").height(),i=s.outerWidth()*s.attr("data-scale")>e.core.$outer.find(".lg").width(),(i||l)&&(o.preventDefault(),t={x:o.originalEvent.targetTouches[0].pageX,y:o.originalEvent.targetTouches[0].pageY})}}),e.core.$slide.on("touchmove.lg",function(r){if(e.core.$outer.hasClass("lg-zoomed")){var a,n,d=e.core.$slide.eq(e.core.index).find(".lg-img-wrap");r.preventDefault(),s=!0,o={x:r.originalEvent.targetTouches[0].pageX,y:r.originalEvent.targetTouches[0].pageY},e.core.$outer.addClass("lg-zoom-dragging"),n=l?-Math.abs(d.attr("data-y"))+(o.y-t.y):-Math.abs(d.attr("data-y")),a=i?-Math.abs(d.attr("data-x"))+(o.x-t.x):-Math.abs(d.attr("data-x")),(Math.abs(o.x-t.x)>15||Math.abs(o.y-t.y)>15)&&d.css("transform","translate3d("+a+"px, "+n+"px, 0)")}}),e.core.$slide.on("touchend.lg",function(){e.core.$outer.hasClass("lg-zoomed")&&s&&(s=!1,e.core.$outer.removeClass("lg-zoom-dragging"),e.touchendZoom(t,o,i,l))})},l.prototype.zoomDrag=function(){var o=this,s={},i={},l=!1,r=!1,a=!1,n=!1;o.core.$slide.on("mousedown.lg.zoom",function(t){var i=o.core.$slide.eq(o.core.index).find(".lg-object");n=i.outerHeight()*i.attr("data-scale")>o.core.$outer.find(".lg").height(),a=i.outerWidth()*i.attr("data-scale")>o.core.$outer.find(".lg").width(),o.core.$outer.hasClass("lg-zoomed")&&e(t.target).hasClass("lg-object")&&(a||n)&&(t.preventDefault(),s={x:t.pageX,y:t.pageY},l=!0,o.core.$outer.scrollLeft+=1,o.core.$outer.scrollLeft-=1,o.core.$outer.removeClass("lg-grab").addClass("lg-grabbing"))}),e(t).on("mousemove.lg.zoom",function(e){if(l){var t,d,c=o.core.$slide.eq(o.core.index).find(".lg-img-wrap");r=!0,i={x:e.pageX,y:e.pageY},o.core.$outer.addClass("lg-zoom-dragging"),d=n?-Math.abs(c.attr("data-y"))+(i.y-s.y):-Math.abs(c.attr("data-y")),t=a?-Math.abs(c.attr("data-x"))+(i.x-s.x):-Math.abs(c.attr("data-x")),c.css("transform","translate3d("+t+"px, "+d+"px, 0)")}}),e(t).on("mouseup.lg.zoom",function(e){l&&(l=!1,o.core.$outer.removeClass("lg-zoom-dragging"),!r||s.x===i.x&&s.y===i.y||(i={x:e.pageX,y:e.pageY},o.touchendZoom(s,i,a,n)),r=!1),o.core.$outer.removeClass("lg-grabbing").addClass("lg-grab")})},l.prototype.touchendZoom=function(e,t,o,s){var i=this,l=i.core.$slide.eq(i.core.index).find(".lg-img-wrap"),r=i.core.$slide.eq(i.core.index).find(".lg-object"),a=-Math.abs(l.attr("data-x"))+(t.x-e.x),n=-Math.abs(l.attr("data-y"))+(t.y-e.y),d=(i.core.$outer.find(".lg").height()-r.outerHeight())/2,c=Math.abs(r.outerHeight()*Math.abs(r.attr("data-scale"))-i.core.$outer.find(".lg").height()+d),u=(i.core.$outer.find(".lg").width()-r.outerWidth())/2,h=Math.abs(r.outerWidth()*Math.abs(r.attr("data-scale"))-i.core.$outer.find(".lg").width()+u);(Math.abs(t.x-e.x)>15||Math.abs(t.y-e.y)>15)&&(s&&(-c>=n?n=-c:n>=-d&&(n=-d)),o&&(-h>=a?a=-h:a>=-u&&(a=-u)),s?l.attr("data-y",Math.abs(n)):n=-Math.abs(l.attr("data-y")),o?l.attr("data-x",Math.abs(a)):a=-Math.abs(l.attr("data-x")),l.css("transform","translate3d("+a+"px, "+n+"px, 0)"))},l.prototype.destroy=function(){var o=this;o.core.$el.off(".lg.zoom"),e(t).off(".lg.zoom"),o.core.$slide.off(".lg.zoom"),o.core.$el.off(".lg.tm.zoom"),o.resetZoom(),clearTimeout(o.zoomabletimeout),o.zoomabletimeout=!1},e.fn.lightGallery.modules.zoom=l}(jQuery,window,document),function(e,t,o,s){"use strict";var i={hash:!0},l=function(o){return this.core=e(o).data("lightGallery"),this.core.s=e.extend({},i,this.core.s),this.core.s.hash&&(this.oldHash=t.location.hash,this.init()),this};l.prototype.init=function(){var o,s=this;s.core.$el.on("onAfterSlide.lg.tm",function(e,o,i){t.location.hash="lg="+s.core.s.galleryId+"&slide="+i}),e(t).on("hashchange",function(){o=t.location.hash;var e=parseInt(o.split("&slide=")[1],10);o.indexOf("lg="+s.core.s.galleryId)>-1?s.core.slide(e):s.core.lGalleryOn&&s.core.destroy()})},l.prototype.destroy=function(){this.oldHash&&this.oldHash.indexOf("lg="+this.core.s.galleryId)<0?t.location.hash=this.oldHash:history.pushState?history.pushState("",o.title,t.location.pathname+t.location.search):t.location.hash=""},e.fn.lightGallery.modules.hash=l}(jQuery,window,document);