



$(function(){

	$.each( rennbahnen[2], function(k, v){
		$('<option/>').val(k).text(v).appendTo('#standort');
	});

	
	$('#neuesklein').mouseover(function(e) {
		$(this).css('color','#FF1B03');
	})
	$('#neuesklein').mouseout(function(e) {
		$(this).css('color','#333333');
	})
	$('#fuss > span').mouseover(function(e) {
		$(this).css('color','#FF1B03');
	})
	$('#fuss > span').mouseout(function(e) {
		$(this).css('color','#333333');
	})
	$('#fuss2 > span').mouseover(function(e) {
		$(this).css('color','#FF1B03');
	})
	$('#fuss2 > span').mouseout(function(e) {
		$(this).css('color','#bbbbbb');
	})


	$('#neuesklein').click(function(e) {
		$('.text:visible').fadeOut('slow');
		$('#neues2').fadeIn('slow');
	})
	$('#fuss > span').click(function(e) {
		if (this.id=='forum') {
			window.location.href = "http://forum.virtual-galopp-se.de/";
		} else {
			$('.text:visible').fadeOut('slow');
			$('#'+this.id+'2').fadeIn('slow');
		}
	})
	$('#fuss2 > span').click(function(e) {
		$('.text:visible').fadeOut('slow');
		$('#'+this.id+'2').fadeIn('slow');
	})
	$('#button > p').click(function(e) {
		$('.text:visible').fadeOut('slow');
		$('#registrierung2').fadeIn('slow');
	})
	$('.regbutton').click(function(e) {
		$('.text:visible').fadeOut('slow');
		$('#registrierung2').fadeIn('slow');
	})
	$('#servernr').change(function() {
		var nummer=$('#servernr option:selected').val();
		$('#standort').empty();
		$.each( rennbahnen[nummer], function(k, v){
			$('<option/>').val(k).text(v).appendTo('#standort');
		});
	});

	$('#s1').click(function(e) {
		$('#screenshots2 > .screen').hide();
		$('#screenshots2 > #screen1').show();
		$('#screenshots2').show();
	})
	$('#s2').click(function(e) {
		$('#screenshots2 > .screen').hide();
		$('#screenshots2 > #screen2').show();
		$('#screenshots2').show();
	})
	$('#s3').click(function(e) {
		$('#screenshots2 > .screen').hide();
		$('#screenshots2 > #screen3').show();
		$('#screenshots2').show();
	})
	$('#s4').click(function(e) {
		$('#screenshots2 > .screen').hide();
		$('#screenshots2 > #screen4').show();
		$('#screenshots2').show();
	})
	$('#s5').click(function(e) {
		$('#screenshots2 > .screen').hide();
		$('#screenshots2 > #screen5').show();
		$('#screenshots2').show();
	})
	$('#s6').click(function(e) {
		$('#screenshots2 > .screen').hide();
		$('#screenshots2 > #screen6').show();
		$('#screenshots2').show();
	})
	$('#screenshots2 > .schliessen').click(function(e) {
		$('#screenshots2').hide();
	})
	
	
	if (fehler==1) {
		$('#wasistvirtualgalopp2').hide();
	}
	
	if (registrierung==1) {
		$('#wasistvirtualgalopp2').hide();
		$('#registrierung2').show();
	}
	

});



