-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgalleria.showroom.min.js
2 lines (2 loc) · 1.84 KB
/
galleria.showroom.min.js
1
2
/*! ShowroomGalleriaTheme - v1.0.19 - 2014-06-17 - MIT License */
(function(i){Galleria.addTheme({name:"showroom",author:"Galleria",css:"galleria.showroom.min.css?v1.0.19",defaults:{initialTransition:"fade",transition:"slide",thumbCrop:"height",responsive:!0,thumbnails:!0,_toggleInfo:!0},init:function(t){Galleria.requires(1.33,"This version of the showroom theme requires Galleria 1.3.3 or later"),t.responsive&&this.$("container").addClass("galleria-responsive"),this.addElement("info-link","info-close"),this.append({info:["info-link","info-close"]}),this.append({stage:"info"}),this.append({container:"image-nav"});var n=this.$("info-link,info-close,info-text"),s=Galleria.TOUCH;this.$("loader,counter").show().css("opacity",.4),s||this.addIdleState(this.get("counter"),{opacity:0}),t._toggleInfo===!0?n.bind("click:fast",function(){n.toggle()}):(n.show(),this.$("info-link, info-close").hide()),t.thumbnails===!1?this.$("container").addClass("no-thumbnails"):"numbers"===t.thumbnails?this.$("container").addClass("with-numeric-thumbnails"):this.$("container").addClass("with-thumbnails"),this.bind("thumbnail",function(t){s?i(t.thumbTarget).css("opacity",this.getIndex()?1:.6).bind("click:fast",function(){i(this).css("opacity",1).parent().siblings().children().css("opacity",.6)}):(i(t.thumbTarget).css("opacity",.6).parent().hover(function(){i(this).not(".active").children().stop().fadeTo(100,1)},function(){i(this).not(".active").children().stop().fadeTo(400,.6)}),t.index===this.getIndex()&&i(t.thumbTarget).css("opacity",1))});var e=function(t){i(t.thumbTarget).css("opacity",1).parent().siblings().children().css("opacity",.6)};this.bind("loadstart",function(i){i.cached||this.$("loader").show().fadeTo(200,.4),window.setTimeout(function(){e(i)},s?300:0),this.$("info").toggle(this.hasInfo())}),this.bind("loadfinish",function(){this.$("loader").fadeOut(200)})}})})(jQuery);