/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

var slideshow = {
	init: function(carouselPanelId, controlPanelId, sideInterval, buttonOnClass, rotateAction, autoPlay) {

		if ($chk($(carouselPanelId))) {
		    new SimpleCarousel(carouselPanelId, $$('#' + carouselPanelId + ' img'),$$('#' + controlPanelId + ' a'), {
			    'slideInterval': sideInterval,
			    'buttonOnClass': buttonOnClass,
			    'rotateAction': rotateAction,
			    'autoplay': autoPlay
		    });
		}
	}
}

var slideshow_extender = {
	init: function(carouselPanelId, controlPanelId, nextPreviousControlId, sideInterval, buttonOnClass, rotateAction, autoPlay) {

		if ($chk($(carouselPanelId))) {
		    new SimpleCarouselExtender(carouselPanelId, $$('#' + carouselPanelId + ' img'),$$('#' + controlPanelId + ' a'), $$('#' + nextPreviousControlId + ' a'), {
			    'slideInterval': sideInterval,
			    'buttonOnClass': buttonOnClass,
			    'rotateAction': rotateAction,
			    'autoplay': autoPlay
		    });
		}
	}
}

var slideshow_with_content = {
	init: function(carouselPanelId, controlPanelId, contentContainerId, nextPreviousControlId, sideInterval, buttonOnClass, rotateAction, autoPlay) {
		var controlPanelElements = null;
		if (controlPanelId != '') {
			controlPanelElements = $$('#' + controlPanelId + ' a');
		}

		if ($chk($(carouselPanelId))) {
		    new SimpleCarouselWithHtmlContentOverlay(carouselPanelId, $$('#' + carouselPanelId + ' img'),controlPanelElements, $$('#' + contentContainerId + ' div'), $$('#' + nextPreviousControlId + ' a'), {
			    'slideInterval': sideInterval,
			    'buttonOnClass': buttonOnClass,
			    'rotateAction': rotateAction,
			    'autoplay': autoPlay
		    });
		}
	}
}
