sourceImages = new Array();
mouseOverImages = new Array();


function animate13() {

	//hide and transform zeltdiv
	var loginTransform = new Fx.Styles('logindiv', {duration: 1000, transition: Fx.Transitions.linear}); 
	 
	loginTransform.start({
		'opacity': [0.0, 1.0]
	});
}

function animate12() {
	var showContent = new Fx.Styles('galeriediv', {duration: 200}).addEvent('onComplete', animate13);
	showContent.start({
	    'opacity': [0.0, 1.0]
	});
}

function animate11() {
	var showContent = new Fx.Styles('pressediv', {duration: 200}).addEvent('onComplete', animate12);
	showContent.start({
	    'opacity': [0.0, 1.0]
	});
}

function animate10() {
	var showContent = new Fx.Styles('finanzendiv', {duration: 200}).addEvent('onComplete', animate11);
	showContent.start({
	    'opacity': [0.0, 1.0] 
	});
}

function animate9() {
	var showContent = new Fx.Styles('tourneediv', {duration: 200}).addEvent('onComplete', animate10);
	showContent.start({
	    'opacity': [0.0, 1.0] 
	});
}

function animate8() {
	var showContent = new Fx.Styles('veranstalterdiv', {duration: 200}).addEvent('onComplete', animate9);
	showContent.start({
	    'opacity': [0.0, 1.0]
	});
}

function animate7() {
	var showContent = new Fx.Styles('projektdiv', {duration: 200}).addEvent('onComplete', animate8);
	showContent.start({
	    'opacity': [0.0, 1.0]
	});
}

function animate6() {
	var showContent = new Fx.Styles('artistendiv', {duration: 200}).addEvent('onComplete', animate7);
	showContent.start({
	    'opacity': [0.0, 1.0]
	});
}

function animate5() {
	var showContent = new Fx.Styles('kontaktdiv', {duration: 200}).addEvent('onComplete', animate6);
	showContent.start({
	    'opacity': [0.0, 1.0]
	});
}

function animate4() {
	var showContent = new Fx.Styles('gwundrigesdiv', {duration: 200}).addEvent('onComplete', animate5);
	showContent.start({
	    'opacity': [0.0, 1.0]
	});
}

function animate3() {
	   
	    
	var showContent = new Fx.Styles('contentdiv', {duration: 1000}).addEvent('onComplete', animate4);
	showContent.start({
	    'opacity': [0.0, 1.0]
	});

}

function animate2() {
	//zelt ausblenden
	$('zelt').setStyle('visibility', 'hidden');

	//alter body color
	var bgColorChange = new Fx.Style("templatebody", "background-color", {duration:200}).addEvent('onComplete', animate3);
	bgColorChange.start('#6ccff6');

	var showFooter = new Fx.Styles('footerdiv', {duration: 1000});
	showFooter.start({
	    'opacity': [0.0, 1.0]
	});	
}

function animate() {

	//hide and transform zeltdiv
	var zeltTransform = new Fx.Styles('zelt', {duration: 2000, transition: Fx.Transitions.linear}).addEvent('onComplete', animate2); 
	 
	zeltTransform.start({
		'height': [500,128],
		'width': [700,160],
		'top': [0,400],  
		'left': [50,640], 
		'opacity': 0.0
	});
}


function preloadImage(id, category) {
	sourceImages[id] = new Image();
	sourceImages[id].src = "assets/templates/wuplu/"+category+"/"+id+".gif";
	mouseOverImages[id] = new Image();
	mouseOverImages[id].src = "assets/templates/wuplu/"+category+"/"+id+"_mo.gif";
}

function preloadImages(category) {
	preloadImage("projekt", category);
	preloadImage("tournee", category);
	preloadImage("veranstalter", category);
	preloadImage("artisten", category);
	preloadImage("finanzen", category);
	preloadImage("presse", category);
	preloadImage("gwundriges", category);
	preloadImage("kontakt", category);
	preloadImage("galerie", category);
	

	setTimeout(animate, 5000);
}



function showMouseOver(id) {
	if (mouseOverImages[id].src !== null) {
    	document.getElementById(id).src = mouseOverImages[id].src;
    }
}

function showOriginal(id) {
	if (sourceImages[id].src !== null) {
		document.getElementById(id).src = sourceImages[id].src; 
	}
}





















