$(document).ready(function(){
	
	if ( $("#uk").length > 0 ) {
	
	 $("#uk").click(function () { 
	window.location.href="../en/index.html";
    }); 
	
	}

	if ( $("#de").length > 0 ) {
	
	 $("#de").click(function () { 
	window.location.href="../de/index.html";
    }); 
	
	}
	

  

	$('#menubox ul li a').each(function(){
		if(document.title==this.innerHTML){
			$(this).removeClass('normal').addClass('aktivmenupunkt').css('backgroundColor','#00647a');
		}
	});
	$('#menubox ul li').bind('mouseover',function(){
		$(this).children('ul').css('display','block');
	});
	$('#menubox ul li').bind('mouseout',function(){
		$(this).children('ul').css('display','none');
	});
	$('#menubox ul li ul').siblings().each(function(){
		$(this).addClass('unterpunkte');
	});
	$('.button').bind('mouseover',function(){
		this.style.cursor='pointer';
	});
	$('.button').bind('mouseout',function(){
		this.style.cursor='default';
	});
	$('#de').bind('click',global.translate);
	$('#uk').bind('click',global.translate);
	//$('#ilabel').click(switch_img);




function switch_img(){
	var bild = $("#header").css('backgroundImage');
	bild = bild.split('/');
	bild = bild[(bild.length-1)];
	bild = bild.replace('.jpg','');
	bild = bild.replace('"','');
	bild = bild.replace(')','');
	if(bild=="head"){
		$("#header").removeClass().addClass('i1');
		$('#ilabel').empty().append('Variante 1');
	}
	if(bild=="head1"){
		$("#header").removeClass().addClass('i2');
		$('#ilabel').empty().append('Variante 2');
	}
	if(bild=="head2"){
		$("#header").removeClass().addClass('i3');
		$('#ilabel').empty().append('Variante 3');
	}
	if(bild=="head3"){
		$("#header").removeClass().addClass('i4');
		$('#ilabel').empty().append('Variante 4');
	}
	if(bild=="head4"){
		$("#header").removeClass().addClass('i5');
		$('#ilabel').empty().append('Variante 5');
	}
	if(bild=="head5"){
		$("#header").removeClass().addClass('i6');
		$('#ilabel').empty().append('Variante 6');
	}
	if(bild=="head6"){
		$("#header").removeClass().addClass('i7');
		$('#ilabel').empty().append('Variante 7');
	}
	if(bild=="head7"){
		$("#header").removeClass().addClass('i8');
		$('#ilabel').empty().append('Variante 8');
	}
	if(bild=="head8"){
		$("#header").removeClass().addClass('i9');
		$('#ilabel').empty().append('Variante 9');
	}
	if(bild=="head9"){
		$("#header").removeClass().addClass('i10');
		$('#ilabel').empty().append('Variante 10');
	}
	if(bild=="head10"){
		$("#header").removeClass().addClass('i11');
		$('#ilabel').empty().append('Variante 11');
	}
	if(bild=="head11"){
		$("#header").removeClass().addClass('i12');
		$('#ilabel').empty().append('Variante 12');
	}
	if(bild=="head12"){
		$("#header").removeClass().addClass('i13');
		$('#ilabel').empty().append('Variante 13');
	}
	if(bild=="head13"){
		$("#header").removeClass().addClass('i0');
		$('#ilabel').empty().append('Variante 0');
	}
}


});


