function initSlideshow(options) {

	var left = 0;

	$(options.panel).each(function(i, el) {
		$(this).css('left', left);

		var width = $(this).width();
		left = left + width;
	});

	$(options.navContainer).find('a').click(slideshow_selectSlide);

	var $panels    = $(options.panel);
	//var $container = $('#gm_RandomBadgeSlideshow_container');
	var $scroll    = $(options.scroll);

	var offset = 0;

	var scrollOptions = {
		target: $scroll, // the element that has the overflow

		// can be a selector which will be relative to the target
		items: $panels,

		navigation: options.navContainer + ' a',

		// allow the scroll effect to run both directions
		axis: 'xy',

		onAfter: function(data) {
			// within the .navigation element, find the A element
			// whose href ends with ID ($= is ends with)
			var el = $(options.navContainer).find('a[href$="' + data.id + '"]').get(0);

			// we're passing the actual element, and not the jQuery instance.
			slideshow_selectSlide.call(el);
		}, // our final callback

		offset: offset,

		// duration of the sliding effect
		duration: 500,

		// easing - can be used with the easing plugin:
		// http://gsgd.co.uk/sandbox/jquery/easing/
		easing: 'swing',
		
		// autoplay
		interval: 3000,
		force: true
	};

	$(options.mainContainer).serialScroll(scrollOptions);
	$(options.navContainer).localScroll(scrollOptions);

}
