// CLASS DEFINITION
function slideShow(){
	this.currentImageNum=0;
	this.totalSlideCount=0;
	this.slides=0;

	this.onBefore = function(curr, next, opts) {
		if (!opts.addSlide)
			return; 
		this.currentImageNum++; 
	
		if (this.currentImageNum == this.totalSlideCount) { 
			// final slide in our slide slideshow is about to be displayed 
			// so there are no more to fetch 
			opts.addSlide = null; 
			return; 
		} 
	
		// add our next slide 
		opts.addSlide(this.slides[this.currentImageNum]);
	}
}