www
[scribo] / www / themes / dots / galleria.dots.js
1 /*!
2  * Galleria Dots Theme
3  * http://galleria.aino.se
4  *
5  * Copyright (c) 2010, Aino
6  * Licensed under the MIT license.
7  */
8
9 (function($) {
10
11 Galleria.addTheme({
12     name: 'dots',
13     author: 'Galleria',
14     version: '1.1',
15     css: 'galleria.dots.css',
16     defaults: {
17         transition: 'slide',
18         transition_speed: 500,
19         thumbnails: 'empty',
20         carousel: false,
21         image_crop: false,
22         autoplay: true
23     },
24     init: function(options) {
25         this.$('thumbnails').find('.galleria-image').css('opacity',0.5).hover(function() {
26             $(this).fadeTo(200,1);
27         }, function() {
28             $(this).not('.active').fadeTo(200,.5);
29         });
30         this.$('info').insertAfter(this.target);
31         this.bind(Galleria.LOADSTART, function(e) {
32             if (!e.cached) {
33                 this.$('loader').show().fadeTo(200, .8);
34             }
35             $(e.thumbTarget).parent().stop().css('opacity',1).siblings('.active').css('opacity',0.5)
36         });
37         this.bind(Galleria.LOADFINISH, function(e) {
38             this.$('loader').fadeOut(200);
39         });
40     }
41 });
42
43 })(jQuery);