var totalImages = 4; //Total images to animate [number the images as 1.jpg, 2.jpg and so on.]
$(document).ready(function() {
	setTimeout('showAnimation(1)', 2000);
});
function showAnimation(imgNo)
{
	newImage = ((imgNo + 1) > totalImages)? 1: (imgNo + 1);
	$('#hp_gallery').fadeOut(300, function(){
		$(this).css('display', 'none');
		$(this)[0].src = 'graphics/hm_img/'+newImage+'.jpg';
		$(this).fadeIn(1500, function(){
			setTimeout('showAnimation(newImage)', 2000);
		});
	});
}
