// JavaScript Document
//Coded by Andrew Stanton
//Datz right
function imageSlideshow(){
	
	var photosInShow = "5";
	var currentPhoto = $('#counter').html();
	currentPhoto = parseInt(currentPhoto);
	
	if(currentPhoto == photosInShow){
		var nextPhoto = 1;
		} 
		else{
			var nextPhoto = currentPhoto + 1;
			};
			
			
		var currentSrc = $('.infront img').attr("src");
		var nextSrc = "images/slideshow/picture"+nextPhoto+".jpg";
		
	$('.behind img').attr("src", currentSrc);
	$('.infront').css("display" , "none");
	
	$('.infront img').attr("src", nextSrc);
	$('.infront').fadeIn(800);
	
	$('#counter').html( nextPhoto );
	//!!IMPORTANT!!//
	setTimeout("imageSlideshow()", 4000);
		};
