// change these paths for your images
var curimg=1;
var seconds_between_photos=6;
function changeImage () {
	newim=curimg+1;
	if (newim==5){newim=1;}
	
	$("#a"+curimg).fadeOut(200, function () {
		curimg=newim;								 
		$("#a"+curimg).fadeIn(200);
	});

}

function checkForLoaded () {
		//alert("loaded");
		clearInterval(timer);
		changeImage();
		timer = setInterval(changeImage, (seconds_between_photos * 1000));
}

// check every second to see if DIV exists, when it does, start photo changing timer

