/* Request ID: cde7c9791aa8b9762e8561722dee811b (03/28/2024 12:44pm) (JctBDsAgCAXRG8mRGmuJ0HyDAVuuX5OuZjF5JDaYYI9fHJSZxYAmUcw7zeeEtkPWAEFfTqlgWsKbNHOmXgF23TJ0zP3+lDs+) */ /* Resource ID: 709a038efe4e3d75e644d850157 (simple.js, minified by uglifyjs) (03/21/2024 8:54am) (A:9849, G:5022, K:5022) */ (function(m){m.widget("lw.lwGallerySimple",{options:{maxThumbHeight:100,speedPerThumb:100},_create:function(){var t=this.element,e=t.children(":first"),i=e.outerWidth(),h=this.options,s=this,l=m(".lw_gallery_image",e),r=l.find("img"),n=m(".lw_thumbs_wrapper",e),a=m(".lw_gallery_thumbnails",n),o=a.children();this.origThumbWidth=o.eq(0).outerWidth(true);this.$widget=e;this.$image=l;this.$thumb_wrapper=n;this.$thumb_list=a;this.$thumbs=o;this.$caption=m(".lw_gallery_caption",e);m('').on("load",function(){r.wrap('
');r.width(e.outerWidth()).height("auto");s.$image.width(r.width()).height(r.height())});this.$selected=o.eq(0).addClass("lw_gallery_selected");e.on("click",".lw_gallery_thumbnails a",function(t){t.preventDefault();s.selectThumb(m(this));return true});this.$thumb_wrapper.find(".controls").filter(".prev").hide();a.imagesLoaded(function(){s.size();var t=Math.floor(e.find(".lw_slideshow_interval").text());if(t>=100)s.enableSlideshow(t);m(window).resize(function(){s._onEventStop(function(){s.size()},500)})})},size:function(){var h=this.options,t=this.$thumbs.eq(0),s=0,l=0;this.$thumbs.each(function(){var t=m(this),e=t.find("> a > img"),i=e.height();if(i>h.maxThumbHeight){t.width("auto");e.height(h.maxThumbHeight).width("auto");i=h.maxThumbHeight}if(i>s){s=i}l+=t.outerWidth(true)});l-=t.outerWidth(true)-t.width();this.$thumb_wrapper.css("height",s);this.initSliderScroll(l);this.$image.width(this.$widget.width()).find("img").width(this.$widget.width())},selectThumb:function(t){var e=t.attr("href"),i=t.siblings(".lw_gallery_thumbcaption").val(),h=t.siblings(".lw_image_title").val(),s=t.siblings(".lw_gallery_thumbcredit").val();if(i&&i.length>0){i=i.replace(/<([^>]+)="(.*?)"([^>]*)>/gi,'<$1="$2"$3>')}s=s!==" "?"Photo Credit: "+s:"";if(this.$selected&&this.$selected.length){this.$selected.removeClass("lw_gallery_selected")}this.$selected=t.parent().addClass("lw_gallery_selected");this.showImage(e,i,h,s)},showImage:function(t,e,i,h){var s=this.$widget,l=m(''),r=m.Deferred(),n=m.Deferred(),a=this,o,d;o=this.$image.children(".lw_loaded_image").clone().addClass("new").hide().appendTo(this.$image);d=o.find("img").removeAttr("width").removeAttr("height").removeAttr("srcset").width(this.$image.width()).height("auto").attr("src",t);o.show().imagesLoaded(function(){s.find(".lw_gallery_caption").find("h2").text(i).end().find("span").html(e).end().find(".lw_gallery_credit").text(h);r.resolve()});a.$image.children(".lw_loaded_image:not(.new)").fadeOut("fast",function(){m(this).remove();l.appendTo(a.$image);n.resolve()});m.when(r.promise(),n.promise()).then(function(){a.$image.height(d.height()).children(".lw_loaded_image").removeClass("new");l.remove()})},initSliderScroll:function(t){var e=this,i=this.options,h=this.$thumb_wrapper.find(".controls"),s=h.filter(".prev"),l=h.filter(".next"),r=this.thumbWidth+this.marginWidth,n=t-this.$thumb_wrapper.width(),a=this.$thumbs.length*this.options.speedPerThumb,o=0,d;if(this.$thumb_wrapper.width()