{"version":3,"sources":["webpack://website/./node_modules/lg-video/dist/lg-video.js","webpack://website/./node_modules/lightgallery/dist/js/lightgallery.js"],"names":["a0","$","defaults","videoMaxWidth","autoplayFirstVideo","youtubePlayerParams","vimeoPlayerParams","dailymotionPlayerParams","vkPlayerParams","videojs","videojsOptions","Video","element","this","core","data","$el","s","extend","videoLoaded","init","onHasVideo","event","index","src","html","_this","$slide","eq","find","append","loadVideo","get","play","e","console","error","onAferAppendSlide","$videoCont","hasClass","css","onBeforeSlide","prevIndex","_src","$videoSlide","youtubePlayer","vimeoPlayer","dailymotionPlayer","vkPlayer","html5Player","contentWindow","postMessage","$f","api","pause","attr","replace","dynamic","dynamicEl","$items","_isVideo","isVideo","youtube","vimeo","dailymotion","vk","$outer","addClass","prototype","on","bind","doCss","length","enableSwipe","enableDrag","loadVideoOnclick","removeClass","lGalleryOn","setTimeout","noPoster","videoTitle","video","autoplay","a","title","first","param","html5","fL","substring","is","_loadVideo","_html","$tempImg","destroy","fn","lightGallery","modules","mode","cssEasing","easing","speed","height","width","startClass","backdropDuration","hideBarsDelay","useLeft","ariaLabelledby","ariaDescribedby","closable","loop","escKey","keyPress","controls","slideEndAnimatoin","hideControlOnEnd","mousewheel","getCaptionFromTitleOrAlt","appendSubHtmlTo","subHtmlSelectorRelative","preload","showAfterLoad","selector","selectWithin","nextHtml","prevHtml","iframeMaxWidth","download","counter","appendCounterTo","swipeThreshold","galleryId","Plugin","options","el","constructor","Array","lgBusy","hideBartimeout","isTouch","document","documentElement","children","_hash","window","location","hash","indexOf","parseInt","split","build","trigger","preventDefault","er","returnValue","structure","each","key","slide","arrow","closeGallery","clearTimeout","template","list","i","subHtmlCont","focus","setTop","$inner","prevScrollTop","scrollTop","wH","top","$lGallery","transition","root","style","support","match","addHtml","subHtmlUrl","$currentEle","subHtml","load","j","loadContent","rec","delay","_$img","_poster","_srcset","_sizes","_alt","_hasPoster","getResponsiveSrc","srcItms","rsWidth","rsSrc","__src","splice","push","wWidth","poster","alt","responsive","srcset","sizes","iframe","prepend","videoClass","picturefill","elements","warn","_speed","fromTouch","fromThumb","direction","_prevIndex","touchPrev","touchNext","_length","_time","downloadUrl","arrowDisable","text","goToNextSlide","_loop","goToPrevSlide","keyCode","removeAttr","setTranslate","xValue","yValue","transform","touchMove","startCoords","endCoords","distance","Math","abs","touchEnd","not","isMoved","manageSwipeClass","originalEvent","targetTouches","pageX","isDraging","target","trim","scrollLeft","_touchNext","_touchPrev","deltaY","mousedown","d","off","removeData","remove","err"],"mappings":";0FAAA,QAOI,EAAO,CAAC,cAEP,KAFkB,EAAF,SAAYA,GAC3B,OAUYC,EAVID,OAYtB,WAEQ,aAEA,IAAIE,EAAW,CACXC,cAAe,QAEfC,oBAAoB,EAEpBC,qBAAqB,EACrBC,mBAAmB,EACnBC,yBAAyB,EACzBC,gBAAgB,EAEhBC,SAAS,EACTC,eAAgB,IAGhBC,EAAQ,SAASC,GAUjB,OARAC,KAAKC,KAAOb,EAAEW,GAASG,KAAK,gBAE5BF,KAAKG,IAAMf,EAAEW,GACbC,KAAKC,KAAKG,EAAIhB,EAAEiB,OAAO,GAAIhB,EAAUW,KAAKC,KAAKG,GAC/CJ,KAAKM,aAAc,EAEnBN,KAAKO,OAEEP,MAyNX,SAASQ,EAAWC,EAAOC,EAAOC,EAAKC,GAEnC,IAAIC,EAAQb,KAEZ,GADAa,EAAMZ,KAAKa,OAAOC,GAAGL,GAAOM,KAAK,aAAaC,OAAOJ,EAAMK,UAAUP,EAAK,aAAa,EAAMD,EAAOE,IAChGA,EACA,GAAIC,EAAMZ,KAAKG,EAAER,QACb,IACIA,QAAQiB,EAAMZ,KAAKa,OAAOC,GAAGL,GAAOM,KAAK,aAAaG,IAAI,GAAIN,EAAMZ,KAAKG,EAAEP,gBAAgB,YAClFgB,EAAMP,aAAeO,EAAMZ,KAAKG,EAAEb,oBACnCS,KAAKoB,UAGf,MAAOC,GACLC,QAAQC,MAAM,4CAGdV,EAAMP,aAAeO,EAAMZ,KAAKG,EA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AEPmP,IACDtO,EAAMV,IAAIwI,QAAQ,oBAClBvJ,EAAEgJ,QAAQ0B,UAAUjJ,EAAMgJ,gBAW1BsF,IACKtO,EAAMT,EAAEwC,SAET5C,KAAK8C,OAAOsM,IAAI,2BAGpBhQ,EAAEiQ,WAAWxO,EAAM6G,GAAI,iBAI3B1H,KAAKG,IAAIiP,IAAI,UAGbhQ,EAAE4J,KAAK5J,EAAE8F,GAAGC,aAAaC,SAAS,SAAS6D,GACnCpI,EAAMuE,QAAQ6D,IACdpI,EAAMuE,QAAQ6D,GAAKhE,aAI3BjF,KAAKgE,YAAa,EAElBqF,aAAaxI,EAAMiH,gBACnB9H,KAAK8H,gBAAiB,EACtB1I,EAAEgJ,QAAQgH,IAAI,OACdhQ,EAAE,QAAQ2E,YAAY,sBAElBlD,EAAMwC,QACNxC,EAAMwC,OAAOU,YAAY,cAG7B3E,EAAE,gBAAgB2E,YAAY,MAE9BE,YAAW,WACHpD,EAAMwC,QACNxC,EAAMwC,OAAOiM,SAGjBlQ,EAAE,gBAAgBkQ,SAEbH,GACDtO,EAAMV,IAAIwI,QAAQ,mBAEtB9H,EAAMV,IAAIuJ,UAEX7I,EAAMT,EAAEwF,iBAAmB,KAGlCxG,EAAE8F,GAAGC,aAAe,SAASsC,GACzB,OAAOzH,KAAKgJ,MAAK,WACb,GAAK5J,EAAEc,KAAKF,KAAM,gBAGd,IACIZ,EAAEY,MAAME,KAAK,gBAAgBK,OAC/B,MAAOgP,GACLjO,QAAQC,MAAM,gDALlBnC,EAAEc,KAAKF,KAAM,eAAgB,IAAIwH,EAAOxH,KAAMyH,QAW1DrI,EAAE8F,GAAGC,aAAaC,QAAU,GAz0ChC,GAFQ,IAAUhG,GATb","file":"lightgallery.js","sourcesContent":["/*! lg-video - v1.3.0 - 2020-05-03\n* http://sachinchoolur.github.io/lightGallery\n* Copyright (c) 2020 Sachin N; Licensed GPLv3 */\n\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module unless amdModuleId is set\n define(['jquery'], function (a0) {\n return (factory(a0));\n });\n } else if (typeof module === 'object' && module.exports) {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory(require('jquery'));\n } else {\n factory(root[\"jQuery\"]);\n }\n}(this, function ($) {\n\n(function() {\n \n 'use strict';\n\n var defaults = {\n videoMaxWidth: '855px',\n\n autoplayFirstVideo: true,\n\n youtubePlayerParams: false,\n vimeoPlayerParams: false,\n dailymotionPlayerParams: false,\n vkPlayerParams: false,\n\n videojs: false,\n videojsOptions: {}\n };\n\n var Video = function(element) {\n\n this.core = $(element).data('lightGallery');\n\n this.$el = $(element);\n this.core.s = $.extend({}, defaults, this.core.s);\n this.videoLoaded = false;\n\n this.init();\n\n return this;\n };\n\n Video.prototype.init = function() {\n var _this = this;\n\n // Event triggered when video url found without poster\n _this.core.$el.on('hasVideo.lg.tm', onHasVideo.bind(this));\n\n // Set max width for video\n _this.core.$el.on('onAferAppendSlide.lg.tm', onAferAppendSlide.bind(this));\n\n if (_this.core.doCss() && (_this.core.$items.length > 1) && (_this.core.s.enableSwipe || _this.core.s.enableDrag)) {\n _this.core.$el.on('onSlideClick.lg.tm', function() {\n var $el = _this.core.$slide.eq(_this.core.index);\n _this.loadVideoOnclick($el);\n });\n } else {\n\n // For IE 9 and bellow\n _this.core.$slide.on('click.lg', function() {\n _this.loadVideoOnclick($(this));\n });\n }\n\n _this.core.$el.on('onBeforeSlide.lg.tm', onBeforeSlide.bind(this));\n\n _this.core.$el.on('onAfterSlide.lg.tm', function(event, prevIndex) {\n _this.core.$slide.eq(prevIndex).removeClass('lg-video-playing');\n });\n \n if (_this.core.s.autoplayFirstVideo) {\n _this.core.$el.on('onAferAppendSlide.lg.tm', function (e, index) {\n if (!_this.core.lGalleryOn) {\n var $el = _this.core.$slide.eq(index);\n setTimeout(function () {\n _this.loadVideoOnclick($el);\n }, 100);\n }\n });\n }\n };\n\n Video.prototype.loadVideo = function(src, addClass, noPoster, index, html) {\n var _this = this;\n var video = '';\n var autoplay = 1;\n var a = '';\n var isVideo = this.core.isVideo(src, index) || {};\n var videoTitle;\n\n if (_this.core.s.dynamic) {\n videoTitle = _this.core.s.dynamicEl[_this.core.index].title;\n } else {\n videoTitle = _this.core.$items.eq(_this.core.index).attr('title') || _this.core.$items.eq(_this.core.index).find('img').first().attr('alt');\n }\n\n videoTitle = videoTitle ? 'title=\"' + videoTitle + '\"' : '';\n\n // Enable autoplay based on setting for first video if poster doesn't exist\n if (noPoster) {\n if (this.videoLoaded) {\n autoplay = 0;\n } else {\n autoplay = this.core.s.autoplayFirstVideo ? 1 : 0;\n }\n }\n\n if (isVideo.youtube) {\n\n a = '?wmode=opaque&autoplay=' + autoplay + '&enablejsapi=1';\n if (this.core.s.youtubePlayerParams) {\n a = a + '&' + $.param(this.core.s.youtubePlayerParams);\n }\n\n video = '';\n\n } else if (isVideo.vimeo) {\n\n a = '?autoplay=' + autoplay + '&api=1';\n if (this.core.s.vimeoPlayerParams) {\n a = a + '&' + $.param(this.core.s.vimeoPlayerParams);\n }\n\n video = '';\n\n } else if (isVideo.dailymotion) {\n\n a = '?wmode=opaque&autoplay=' + autoplay + '&api=postMessage';\n if (this.core.s.dailymotionPlayerParams) {\n a = a + '&' + $.param(this.core.s.dailymotionPlayerParams);\n }\n\n video = '';\n\n } else if (isVideo.html5) {\n var fL = html.substring(0, 1);\n if (fL === '.' || fL === '#') {\n html = $(html).html();\n }\n\n video = html;\n\n } else if (isVideo.vk) {\n\n a = '&autoplay=' + autoplay;\n if (this.core.s.vkPlayerParams) {\n a = a + '&' + $.param(this.core.s.vkPlayerParams);\n }\n\n video = '';\n\n }\n\n return video;\n };\n\n Video.prototype.loadVideoOnclick = function($el){\n\n var _this = this;\n // check slide has poster\n if ($el.find('.lg-object').hasClass('lg-has-poster') && $el.find('.lg-object').is(':visible')) {\n\n // check already video element present\n if (!$el.hasClass('lg-has-video')) {\n\n $el.addClass('lg-video-playing lg-has-video');\n\n var _src;\n var _html;\n var _loadVideo = function(_src, _html) {\n\n $el.find('.lg-video').append(_this.loadVideo(_src, '', false, _this.core.index, _html));\n\n if (_html) {\n if (_this.core.s.videojs) {\n try {\n videojs(_this.core.$slide.eq(_this.core.index).find('.lg-html5').get(0), _this.core.s.videojsOptions, function() {\n this.play();\n });\n } catch (e) {\n console.error('Make sure you have included videojs');\n }\n } else {\n _this.core.$slide.eq(_this.core.index).find('.lg-html5').get(0).play();\n }\n }\n\n };\n\n if (_this.core.s.dynamic) {\n\n _src = _this.core.s.dynamicEl[_this.core.index].src;\n _html = _this.core.s.dynamicEl[_this.core.index].html;\n\n _loadVideo(_src, _html);\n\n } else {\n\n _src = _this.core.$items.eq(_this.core.index).attr('href') || _this.core.$items.eq(_this.core.index).attr('data-src');\n _html = _this.core.$items.eq(_this.core.index).attr('data-html');\n\n _loadVideo(_src, _html);\n\n }\n\n var $tempImg = $el.find('.lg-object');\n $el.find('.lg-video').append($tempImg);\n\n // @todo loading icon for html5 videos also\n // for showing the loading indicator while loading video\n if (!$el.find('.lg-video-object').hasClass('lg-html5')) {\n $el.removeClass('lg-complete');\n $el.find('.lg-video-object').on('load.lg error.lg', function() {\n $el.addClass('lg-complete');\n });\n }\n\n } else {\n\n var youtubePlayer = $el.find('.lg-youtube').get(0);\n var vimeoPlayer = $el.find('.lg-vimeo').get(0);\n var dailymotionPlayer = $el.find('.lg-dailymotion').get(0);\n var html5Player = $el.find('.lg-html5').get(0);\n if (youtubePlayer) {\n youtubePlayer.contentWindow.postMessage('{\"event\":\"command\",\"func\":\"playVideo\",\"args\":\"\"}', '*');\n } else if (vimeoPlayer) {\n try {\n $f(vimeoPlayer).api('play');\n } catch (e) {\n console.error('Make sure you have included froogaloop2 js');\n }\n } else if (dailymotionPlayer) {\n dailymotionPlayer.contentWindow.postMessage('play', '*');\n\n } else if (html5Player) {\n if (_this.core.s.videojs) {\n try {\n videojs(html5Player).play();\n } catch (e) {\n console.error('Make sure you have included videojs');\n }\n } else {\n html5Player.play();\n }\n }\n\n $el.addClass('lg-video-playing');\n\n }\n }\n };\n\n Video.prototype.destroy = function() {\n this.videoLoaded = false;\n };\n\n function onHasVideo(event, index, src, html) {\n /*jshint validthis:true */\n var _this = this;\n _this.core.$slide.eq(index).find('.lg-video').append(_this.loadVideo(src, 'lg-object', true, index, html));\n if (html) {\n if (_this.core.s.videojs) {\n try {\n videojs(_this.core.$slide.eq(index).find('.lg-html5').get(0), _this.core.s.videojsOptions, function() {\n if (!_this.videoLoaded && _this.core.s.autoplayFirstVideo) {\n this.play();\n }\n });\n } catch (e) {\n console.error('Make sure you have included videojs');\n }\n } else {\n if(!_this.videoLoaded && _this.core.s.autoplayFirstVideo) {\n _this.core.$slide.eq(index).find('.lg-html5').get(0).play();\n }\n }\n }\n }\n\n function onAferAppendSlide(event, index) {\n /*jshint validthis:true */\n var $videoCont = this.core.$slide.eq(index).find('.lg-video-cont');\n if (!$videoCont.hasClass('lg-has-iframe')) {\n $videoCont.css('max-width', this.core.s.videoMaxWidth);\n this.videoLoaded = true;\n }\n }\n\n function onBeforeSlide(event, prevIndex, index) {\n /*jshint validthis:true */\n var _this = this;\n\n var $videoSlide = _this.core.$slide.eq(prevIndex);\n var youtubePlayer = $videoSlide.find('.lg-youtube').get(0);\n var vimeoPlayer = $videoSlide.find('.lg-vimeo').get(0);\n var dailymotionPlayer = $videoSlide.find('.lg-dailymotion').get(0);\n var vkPlayer = $videoSlide.find('.lg-vk').get(0);\n var html5Player = $videoSlide.find('.lg-html5').get(0);\n if (youtubePlayer) {\n youtubePlayer.contentWindow.postMessage('{\"event\":\"command\",\"func\":\"pauseVideo\",\"args\":\"\"}', '*');\n } else if (vimeoPlayer) {\n try {\n $f(vimeoPlayer).api('pause');\n } catch (e) {\n console.error('Make sure you have included froogaloop2 js');\n }\n } else if (dailymotionPlayer) {\n dailymotionPlayer.contentWindow.postMessage('pause', '*');\n\n } else if (html5Player) {\n if (_this.core.s.videojs) {\n try {\n videojs(html5Player).pause();\n } catch (e) {\n console.error('Make sure you have included videojs');\n }\n } else {\n html5Player.pause();\n }\n } if (vkPlayer) {\n $(vkPlayer).attr('src', $(vkPlayer).attr('src').replace('&autoplay', '&noplay'));\n }\n\n var _src;\n if (_this.core.s.dynamic) {\n _src = _this.core.s.dynamicEl[index].src;\n } else {\n _src = _this.core.$items.eq(index).attr('href') || _this.core.$items.eq(index).attr('data-src');\n\n }\n\n var _isVideo = _this.core.isVideo(_src, index) || {};\n if (_isVideo.youtube || _isVideo.vimeo || _isVideo.dailymotion || _isVideo.vk) {\n _this.core.$outer.addClass('lg-hide-download');\n }\n\n }\n\n $.fn.lightGallery.modules.video = Video;\n\n })();\n\n\n}));\n","/*! lightgallery - v1.8.3 - 2020-09-19\n* http://sachinchoolur.github.io/lightGallery/\n* Copyright (c) 2020 Sachin N; Licensed GPLv3 */\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module unless amdModuleId is set\n define(['jquery'], function (a0) {\n return (factory(a0));\n });\n } else if (typeof module === 'object' && module.exports) {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory(require('jquery'));\n } else {\n factory(root[\"jQuery\"]);\n }\n}(this, function ($) {\n\n(function() {\n 'use strict';\n\n var defaults = {\n\n mode: 'lg-slide',\n\n // Ex : 'ease'\n cssEasing: 'ease',\n\n //'for jquery animation'\n easing: 'linear',\n speed: 600,\n height: '100%',\n width: '100%',\n addClass: '',\n startClass: 'lg-start-zoom',\n backdropDuration: 150,\n hideBarsDelay: 6000,\n\n useLeft: false,\n\n // aria-labelledby attribute fot gallery\n ariaLabelledby: '',\n \n //aria-describedby attribute for gallery\n ariaDescribedby: '',\n\n closable: true,\n loop: true,\n escKey: true,\n keyPress: true,\n controls: true,\n slideEndAnimatoin: true,\n hideControlOnEnd: false,\n mousewheel: true,\n\n getCaptionFromTitleOrAlt: true,\n\n // .lg-item || '.lg-sub-html'\n appendSubHtmlTo: '.lg-sub-html',\n\n subHtmlSelectorRelative: false,\n\n /**\n * @desc number of preload slides\n * will exicute only after the current slide is fully loaded.\n *\n * @ex you clicked on 4th image and if preload = 1 then 3rd slide and 5th\n * slide will be loaded in the background after the 4th slide is fully loaded..\n * if preload is 2 then 2nd 3rd 5th 6th slides will be preloaded.. ... ...\n *\n */\n preload: 1,\n showAfterLoad: true,\n selector: '',\n selectWithin: '',\n nextHtml: '',\n prevHtml: '',\n\n // 0, 1\n index: false,\n\n iframeMaxWidth: '100%',\n\n download: true,\n counter: true,\n appendCounterTo: '.lg-toolbar',\n\n swipeThreshold: 50,\n enableSwipe: true,\n enableDrag: true,\n\n dynamic: false,\n dynamicEl: [],\n galleryId: 1\n };\n\n function Plugin(element, options) {\n\n // Current lightGallery element\n this.el = element;\n\n // Current jquery element\n this.$el = $(element);\n\n // lightGallery settings\n this.s = $.extend({}, defaults, options);\n\n // When using dynamic mode, ensure dynamicEl is an array\n if (this.s.dynamic && this.s.dynamicEl !== 'undefined' && this.s.dynamicEl.constructor === Array && !this.s.dynamicEl.length) {\n throw ('When using dynamic mode, you must also define dynamicEl as an Array.');\n }\n\n // lightGallery modules\n this.modules = {};\n\n // false when lightgallery complete first slide;\n this.lGalleryOn = false;\n\n this.lgBusy = false;\n\n // Timeout function for hiding controls;\n this.hideBartimeout = false;\n\n // To determine browser supports for touch events;\n this.isTouch = ('ontouchstart' in document.documentElement);\n\n // Disable hideControlOnEnd if sildeEndAnimation is true\n if (this.s.slideEndAnimatoin) {\n this.s.hideControlOnEnd = false;\n }\n\n // Gallery items\n if (this.s.dynamic) {\n this.$items = this.s.dynamicEl;\n } else {\n if (this.s.selector === 'this') {\n this.$items = this.$el;\n } else if (this.s.selector !== '') {\n if (this.s.selectWithin) {\n this.$items = $(this.s.selectWithin).find(this.s.selector);\n } else {\n this.$items = this.$el.find($(this.s.selector));\n }\n } else {\n this.$items = this.$el.children();\n }\n }\n\n // .lg-item\n this.$slide = '';\n\n // .lg-outer\n this.$outer = '';\n\n this.init();\n\n return this;\n }\n\n Plugin.prototype.init = function() {\n\n var _this = this;\n\n // s.preload should not be more than $item.length\n if (_this.s.preload > _this.$items.length) {\n _this.s.preload = _this.$items.length;\n }\n\n // if dynamic option is enabled execute immediately\n var _hash = window.location.hash;\n if (_hash.indexOf('lg=' + this.s.galleryId) > 0) {\n\n _this.index = parseInt(_hash.split('&slide=')[1], 10);\n\n $('body').addClass('lg-from-hash');\n if (!$('body').hasClass('lg-on')) {\n setTimeout(function() {\n _this.build(_this.index);\n });\n\n $('body').addClass('lg-on');\n }\n }\n\n if (_this.s.dynamic) {\n\n _this.$el.trigger('onBeforeOpen.lg');\n\n _this.index = _this.s.index || 0;\n\n // prevent accidental double execution\n if (!$('body').hasClass('lg-on')) {\n setTimeout(function() {\n _this.build(_this.index);\n $('body').addClass('lg-on');\n });\n }\n } else {\n\n // Using different namespace for click because click event should not unbind if selector is same object('this')\n _this.$items.on('click.lgcustom', function(event) {\n\n // For IE8\n try {\n event.preventDefault();\n event.preventDefault();\n } catch (er) {\n event.returnValue = false;\n }\n\n _this.$el.trigger('onBeforeOpen.lg');\n\n _this.index = _this.s.index || _this.$items.index(this);\n\n // prevent accidental double execution\n if (!$('body').hasClass('lg-on')) {\n _this.build(_this.index);\n $('body').addClass('lg-on');\n }\n });\n }\n\n };\n\n Plugin.prototype.build = function(index) {\n\n var _this = this;\n\n _this.structure();\n\n // module constructor\n $.each($.fn.lightGallery.modules, function(key) {\n _this.modules[key] = new $.fn.lightGallery.modules[key](_this.el);\n });\n\n // initiate slide function\n _this.slide(index, false, false, false);\n\n if (_this.s.keyPress) {\n _this.keyPress();\n }\n\n if (_this.$items.length > 1) {\n\n _this.arrow();\n\n setTimeout(function() {\n _this.enableDrag();\n _this.enableSwipe();\n }, 50);\n\n if (_this.s.mousewheel) {\n _this.mousewheel();\n }\n } else {\n _this.$slide.on('click.lg', function() {\n _this.$el.trigger('onSlideClick.lg');\n });\n }\n\n _this.counter();\n\n _this.closeGallery();\n\n _this.$el.trigger('onAfterOpen.lg');\n\n // Hide controllers if mouse doesn't move for some period\n _this.$outer.on('mousemove.lg click.lg touchstart.lg', function() {\n\n _this.$outer.removeClass('lg-hide-items');\n\n clearTimeout(_this.hideBartimeout);\n\n // Timeout will be cleared on each slide movement also\n _this.hideBartimeout = setTimeout(function() {\n _this.$outer.addClass('lg-hide-items');\n }, _this.s.hideBarsDelay);\n\n });\n\n _this.$outer.trigger('mousemove.lg');\n\n };\n\n Plugin.prototype.structure = function() {\n var list = '';\n var controls = '';\n var i = 0;\n var subHtmlCont = '';\n var template;\n var _this = this;\n\n $('body').append('
');\n $('.lg-backdrop').css('transition-duration', this.s.backdropDuration + 'ms');\n\n // Create gallery items\n for (i = 0; i < this.$items.length; i++) {\n list += '
';\n }\n\n // Create controlls\n if (this.s.controls && this.$items.length > 1) {\n controls = '
' +\n '' +\n '' +\n '
';\n }\n\n if (this.s.appendSubHtmlTo === '.lg-sub-html') {\n subHtmlCont = '
';\n }\n\n var ariaLabelledby = this.s.ariaLabelledby ?\n 'aria-labelledby=\"' + this.s.ariaLabelledby + '\"' : '';\n var ariaDescribedby = this.s.ariaDescribedby ?\n 'aria-describedby=\"' + this.s.ariaDescribedby + '\"' : '';\n\n template = '
' +\n '
' +\n '
' + list + '
' +\n '
' +\n '' +\n '
' +\n controls +\n subHtmlCont +\n '
' +\n '
';\n\n $('body').append(template);\n this.$outer = $('.lg-outer');\n this.$outer.focus();\n this.$slide = this.$outer.find('.lg-item');\n\n if (this.s.useLeft) {\n this.$outer.addClass('lg-use-left');\n\n // Set mode lg-slide if use left is true;\n this.s.mode = 'lg-slide';\n } else {\n this.$outer.addClass('lg-use-css3');\n }\n\n // For fixed height gallery\n _this.setTop();\n $(window).on('resize.lg orientationchange.lg', function() {\n setTimeout(function() {\n _this.setTop();\n }, 100);\n });\n\n // add class lg-current to remove initial transition\n this.$slide.eq(this.index).addClass('lg-current');\n\n // add Class for css support and transition mode\n if (this.doCss()) {\n this.$outer.addClass('lg-css3');\n } else {\n this.$outer.addClass('lg-css');\n\n // Set speed 0 because no animation will happen if browser doesn't support css3\n this.s.speed = 0;\n }\n\n this.$outer.addClass(this.s.mode);\n\n if (this.s.enableDrag && this.$items.length > 1) {\n this.$outer.addClass('lg-grab');\n }\n\n if (this.s.showAfterLoad) {\n this.$outer.addClass('lg-show-after-load');\n }\n\n if (this.doCss()) {\n var $inner = this.$outer.find('.lg-inner');\n $inner.css('transition-timing-function', this.s.cssEasing);\n $inner.css('transition-duration', this.s.speed + 'ms');\n }\n\n setTimeout(function() {\n $('.lg-backdrop').addClass('in');\n });\n\n setTimeout(function() {\n _this.$outer.addClass('lg-visible');\n }, this.s.backdropDuration);\n\n if (this.s.download) {\n this.$outer.find('.lg-toolbar').append('');\n }\n\n // Store the current scroll top value to scroll back after closing the gallery..\n this.prevScrollTop = $(window).scrollTop();\n\n };\n\n // For fixed height gallery\n Plugin.prototype.setTop = function() {\n if (this.s.height !== '100%') {\n var wH = $(window).height();\n var top = (wH - parseInt(this.s.height, 10)) / 2;\n var $lGallery = this.$outer.find('.lg');\n if (wH >= parseInt(this.s.height, 10)) {\n $lGallery.css('top', top + 'px');\n } else {\n $lGallery.css('top', '0px');\n }\n }\n };\n\n // Find css3 support\n Plugin.prototype.doCss = function() {\n // check for css animation support\n var support = function() {\n var transition = ['transition', 'MozTransition', 'WebkitTransition', 'OTransition', 'msTransition', 'KhtmlTransition'];\n var root = document.documentElement;\n var i = 0;\n for (i = 0; i < transition.length; i++) {\n if (transition[i] in root.style) {\n return true;\n }\n }\n };\n\n if (support()) {\n return true;\n }\n\n return false;\n };\n\n /**\n * @desc Check the given src is video\n * @param {String} src\n * @return {Object} video type\n * Ex:{ youtube : [\"//www.youtube.com/watch?v=c0asJgSyxcY\", \"c0asJgSyxcY\"] }\n */\n Plugin.prototype.isVideo = function(src, index) {\n\n var html;\n if (this.s.dynamic) {\n html = this.s.dynamicEl[index].html;\n } else {\n html = this.$items.eq(index).attr('data-html');\n }\n\n if (!src) {\n if (html) {\n return {\n html5: true\n };\n } else {\n console.error('lightGallery :- data-src is not provided on slide item ' + (index + 1) + '. Please make sure the selector property is properly configured. More info - http://sachinchoolur.github.io/lightGallery/demos/html-markup.html');\n return false;\n }\n }\n\n var youtube = src.match(/\\/\\/(?:www\\.)?youtu(?:\\.be|be\\.com|be-nocookie\\.com)\\/(?:watch\\?v=|embed\\/)?([a-z0-9\\-\\_\\%]+)/i);\n var vimeo = src.match(/\\/\\/(?:www\\.)?vimeo.com\\/([0-9a-z\\-_]+)/i);\n var dailymotion = src.match(/\\/\\/(?:www\\.)?dai.ly\\/([0-9a-z\\-_]+)/i);\n var vk = src.match(/\\/\\/(?:www\\.)?(?:vk\\.com|vkontakte\\.ru)\\/(?:video_ext\\.php\\?)(.*)/i);\n\n if (youtube) {\n return {\n youtube: youtube\n };\n } else if (vimeo) {\n return {\n vimeo: vimeo\n };\n } else if (dailymotion) {\n return {\n dailymotion: dailymotion\n };\n } else if (vk) {\n return {\n vk: vk\n };\n }\n };\n\n /**\n * @desc Create image counter\n * Ex: 1/10\n */\n Plugin.prototype.counter = function() {\n if (this.s.counter) {\n $(this.s.appendCounterTo).append('
' + (parseInt(this.index, 10) + 1) + ' / ' + this.$items.length + '
');\n }\n };\n\n /**\n * @desc add sub-html into the slide\n * @param {Number} index - index of the slide\n */\n Plugin.prototype.addHtml = function(index) {\n var subHtml = null;\n var subHtmlUrl;\n var $currentEle;\n if (this.s.dynamic) {\n if (this.s.dynamicEl[index].subHtmlUrl) {\n subHtmlUrl = this.s.dynamicEl[index].subHtmlUrl;\n } else {\n subHtml = this.s.dynamicEl[index].subHtml;\n }\n } else {\n $currentEle = this.$items.eq(index);\n if ($currentEle.attr('data-sub-html-url')) {\n subHtmlUrl = $currentEle.attr('data-sub-html-url');\n } else {\n subHtml = $currentEle.attr('data-sub-html');\n if (this.s.getCaptionFromTitleOrAlt && !subHtml) {\n subHtml = $currentEle.attr('title') || $currentEle.find('img').first().attr('alt');\n }\n }\n }\n\n if (!subHtmlUrl) {\n if (typeof subHtml !== 'undefined' && subHtml !== null) {\n\n // get first letter of subhtml\n // if first letter starts with . or # get the html form the jQuery object\n var fL = subHtml.substring(0, 1);\n if (fL === '.' || fL === '#') {\n if (this.s.subHtmlSelectorRelative && !this.s.dynamic) {\n subHtml = $currentEle.find(subHtml).html();\n } else {\n subHtml = $(subHtml).html();\n }\n }\n } else {\n subHtml = '';\n }\n }\n\n if (this.s.appendSubHtmlTo === '.lg-sub-html') {\n\n if (subHtmlUrl) {\n this.$outer.find(this.s.appendSubHtmlTo).load(subHtmlUrl);\n } else {\n this.$outer.find(this.s.appendSubHtmlTo).html(subHtml);\n }\n\n } else {\n\n if (subHtmlUrl) {\n this.$slide.eq(index).load(subHtmlUrl);\n } else {\n this.$slide.eq(index).append(subHtml);\n }\n }\n\n // Add lg-empty-html class if title doesn't exist\n if (typeof subHtml !== 'undefined' && subHtml !== null) {\n if (subHtml === '') {\n this.$outer.find(this.s.appendSubHtmlTo).addClass('lg-empty-html');\n } else {\n this.$outer.find(this.s.appendSubHtmlTo).removeClass('lg-empty-html');\n }\n }\n\n this.$el.trigger('onAfterAppendSubHtml.lg', [index]);\n };\n\n /**\n * @desc Preload slides\n * @param {Number} index - index of the slide\n */\n Plugin.prototype.preload = function(index) {\n var i = 1;\n var j = 1;\n for (i = 1; i <= this.s.preload; i++) {\n if (i >= this.$items.length - index) {\n break;\n }\n\n this.loadContent(index + i, false, 0);\n }\n\n for (j = 1; j <= this.s.preload; j++) {\n if (index - j < 0) {\n break;\n }\n\n this.loadContent(index - j, false, 0);\n }\n };\n\n /**\n * @desc Load slide content into slide.\n * @param {Number} index - index of the slide.\n * @param {Boolean} rec - if true call loadcontent() function again.\n * @param {Boolean} delay - delay for adding complete class. it is 0 except first time.\n */\n Plugin.prototype.loadContent = function(index, rec, delay) {\n\n var _this = this;\n var _hasPoster = false;\n var _$img;\n var _src;\n var _poster;\n var _srcset;\n var _sizes;\n var _html;\n var _alt;\n var getResponsiveSrc = function(srcItms) {\n var rsWidth = [];\n var rsSrc = [];\n for (var i = 0; i < srcItms.length; i++) {\n var __src = srcItms[i].split(' ');\n\n // Manage empty space\n if (__src[0] === '') {\n __src.splice(0, 1);\n }\n\n rsSrc.push(__src[0]);\n rsWidth.push(__src[1]);\n }\n\n var wWidth = $(window).width();\n for (var j = 0; j < rsWidth.length; j++) {\n if (parseInt(rsWidth[j], 10) > wWidth) {\n _src = rsSrc[j];\n break;\n }\n }\n };\n\n if (_this.s.dynamic) {\n\n if (_this.s.dynamicEl[index].poster) {\n _hasPoster = true;\n _poster = _this.s.dynamicEl[index].poster;\n }\n\n _html = _this.s.dynamicEl[index].html;\n _src = _this.s.dynamicEl[index].src;\n _alt = _this.s.dynamicEl[index].alt;\n\n if (_this.s.dynamicEl[index].responsive) {\n var srcDyItms = _this.s.dynamicEl[index].responsive.split(',');\n getResponsiveSrc(srcDyItms);\n }\n\n _srcset = _this.s.dynamicEl[index].srcset;\n _sizes = _this.s.dynamicEl[index].sizes;\n\n } else {\n var $currentEle = _this.$items.eq(index);\n if ($currentEle.attr('data-poster')) {\n _hasPoster = true;\n _poster = $currentEle.attr('data-poster');\n }\n\n _html = $currentEle.attr('data-html');\n _src = $currentEle.attr('href') || $currentEle.attr('data-src');\n _alt = $currentEle.attr('title') || $currentEle.find('img').first().attr('alt');\n\n if ($currentEle.attr('data-responsive')) {\n var srcItms = $currentEle.attr('data-responsive').split(',');\n getResponsiveSrc(srcItms);\n }\n\n _srcset = $currentEle.attr('data-srcset');\n _sizes = $currentEle.attr('data-sizes');\n\n }\n\n //if (_src || _srcset || _sizes || _poster) {\n\n var iframe = false;\n if (_this.s.dynamic) {\n if (_this.s.dynamicEl[index].iframe) {\n iframe = true;\n }\n } else {\n if (_this.$items.eq(index).attr('data-iframe') === 'true') {\n iframe = true;\n }\n }\n\n var _isVideo = _this.isVideo(_src, index);\n if (!_this.$slide.eq(index).hasClass('lg-loaded')) {\n if (iframe) {\n _this.$slide.eq(index).prepend('
');\n } else if (_hasPoster) {\n var videoClass = '';\n if (_isVideo && _isVideo.youtube) {\n videoClass = 'lg-has-youtube';\n } else if (_isVideo && _isVideo.vimeo) {\n videoClass = 'lg-has-vimeo';\n } else {\n videoClass = 'lg-has-html5';\n }\n\n _this.$slide.eq(index).prepend('
');\n\n } else if (_isVideo) {\n _this.$slide.eq(index).prepend('
');\n _this.$el.trigger('hasVideo.lg', [index, _src, _html]);\n } else {\n _alt = _alt ? 'alt=\"' + _alt + '\"' : '';\n _this.$slide.eq(index).prepend('
');\n }\n\n _this.$el.trigger('onAferAppendSlide.lg', [index]);\n\n _$img = _this.$slide.eq(index).find('.lg-object');\n if (_sizes) {\n _$img.attr('sizes', _sizes);\n }\n\n if (_srcset) {\n _$img.attr('srcset', _srcset);\n try {\n picturefill({\n elements: [_$img[0]]\n });\n } catch (e) {\n console.warn('lightGallery :- If you want srcset to be supported for older browser please include picturefil version 2 javascript library in your document.');\n }\n }\n\n if (this.s.appendSubHtmlTo !== '.lg-sub-html') {\n _this.addHtml(index);\n }\n\n _this.$slide.eq(index).addClass('lg-loaded');\n }\n\n _this.$slide.eq(index).find('.lg-object').on('load.lg error.lg', function() {\n\n // For first time add some delay for displaying the start animation.\n var _speed = 0;\n\n // Do not change the delay value because it is required for zoom plugin.\n // If gallery opened from direct url (hash) speed value should be 0\n if (delay && !$('body').hasClass('lg-from-hash')) {\n _speed = delay;\n }\n\n setTimeout(function() {\n _this.$slide.eq(index).addClass('lg-complete');\n _this.$el.trigger('onSlideItemLoad.lg', [index, delay || 0]);\n }, _speed);\n\n });\n\n // @todo check load state for html5 videos\n if (_isVideo && _isVideo.html5 && !_hasPoster) {\n _this.$slide.eq(index).addClass('lg-complete');\n }\n\n if (rec === true) {\n if (!_this.$slide.eq(index).hasClass('lg-complete')) {\n _this.$slide.eq(index).find('.lg-object').on('load.lg error.lg', function() {\n _this.preload(index);\n });\n } else {\n _this.preload(index);\n }\n }\n\n //}\n };\n\n /**\n * @desc slide function for lightgallery\n ** Slide() gets call on start\n ** ** Set lg.on true once slide() function gets called.\n ** Call loadContent() on slide() function inside setTimeout\n ** ** On first slide we do not want any animation like slide of fade\n ** ** So on first slide( if lg.on if false that is first slide) loadContent() should start loading immediately\n ** ** Else loadContent() should wait for the transition to complete.\n ** ** So set timeout s.speed + 50\n <=> ** loadContent() will load slide content in to the particular slide\n ** ** It has recursion (rec) parameter. if rec === true loadContent() will call preload() function.\n ** ** preload will execute only when the previous slide is fully loaded (images iframe)\n ** ** avoid simultaneous image load\n <=> ** Preload() will check for s.preload value and call loadContent() again accoring to preload value\n ** loadContent() <====> Preload();\n\n * @param {Number} index - index of the slide\n * @param {Boolean} fromTouch - true if slide function called via touch event or mouse drag\n * @param {Boolean} fromThumb - true if slide function called via thumbnail click\n * @param {String} direction - Direction of the slide(next/prev)\n */\n Plugin.prototype.slide = function(index, fromTouch, fromThumb, direction) {\n\n var _prevIndex = this.$outer.find('.lg-current').index();\n var _this = this;\n\n // Prevent if multiple call\n // Required for hsh plugin\n if (_this.lGalleryOn && (_prevIndex === index)) {\n return;\n }\n\n var _length = this.$slide.length;\n var _time = _this.lGalleryOn ? this.s.speed : 0;\n\n if (!_this.lgBusy) {\n\n if (this.s.download) {\n var _src;\n if (_this.s.dynamic) {\n _src = _this.s.dynamicEl[index].downloadUrl !== false && (_this.s.dynamicEl[index].downloadUrl || _this.s.dynamicEl[index].src);\n } else {\n _src = _this.$items.eq(index).attr('data-download-url') !== 'false' && (_this.$items.eq(index).attr('data-download-url') || _this.$items.eq(index).attr('href') || _this.$items.eq(index).attr('data-src'));\n\n }\n\n if (_src) {\n $('#lg-download').attr('href', _src);\n _this.$outer.removeClass('lg-hide-download');\n } else {\n _this.$outer.addClass('lg-hide-download');\n }\n }\n\n this.$el.trigger('onBeforeSlide.lg', [_prevIndex, index, fromTouch, fromThumb]);\n\n _this.lgBusy = true;\n\n clearTimeout(_this.hideBartimeout);\n\n // Add title if this.s.appendSubHtmlTo === lg-sub-html\n if (this.s.appendSubHtmlTo === '.lg-sub-html') {\n\n // wait for slide animation to complete\n setTimeout(function() {\n _this.addHtml(index);\n }, _time);\n }\n\n this.arrowDisable(index);\n\n if (!direction) {\n if (index < _prevIndex) {\n direction = 'prev';\n } else if (index > _prevIndex) {\n direction = 'next';\n }\n }\n\n if (!fromTouch) {\n\n // remove all transitions\n _this.$outer.addClass('lg-no-trans');\n\n this.$slide.removeClass('lg-prev-slide lg-next-slide');\n\n if (direction === 'prev') {\n\n //prevslide\n this.$slide.eq(index).addClass('lg-prev-slide');\n this.$slide.eq(_prevIndex).addClass('lg-next-slide');\n } else {\n\n // next slide\n this.$slide.eq(index).addClass('lg-next-slide');\n this.$slide.eq(_prevIndex).addClass('lg-prev-slide');\n }\n\n // give 50 ms for browser to add/remove class\n setTimeout(function() {\n _this.$slide.removeClass('lg-current');\n\n //_this.$slide.eq(_prevIndex).removeClass('lg-current');\n _this.$slide.eq(index).addClass('lg-current');\n\n // reset all transitions\n _this.$outer.removeClass('lg-no-trans');\n }, 50);\n } else {\n\n this.$slide.removeClass('lg-prev-slide lg-current lg-next-slide');\n var touchPrev;\n var touchNext;\n if (_length > 2) {\n touchPrev = index - 1;\n touchNext = index + 1;\n\n if ((index === 0) && (_prevIndex === _length - 1)) {\n\n // next slide\n touchNext = 0;\n touchPrev = _length - 1;\n } else if ((index === _length - 1) && (_prevIndex === 0)) {\n\n // prev slide\n touchNext = 0;\n touchPrev = _length - 1;\n }\n\n } else {\n touchPrev = 0;\n touchNext = 1;\n }\n\n if (direction === 'prev') {\n _this.$slide.eq(touchNext).addClass('lg-next-slide');\n } else {\n _this.$slide.eq(touchPrev).addClass('lg-prev-slide');\n }\n\n _this.$slide.eq(index).addClass('lg-current');\n }\n\n if (_this.lGalleryOn) {\n setTimeout(function() {\n _this.loadContent(index, true, 0);\n }, this.s.speed + 50);\n\n setTimeout(function() {\n _this.lgBusy = false;\n _this.$el.trigger('onAfterSlide.lg', [_prevIndex, index, fromTouch, fromThumb]);\n }, this.s.speed);\n\n } else {\n _this.loadContent(index, true, _this.s.backdropDuration);\n\n _this.lgBusy = false;\n _this.$el.trigger('onAfterSlide.lg', [_prevIndex, index, fromTouch, fromThumb]);\n }\n\n _this.lGalleryOn = true;\n\n if (this.s.counter) {\n $('#lg-counter-current').text(index + 1);\n }\n\n }\n _this.index = index;\n\n };\n\n /**\n * @desc Go to next slide\n * @param {Boolean} fromTouch - true if slide function called via touch event\n */\n Plugin.prototype.goToNextSlide = function(fromTouch) {\n var _this = this;\n var _loop = _this.s.loop;\n if (fromTouch && _this.$slide.length < 3) {\n _loop = false;\n }\n\n if (!_this.lgBusy) {\n if ((_this.index + 1) < _this.$slide.length) {\n _this.index++;\n _this.$el.trigger('onBeforeNextSlide.lg', [_this.index]);\n _this.slide(_this.index, fromTouch, false, 'next');\n } else {\n if (_loop) {\n _this.index = 0;\n _this.$el.trigger('onBeforeNextSlide.lg', [_this.index]);\n _this.slide(_this.index, fromTouch, false, 'next');\n } else if (_this.s.slideEndAnimatoin && !fromTouch) {\n _this.$outer.addClass('lg-right-end');\n setTimeout(function() {\n _this.$outer.removeClass('lg-right-end');\n }, 400);\n }\n }\n }\n };\n\n /**\n * @desc Go to previous slide\n * @param {Boolean} fromTouch - true if slide function called via touch event\n */\n Plugin.prototype.goToPrevSlide = function(fromTouch) {\n var _this = this;\n var _loop = _this.s.loop;\n if (fromTouch && _this.$slide.length < 3) {\n _loop = false;\n }\n\n if (!_this.lgBusy) {\n if (_this.index > 0) {\n _this.index--;\n _this.$el.trigger('onBeforePrevSlide.lg', [_this.index, fromTouch]);\n _this.slide(_this.index, fromTouch, false, 'prev');\n } else {\n if (_loop) {\n _this.index = _this.$items.length - 1;\n _this.$el.trigger('onBeforePrevSlide.lg', [_this.index, fromTouch]);\n _this.slide(_this.index, fromTouch, false, 'prev');\n } else if (_this.s.slideEndAnimatoin && !fromTouch) {\n _this.$outer.addClass('lg-left-end');\n setTimeout(function() {\n _this.$outer.removeClass('lg-left-end');\n }, 400);\n }\n }\n }\n };\n\n Plugin.prototype.keyPress = function() {\n var _this = this;\n if (this.$items.length > 1) {\n $(window).on('keyup.lg', function(e) {\n if (_this.$items.length > 1) {\n if (e.keyCode === 37) {\n e.preventDefault();\n _this.goToPrevSlide();\n }\n\n if (e.keyCode === 39) {\n e.preventDefault();\n _this.goToNextSlide();\n }\n }\n });\n }\n\n $(window).on('keydown.lg', function(e) {\n if (_this.s.escKey === true && e.keyCode === 27) {\n e.preventDefault();\n if (!_this.$outer.hasClass('lg-thumb-open')) {\n _this.destroy();\n } else {\n _this.$outer.removeClass('lg-thumb-open');\n }\n }\n });\n };\n\n Plugin.prototype.arrow = function() {\n var _this = this;\n this.$outer.find('.lg-prev').on('click.lg', function() {\n _this.goToPrevSlide();\n });\n\n this.$outer.find('.lg-next').on('click.lg', function() {\n _this.goToNextSlide();\n });\n };\n\n Plugin.prototype.arrowDisable = function(index) {\n\n // Disable arrows if s.hideControlOnEnd is true\n if (!this.s.loop && this.s.hideControlOnEnd) {\n if ((index + 1) < this.$slide.length) {\n this.$outer.find('.lg-next').removeAttr('disabled').removeClass('disabled');\n } else {\n this.$outer.find('.lg-next').attr('disabled', 'disabled').addClass('disabled');\n }\n\n if (index > 0) {\n this.$outer.find('.lg-prev').removeAttr('disabled').removeClass('disabled');\n } else {\n this.$outer.find('.lg-prev').attr('disabled', 'disabled').addClass('disabled');\n }\n }\n };\n\n Plugin.prototype.setTranslate = function($el, xValue, yValue) {\n // jQuery supports Automatic CSS prefixing since jQuery 1.8.0\n if (this.s.useLeft) {\n $el.css('left', xValue);\n } else {\n $el.css({\n transform: 'translate3d(' + (xValue) + 'px, ' + yValue + 'px, 0px)'\n });\n }\n };\n\n Plugin.prototype.touchMove = function(startCoords, endCoords) {\n\n var distance = endCoords - startCoords;\n\n if (Math.abs(distance) > 15) {\n // reset opacity and transition duration\n this.$outer.addClass('lg-dragging');\n\n // move current slide\n this.setTranslate(this.$slide.eq(this.index), distance, 0);\n\n // move next and prev slide with current slide\n this.setTranslate($('.lg-prev-slide'), -this.$slide.eq(this.index).width() + distance, 0);\n this.setTranslate($('.lg-next-slide'), this.$slide.eq(this.index).width() + distance, 0);\n }\n };\n\n Plugin.prototype.touchEnd = function(distance) {\n var _this = this;\n\n // keep slide animation for any mode while dragg/swipe\n if (_this.s.mode !== 'lg-slide') {\n _this.$outer.addClass('lg-slide');\n }\n\n this.$slide.not('.lg-current, .lg-prev-slide, .lg-next-slide').css('opacity', '0');\n\n // set transition duration\n setTimeout(function() {\n _this.$outer.removeClass('lg-dragging');\n if ((distance < 0) && (Math.abs(distance) > _this.s.swipeThreshold)) {\n _this.goToNextSlide(true);\n } else if ((distance > 0) && (Math.abs(distance) > _this.s.swipeThreshold)) {\n _this.goToPrevSlide(true);\n } else if (Math.abs(distance) < 5) {\n\n // Trigger click if distance is less than 5 pix\n _this.$el.trigger('onSlideClick.lg');\n }\n\n _this.$slide.removeAttr('style');\n });\n\n // remove slide class once drag/swipe is completed if mode is not slide\n setTimeout(function() {\n if (!_this.$outer.hasClass('lg-dragging') && _this.s.mode !== 'lg-slide') {\n _this.$outer.removeClass('lg-slide');\n }\n }, _this.s.speed + 100);\n\n };\n\n Plugin.prototype.enableSwipe = function() {\n var _this = this;\n var startCoords = 0;\n var endCoords = 0;\n var isMoved = false;\n\n if (_this.s.enableSwipe && _this.doCss()) {\n\n _this.$slide.on('touchstart.lg', function(e) {\n if (!_this.$outer.hasClass('lg-zoomed') && !_this.lgBusy) {\n e.preventDefault();\n _this.manageSwipeClass();\n startCoords = e.originalEvent.targetTouches[0].pageX;\n }\n });\n\n _this.$slide.on('touchmove.lg', function(e) {\n if (!_this.$outer.hasClass('lg-zoomed')) {\n e.preventDefault();\n endCoords = e.originalEvent.targetTouches[0].pageX;\n _this.touchMove(startCoords, endCoords);\n isMoved = true;\n }\n });\n\n _this.$slide.on('touchend.lg', function() {\n if (!_this.$outer.hasClass('lg-zoomed')) {\n if (isMoved) {\n isMoved = false;\n _this.touchEnd(endCoords - startCoords);\n } else {\n _this.$el.trigger('onSlideClick.lg');\n }\n }\n });\n }\n\n };\n\n Plugin.prototype.enableDrag = function() {\n var _this = this;\n var startCoords = 0;\n var endCoords = 0;\n var isDraging = false;\n var isMoved = false;\n if (_this.s.enableDrag && _this.doCss()) {\n _this.$slide.on('mousedown.lg', function(e) {\n if (!_this.$outer.hasClass('lg-zoomed') && !_this.lgBusy && !$(e.target).text().trim()) {\n e.preventDefault();\n _this.manageSwipeClass();\n startCoords = e.pageX;\n isDraging = true;\n\n // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723\n _this.$outer.scrollLeft += 1;\n _this.$outer.scrollLeft -= 1;\n\n // *\n\n _this.$outer.removeClass('lg-grab').addClass('lg-grabbing');\n\n _this.$el.trigger('onDragstart.lg');\n }\n });\n\n $(window).on('mousemove.lg', function(e) {\n if (isDraging) {\n isMoved = true;\n endCoords = e.pageX;\n _this.touchMove(startCoords, endCoords);\n _this.$el.trigger('onDragmove.lg');\n }\n });\n\n $(window).on('mouseup.lg', function(e) {\n if (isMoved) {\n isMoved = false;\n _this.touchEnd(endCoords - startCoords);\n _this.$el.trigger('onDragend.lg');\n } else if ($(e.target).hasClass('lg-object') || $(e.target).hasClass('lg-video-play')) {\n _this.$el.trigger('onSlideClick.lg');\n }\n\n // Prevent execution on click\n if (isDraging) {\n isDraging = false;\n _this.$outer.removeClass('lg-grabbing').addClass('lg-grab');\n }\n });\n\n }\n };\n\n Plugin.prototype.manageSwipeClass = function() {\n var _touchNext = this.index + 1;\n var _touchPrev = this.index - 1;\n if (this.s.loop && this.$slide.length > 2) {\n if (this.index === 0) {\n _touchPrev = this.$slide.length - 1;\n } else if (this.index === this.$slide.length - 1) {\n _touchNext = 0;\n }\n }\n\n this.$slide.removeClass('lg-next-slide lg-prev-slide');\n if (_touchPrev > -1) {\n this.$slide.eq(_touchPrev).addClass('lg-prev-slide');\n }\n\n this.$slide.eq(_touchNext).addClass('lg-next-slide');\n };\n\n Plugin.prototype.mousewheel = function() {\n var _this = this;\n _this.$outer.on('mousewheel.lg', function(e) {\n\n if (!e.deltaY) {\n return;\n }\n\n if (e.deltaY > 0) {\n _this.goToPrevSlide();\n } else {\n _this.goToNextSlide();\n }\n\n e.preventDefault();\n });\n\n };\n\n Plugin.prototype.closeGallery = function() {\n\n var _this = this;\n var mousedown = false;\n this.$outer.find('.lg-close').on('click.lg', function() {\n _this.destroy();\n });\n\n if (_this.s.closable) {\n\n // If you drag the slide and release outside gallery gets close on chrome\n // for preventing this check mousedown and mouseup happened on .lg-item or lg-outer\n _this.$outer.on('mousedown.lg', function(e) {\n\n if ($(e.target).is('.lg-outer') || $(e.target).is('.lg-item ') || $(e.target).is('.lg-img-wrap')) {\n mousedown = true;\n } else {\n mousedown = false;\n }\n\n });\n\n _this.$outer.on('mousemove.lg', function() {\n mousedown = false;\n });\n\n _this.$outer.on('mouseup.lg', function(e) {\n\n if ($(e.target).is('.lg-outer') || $(e.target).is('.lg-item ') || $(e.target).is('.lg-img-wrap') && mousedown) {\n if (!_this.$outer.hasClass('lg-dragging')) {\n _this.destroy();\n }\n }\n\n });\n\n }\n\n };\n\n Plugin.prototype.destroy = function(d) {\n\n var _this = this;\n\n if (!d) {\n _this.$el.trigger('onBeforeClose.lg');\n $(window).scrollTop(_this.prevScrollTop);\n }\n\n\n /**\n * if d is false or undefined destroy will only close the gallery\n * plugins instance remains with the element\n *\n * if d is true destroy will completely remove the plugin\n */\n\n if (d) {\n if (!_this.s.dynamic) {\n // only when not using dynamic mode is $items a jquery collection\n this.$items.off('click.lg click.lgcustom');\n }\n\n $.removeData(_this.el, 'lightGallery');\n }\n\n // Unbind all events added by lightGallery\n this.$el.off('.lg.tm');\n\n // destroy all lightGallery modules\n $.each($.fn.lightGallery.modules, function(key) {\n if (_this.modules[key]) {\n _this.modules[key].destroy();\n }\n });\n\n this.lGalleryOn = false;\n\n clearTimeout(_this.hideBartimeout);\n this.hideBartimeout = false;\n $(window).off('.lg');\n $('body').removeClass('lg-on lg-from-hash');\n\n if (_this.$outer) {\n _this.$outer.removeClass('lg-visible');\n }\n\n $('.lg-backdrop').removeClass('in');\n\n setTimeout(function() {\n if (_this.$outer) {\n _this.$outer.remove();\n }\n\n $('.lg-backdrop').remove();\n\n if (!d) {\n _this.$el.trigger('onCloseAfter.lg');\n }\n _this.$el.focus();\n\n }, _this.s.backdropDuration + 50);\n };\n\n $.fn.lightGallery = function(options) {\n return this.each(function() {\n if (!$.data(this, 'lightGallery')) {\n $.data(this, 'lightGallery', new Plugin(this, options));\n } else {\n try {\n $(this).data('lightGallery').init();\n } catch (err) {\n console.error('lightGallery has not initiated properly');\n }\n }\n });\n };\n\n $.fn.lightGallery.modules = {};\n\n})();\n\n\n}));\n"],"sourceRoot":""}