﻿var demo = new Class({
    initialize: function() {
        this.el = $('show');
        // We attach our event listener to each of the demos.
        $$('#demos li').each(function(li, i) {
            li.set('events', { 'click': this.start.pass(i + 1, this) });
        }, this)
        // Start our default demo.
        this.start();
    },

    start: function(p) {
    var data = {};
        if (this.show)
            this.show.destroy('empty');        
        this.show = new Slideshow.KenBurns(this.el, null, { captions: true, controller: false, delay: 4000, duration: 1000, height: 290, hu: 'images/', thumbnails: false, width: 510, zoom: 0 });                                                  
    }
})

window.addEvent("domready", function() {
    window.demo = new demo()
});
