/*! lg-hash - v1.0.4 - 2017-12-20 * http://sachinchoolur.github.io/lightgallery * copyright (c) 2017 sachin n; licensed gplv3 */ !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jquery)}(this,function(a){!function(){"use strict";var b={hash:!0},c=function(c){return this.core=a(c).data("lightgallery"),this.core.s=a.extend({},b,this.core.s),this.core.s.hash&&(this.oldhash=window.location.hash,this.init()),this};c.prototype.init=function(){var b,c=this;c.core.$el.on("onafterslide.lg.tm",function(a,b,d){history.replacestate?history.replacestate(null,null,window.location.pathname+window.location.search+"#lg="+c.core.s.galleryid+"&slide="+d):window.location.hash="lg="+c.core.s.galleryid+"&slide="+d}),a(window).on("hashchange.lg.hash",function(){b=window.location.hash;var a=parseint(b.split("&slide=")[1],10);b.indexof("lg="+c.core.s.galleryid)>-1?c.core.slide(a,!1,!1):c.core.lgalleryon&&c.core.destroy()})},c.prototype.destroy=function(){this.core.s.hash&&(this.oldhash&&this.oldhash.indexof("lg="+this.core.s.galleryid)<0?history.replacestate?history.replacestate(null,null,this.oldhash):window.location.hash=this.oldhash:history.replacestate?history.replacestate(null,document.title,window.location.pathname+window.location.search):window.location.hash="",this.core.$el.off(".lg.hash"))},a.fn.lightgallery.modules.hash=c}()});