var interval = 10000; // Zeit in ms zwischen Bildwechsel
var duration = 1800; // Dauer Fade in ms 

$(function() {

	if(Images.length > 0) {
		setInterval("changeImage()", interval);
		
		$(Images).each(function(Key, Image) {
			if (Key == 0)  {
				$("#head img:first").replaceWith("<img src='" + Image + "' style='position: absolute; top: 0px; left: 0px; width:960px; height:212px;' />");
			}
			else {
				$("#head").append("<img src='" + Image + "' style='position: absolute; top: 0px; left: 0px; width:960px; height:212px; display: none' />");
			}
		});
	}
	
});

var current = 1;
var pos = 0;

function changeImage() {
	if (current == Images.length)
		current = 0;
		
	$('#head').children(":nth(" + current + ")").hide().css("z-index", pos).fadeIn(duration);
		
	pos++;
	current++;
}