/*
 *  Slick Carousel - an extension of Carousel
 *
 *  Carousel is freely distributable under the terms of an MIT-style license.
 *  Please visit http://code.google.com/p/mookit/ for more details.
 */
var SlickCarousel = Carousel.extend({
	goto: function(index) {
		var prev = this.activeindex;
		var prevImg = this.menu[prev].getElement('img');
		
		if (prevImg) {
			prevImg.setProperty("src", this.options.menu_img_off);
		}
		
		this.menu[prev].removeClass('active');
		this.menu[prev].addClass('inactive');
		
		this.menu[index].removeClass('inactive');
		this.menu[index].addClass('active');

		var nextImg = this.menu[index].getElement('img');
		if (nextImg) {
			nextImg.setProperty("src", this.options.menu_img_on);
		}
		
		this.parent(index);

	}  // end goto()

}); // end SlickCarousel