

var currentImg = 0;
var animating = false;
var numPhotos = 7;

var gotoImage = function(targetImg) {
	// Check if no animation is running. If it is, prevent the action

	
	if (currentImg != targetImg) {
		if ( targetImg < numPhotos) {

			$('#background' + currentImg).fadeOut(750);
			$('#background' + targetImg).fadeIn(750);
			currentImg = targetImg;
			
		}
	}
	
};


$(document).ready(function() {
	
	$('#backgrounds img:gt(0)').hide();
	
	
});


