(function(a){a.fn.jqPhotoSwipe=function(d){var g={};var e={};g.galleries=[];g.galleriesindex=[];var f=0;var b='<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true"><div class="pswp__bg"></div><div class="pswp__scroll-wrap"><div class="pswp__container"><div class="pswp__item"></div><div class="pswp__item"></div><div class="pswp__item"></div></div><div class="pswp__ui pswp__ui--hidden"><div class="pswp__top-bar"><div class="pswp__counter"></div><button class="pswp__button pswp__button--close" title="Close (Esc)"></button><button class="pswp__button pswp__button--share" title="Share"></button><button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button><button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button><div class="pswp__preloader"><div class="pswp__preloader__icn"><div class="pswp__preloader__cut"><div class="pswp__preloader__donut"></div></div></div></div></div><div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap"><div class="pswp__share-tooltip"></div> </div><button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"></button><button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button><div class="pswp__caption"><div class="pswp__caption__center"></div></div></div></div></div>';var c=$(b).appendTo("body")[0];this.each(function(){var h=$.extend(e,d);var k=$(this);var j=k.data("fancybox-group");if(!j){j="singleimage"+(Math.random()*(9999999-1)+1);k.data("fancybox-group",j)}if(g.galleriesindex.indexOf(j)===-1){f=g.galleriesindex.length;g.galleriesindex.push(j);g.galleries[f]={};g.galleries[f].items=[];g.galleries[f].i=0}else{f=g.galleriesindex.indexOf(j)}var i=f;k.data("i",g.galleries[f].i);g.galleries[i].items.push({src:k.attr("href"),title:k.attr("title"),w:0,h:0});k.off("click").on("click",function(m){var l=$(this).data("i");h.index=l;g.galleries[i].obj=new PhotoSwipe(c,PhotoSwipeUI_Default,g.galleries[i].items,h);g.galleries[i].obj.init();g.galleries[i].obj.listen("imageLoadComplete",function(n,o){if(o.w==0&&o.h==0){var p=new Image();p.onload=function(){o.w=this.width;o.h=this.height;g.galleries[i].obj.invalidateCurrItems();g.galleries[i].obj.updateSize(true)};p.src=o.src}});return false});g.galleries[f].i++});return g}})(jQuery);

/*!
jqPhotoSwipe v0.1 - jQuery for PhotoSwipe
https://ergec.github.io/jQuery-for-PhotoSwipe/
*/
(function(a){a.fn.jqPhotoSwipe=function(d){var g={};var e={};g.galleries=[];g.galleriesindex=[];var f=0;var b='<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true"><div class="pswp__bg"></div><div class="pswp__scroll-wrap"><div class="pswp__container"><div class="pswp__item"></div><div class="pswp__item"></div><div class="pswp__item"></div></div><div class="pswp__ui pswp__ui--hidden"><div class="pswp__top-bar"><div class="pswp__counter"></div><button class="pswp__button pswp__button--close" title="Close (Esc)"></button><button class="pswp__button pswp__button--share" title="Share"></button><button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button><button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button><div class="pswp__preloader"><div class="pswp__preloader__icn"><div class="pswp__preloader__cut"><div class="pswp__preloader__donut"></div></div></div></div></div><div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap"><div class="pswp__share-tooltip"></div> </div><button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"></button><button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button><div class="pswp__caption"><div class="pswp__caption__center"></div></div></div></div></div>';var c=$(b).appendTo("body")[0];this.each(function(){var h=$.extend(e,d);var k=$(this);var j=k.data("fancybox-group");if(!j){j="singleimage"+(Math.random()*(9999999-1)+1);k.data("fancybox-group",j)}if(g.galleriesindex.indexOf(j)===-1){f=g.galleriesindex.length;g.galleriesindex.push(j);g.galleries[f]={};g.galleries[f].items=[];g.galleries[f].i=0}else{f=g.galleriesindex.indexOf(j)}var i=f;k.data("i",g.galleries[f].i);g.galleries[i].items.push({src:k.attr("href"),title:k.attr("title"),w:0,h:0});k.off("click").on("click",function(m){var l=$(this).data("i");h.index=l;g.galleries[i].obj=new PhotoSwipe(c,PhotoSwipeUI_Default,g.galleries[i].items,h);g.galleries[i].obj.init();g.galleries[i].obj.listen("imageLoadComplete",function(n,o){if(o.w==0&&o.h==0){var p=new Image();p.onload=function(){o.w=this.width;o.h=this.height;g.galleries[i].obj.invalidateCurrItems();g.galleries[i].obj.updateSize(true)};p.src=o.src}});return false});g.galleries[f].i++});return g}})(jQuery);

Update jqPhotoSwipe.min.js