var images = new Array('gallerySpecA.jpg','gallery1.jpg', 'gallery2.jpg', 'gallery3.jpg', 'gallery4.jpg', 'gallery5.jpg', 'gallery6.jpg', 'gallery7.jpg', 'gallery8.jpg', 'gallery9.jpg' );
var index = 1;

function rotateImage() {
	$('#myImage').fadeOut('fast', function() {
		$(this).attr('src', images[index]);
		$(this).fadeIn('fast', function() {
			if (index == images.length - 1) {
				index = 0;
			}
			else {
				index++;
			}
		});
	});
}

$(document).ready(function() {
    setInterval (rotateImage, 2500);
});
