var img			= 1,
	dir			= 0,
	imgPos		= ["0px","-454px","-908px","-1362px","-1816px"];

// Automatically Cycle the shimmer
function CycleMountains(prevImg)
{	
	if(dir == 0) {img = prevImg + 1;}
	if(dir == 1) {img = prevImg - 1;}
	
	// if we've hit the last image set dir
	if(img == 4) { dir = 1; }
	// if we've hit the first image reset dir
	if(img == 0) { dir = 0; }
	
	// Loop through the images to create a sunrise -> sunset effect
	$('#Hidden').css('background-position', 'center '+imgPos[prevImg]).show();
	$('#MountainCycle').css('background-position', 'center '+imgPos[img]);
	$('#Hidden').fadeOut('slow');
	
	setTimeout('CycleMountains('+img+')', 1000);
}
$(document).ready(function(){
	CycleMountains(img);
});
