function SlidePics (slide)
{
	
	var total_pics = 11;
	var first = false;
	
	if (slide == 0)
	{
		slide = Math.floor((Math.random()*total_pics) + 1);
		var first = true;
	}
	
	if (first == true)
	{
		$('#slide_pic1').attr('src', 'images/home-pictures/'+slide+'.gif');
		$('#slide_pic1').fadeIn('slow');
	}
	else if ($('#slide_pic2').hasClass('hide'))
	{
		$('#slide_pic2').attr('src', 'images/home-pictures/'+slide+'.gif');
		$('#slide_pic2').removeClass('hide');
		$('#slide_pic1').fadeOut('slow', function() { $('#slide_pic1').attr('src', 'images/blank.gif'); });
	}
	else
	{
		$('#slide_pic1').attr('src', 'images/home-pictures/'+slide+'.gif');
		$('#slide_pic1').fadeIn('slow', function() { $('#slide_pic2').addClass('hide'); $('#slide_pic2').attr('src', 'images/blank.gif'); } );
	}
	
	slide++;
	if (slide > total_pics)
			slide = 1;
	
	setTimeout("SlidePics("+slide+")", 4000);
	
}

$(function() {
	SlidePics(0);
});
