/*!
 * Galleria Dots Theme
 * http://galleria.aino.se
 *
 * Copyright (c) 2010, Aino
 * Licensed under the MIT license.
 */

(function($) {

Galleria.addTheme({
    name: 'dots',
    author: 'Galleria',
    version: '1.1',
    // css: 'galleria.dots.css',
    defaults: {
        transition: 'slide',
        showImagenav: false,
        showCounter: false,
        showInfo: false,
        transition_speed: 600,
        thumbnails: 'empty',
        carousel: false,
        image_crop: false,
        autoplay: 5000
    },
    init: function(options) {
        this.$('info').insertAfter(this.target);
        this.rescale();
        this.bind(Galleria.LOADSTART, function(e) {
            if (!e.cached) {
                this.$('loader').show().fadeTo(200, .5);
            }
            $(e.thumbTarget).parent().stop().addClass('active').siblings('.active').removeClass('active')
        });
        this.bind(Galleria.LOADFINISH, function(e) {
            this.$('loader').fadeOut(200);
        });
    }
});

})(jQuery);
