	var aImages = new Array();
	var aArtists = new Array();
	var aURL = new Array();
	var aInfo = new Array();
	var iPrev = -1;
	var iRnd = -1;
	var vWait;

	aImages[0] = "/slides/slide-01.jpg";
	aImages[1] = "/slides/slide-02.jpg";
	aImages[2] = "/slides/slide-03.jpg";
	aImages[3] = "/slides/slide-04.jpg";
	aImages[4] = "/slides/slide-05.jpg";
	aImages[5] = "/slides/slide-06.jpg";
	aImages[6] = "/slides/slide-07.jpg";
	aImages[7] = "/slides/slide-08.jpg";
	aImages[8] = "/slides/slide-09.jpg";
	aImages[9] = "/slides/slide-10.png";
	aImages[10] = "/slides/slide-11.jpg";
	aImages[11] = "/slides/slide-12.jpg";
	aImages[12] = "/slides/slide-13.jpg";
	aImages[13] = "/slides/slide-14.jpg";
	aImages[14] = "/slides/slide-15.jpg";
	aImages[15] = "/slides/slide-16.jpg";

	aArtists[0] = "Image/Styling by Sketch360";
	aArtists[1] = "Photography by Liam Dobson";
	aArtists[2] = "Image/Styling by Sketch360";
	aArtists[3] = "Art by Nick Hamilton";
	aArtists[4] = "Image/Styling by Sketch3600";
	aArtists[5] = "Art by Astrom Chang";
	aArtists[6] = "Photography by Liam Dobson";
	aArtists[7] = "Image/Styling by Sketch360";
	aArtists[8] = "Image/Styling by Sketch360";
	aArtists[9] = "Sketch360 Gicl&#233;e Printing";
	aArtists[10] = "Image/Styling by Sketch360";
	aArtists[11] = "Art by Paul Bywater";
	aArtists[12] = "The studio at Sketch360";
	aArtists[13] = "Image/Styling by Sketch360";
	aArtists[14] = "Image/Styling by Sketch360";
	aArtists[15] = "Image/Styling by Sketch360";

	aURL[0] = "http://www.sketch360.com/photography.php";
	aURL[1] = "http://citystreetsphotography.com";
	aURL[2] = "";
	aURL[3] = "http://www.thehammo.com/tag/hammo/";
	aURL[4] = "";
	aURL[5] = "";
	aURL[6] = "http://citystreetsphotography.com";
	aURL[7] = "";
	aURL[8] = "";
	aURL[9] = "http://www.sketch360.com/giclee.php";
	aURL[10] = "";
	aURL[11] = "http://www.somethingtodowithdeath.com";
	aURL[12] = "http://www.sketch360.com/photography.php";
	aURL[13] = "http://www.sketch360.com/photography.php";
	aURL[14] = "http://www.sketch360.com/photography.php";
	aURL[15] = "http://www.sketch360.com/photography.php";

	aInfo[0] = "Sketch360";
	aInfo[1] = "City Streets Photography";
	aInfo[2] = "Sketch360";
	aInfo[3] = "TheHammo.com";
	aInfo[4] = "Sketch360";
	aInfo[5] = "";
	aInfo[6] = "City Streets Photography";
	aInfo[7] = "Sketch360";
	aInfo[8] = "Sketch360";
	aInfo[9] = "Sketch360";
	aInfo[10] = "Sketch360";
	aInfo[11] = "STDWD.com";
	aInfo[12] = "Sketch360";
	aInfo[13] = "Sketch360";
	aInfo[14] = "Sketch360";
	aInfo[15] = "Sketch360";



$(document).ready(function() {

	/* Define the function that triggers to fade in the background */
	$("img#bg").load(function()
		{
			/* Fade in during 3 seconds */
			$("img#bg").fadeTo(3000,1);

			/* Animate the picture description during 1 second */
			setTimeout(function()
				{
					$("#image_description").animate({right: '+=150'}, 1000)
				}, 1000);

			/* Set the timeout to fade out after 10 seconds*/
			setTimeout(function()
				{
					$("#image_description").animate({right: '-=150'}, 1000);
					$("img#bg").fadeOut(2000);

					/* Load the next image after 4 seconds */
					setTimeout(LoadImages,3000);
				},20000);
		});

	/* Start the slideshow one second after the page is ready */
	setTimeout(LoadImages,1000);

});

function LoadImage(iNr)
{

	/* Assign the new image to the background */
	$("img#bg").attr("src", aImages[iNr]);

	/* Assign the artist name to the description */
	$("#image_artist").html(aArtists[iNr]);

	/* Assign the image url to the description */
	$("a#image_url").attr("href", aURL[iNr]);
	$("a#image_url").attr("target", "blank");
	$("a#image_url").html(aInfo[iNr]);

};

function LoadImages()
{

	/* Select a new random image number */
	while(iPrev == iRnd)
	{
		iRnd = Math.floor(Math.random()*aImages.length);
	}

	/* Show the selected image */
	LoadImage(iRnd);

	iPrev = iRnd;

};
