var Rules = {
  	rules: "1.0",

	'#linkone:click': function(element, event) {
		show('text2');	
		hide('text1');	
		hide('text3');
		//setTimeout("changeBg()", 1100);
		//changeBg();
		Event.stop(event);
	},

	'#linktwo:click': function(element, event) {
		show('text3');		
		hide('text1');
		hide('text2');
		//Effect.Fade('footer', { duration: 1.0 });
		//setTimeout("changeBg()", 1100);
		changeBg();
		Event.stop(event);
	},

	'#linkthree:click': function(element, event) {
		show('text1');		
		hide('text2');
		hide('text3');	
		//Effect.Fade('footer', { duration: 1.0 });
		//setTimeout("changeBg()", 1100);
		changeBg();
		Event.stop(event);
	}
			
};


function show(element) {
	$(element).style.zIndex = 4;
	$(element).style.opacity = 1;
	$(element).style.filter = "alpha(opacity='100')";
}

function hide(element) {
	$(element).style.zIndex = 3;
	$(element).style.opacity= .3;
	$(element).style.filter = "alpha(opacity='30')";
}


function changeBg() {
	var iRandomnumber = Math.floor(Math.random()*3);
	//Effect.Fade('footer', { duration: 1.0 });
	//$('footer').hide();
	$('footer').style.backgroundImage = "url('img/bg" + iRandomnumber + ".jpg')";
	//Effect.Appear('footer', { duration: 1.0 });
}


function changeImg() {
	Effect.Fade('karte_1', { duration: 1.0 });
	Effect.Appear('karte_2', { duration: 1.0 });
}




