$(function() 
{
	// read in the interval
	var interval = $("div.slideframe").attr('title');
	
	// if no interval supplied, use the default
	if(interval == '')
	{
		interval = 6000;
	}
	
	// just show the first one
	$('.slideshow img').hide();
	$('.slidecaptions div').hide();
	
	$('.slideframe').css('visibility', 'visible');
	$('.slideframe').css('display', 'block');
	
	$('.slideshow :first-child').show();
	$('.slidecaptions :first-child').show();
	
	setInterval(function()
	{
  		$('.slideshow :first-child').fadeOut().next('img').fadeIn()
  			.end().appendTo('.slideshow');
  		$('.slidecaptions :first-child').fadeOut().next('div').fadeIn()
  			.end().appendTo('.slidecaptions');
  	}, interval);
});
