!function(a){"use strict";a.fn.bsPhotoGallery=function(s){var i=a.extend({},a.fn.bsPhotoGallery.defaults,s),l=function(){for(var a="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",s="",i=0;i<4;i++)s+=a.charAt(Math.floor(Math.random()*a.length));return"bsp-"+s}(),d=i.classes,t=(d.split(" "),{});function M(){return'ul[data-bsp-ul-id="'+t.ulId+'"][data-bsp-ul-index="'+t.ulIndex+'"]'}function e(){a(M()+" li[data-bsp-li-index]").length===t.nextImg?a("a.next").hide():a("a.next").show(),-1===t.prevImg?a("a.previous").hide():a("a.previous").show()}function n(a){return a.replace('"',"").replace("'","").replace('"',"").replace("'","").replace("url(","").replace(")","")}function c(){var s=n(a(this).find(".bspImgWrapper")[0].style.backgroundImage),l=a(this).attr("data-bsp-li-index"),d=a(this).parent("ul").attr("data-bsp-ul-index"),M=a(this).parent("ul").attr("data-bsp-ul-id"),c=a(this).find("p").html();t.img=s,t.prevImg=parseInt(l)-parseInt(1),t.nextImg=parseInt(l)+parseInt(1),t.ulIndex=d,t.ulId=M,a("#bsPhotoGalleryModal").modal();var I="";I+='',I+='',I+='
'+c+"
"),I+="'+d+"
"),a(".bsp-text-container").html(c),t.prevImg=parseInt(i)-1,t.nextImg=parseInt(t.prevImg)+2,a(this).hasClass("previous")?(a(this).attr("href",t.prevImg),a("a.next").attr("href",t.nextImg)):(a(this).attr("href",t.nextImg),a("a.previous").attr("href",t.prevImg)),e(),!1}),a(document).on("hidden.bs.modal","#bsPhotoGalleryModal",function(){a("#bsPhotoGalleryModal .modal-body").html(""),t={}}),function(){if(0!==a("#bsPhotoGalleryModal").length)return!1;var s="";s+=' ',a("body").append(s)}()),this},a.fn.bsPhotoGallery.defaults={classes:"col-xl-2 col-lg-2 col-md-2 col-sm-4",showControl:!0,hasModal:!0,shortText:!0}}(jQuery);