File: /home/adventp/www/wp-content/themes/brooklyn/assets/vendor/lightGallery/js/lg-hash.min.js
/*! lightgallery - v1.2.6 - 2015-10-07
* http://sachinchoolur.github.io/lightGallery/
* Copyright (c) 2015 Sachin N; Licensed Apache 2.0 */
(function(d,c,a,f){var e={hash:true};var b=function(g){this.core=d(g).data("lightGallery");this.core.s=d.extend({},e,this.core.s);if(this.core.s.hash){this.oldHash=c.location.hash;this.init()}return this};b.prototype.init=function(){var h=this;var g;h.core.$el.on("onAfterSlide.lg.tm",function(k,j,i){c.location.hash="lg="+h.core.s.galleryId+"&slide="+i});d(c).on("hashchange",function(){g=c.location.hash;var i=parseInt(g.split("&slide=")[1],10);if((g.indexOf("lg="+h.core.s.galleryId)>-1)){h.core.slide(i)}else{if(h.core.lGalleryOn){h.core.destroy()}}})};b.prototype.destroy=function(){if(this.oldHash&&this.oldHash.indexOf("lg="+this.core.s.galleryId)<0){c.location.hash=this.oldHash}else{if(history.pushState){history.pushState("",a.title,c.location.pathname+c.location.search)}else{c.location.hash=""}}};d.fn.lightGallery.modules.hash=b})(jQuery,window,document);