jQuery.noConflict();

var size;
var index;

function setAltText()
{
	index = (index + 1) % size;
	var $img = jQuery('#slideshow a:eq(' + index + ') img');
	var html = $img.attr('alt');
	jQuery('#slideshow .caption').html(html);
}

jQuery(document).ready(function()
{
	jQuery('#slideshow .photos').jCarouselLite(
	{
		auto: 3000,
		speed: 500,
		circular: true,
		visible: 1,
		beforeStart: function()
		{
			jQuery('#slideshow .caption').animate({ width: 'toggle' }, 'fast');
		},
		afterEnd: function()
		{
			setAltText();
			jQuery('#slideshow .caption').animate({ width: 'toggle' }, 'fast');
		}
	});
	
	size = 5;
	index = 0;
	setAltText();
});
