in themes/lucene/static/javascript/lucene/slides.js [3:28]
initialize: function(element, options) {
this.options = {
Duration: 1,
Delay: 10.0,
Random: true,
Slideshow:true,
Controls:true
}
Object.extend(this.options, options || {});
this.element = $(element);
this.slides = this.element.childElements();
this.num_slides = this.slides.length;
this.current_slide = (this.options.Random) ? (Math.floor(Math.random()*this.num_slides)) : 0;
this.end_slide = this.num_slides - 1;
this.slides.invoke('hide');
this.slides[this.current_slide].show();
if (this.options.Slideshow) {
this.startSlideshow();
}
if (this.options.Controls) {
this.addControls();
}
},