$(document).ready(function(){ 

	$(".infotext").css({opacity:"0.0"});
	$("#augeinhalt img").css({opacity:"0.08"});

	var textFix = false;
	var fixId = "";
	
	$(".bezeichnung").mouseover(function(){
		if(textFix){
			var kat = $(this).attr('id');
			if(kat!=fixId){
				$(".infotext#"+fixId).animate({opacity:"0.0"}, 150);
				$(".infotext#"+kat).animate({opacity:"1.0"}, 150);	
			};
		} else if (!textFix) {
			$(".infotext").animate({opacity:"0.0"}, 150);
			var kat = $(this).attr('id');
			$(".infotext#"+kat).animate({opacity:"1.0"}, 150);	
		};
	});

	$(".bezeichnung").mouseout(function(){
		if(textFix){
			var kat = $(this).attr('id');
			if(kat!=fixId){
				$(".infotext#"+kat).animate({opacity:"0.0"}, 150);
				$(".infotext#"+fixId).animate({opacity:"1.0"}, 150);
			};
		} else if (!textFix){
			$(".infotext").animate({opacity:"0.0"}, 150);
		};
	});
	
	$(".bezeichnung").click(function(){
		if(textFix){
			var kat = $(this).attr('id');
			if(kat!=fixId){
				textFix = false;
				fixId = $(this).attr('id');
				textFix = true;
				return false;
			} else {
				textFix = false;
				return false;
			};			
		} else if (!textFix) {
			textFix = true;
			fixId = $(this).attr('id');
			return false;
		};
	});

	$(".mail_out").css({display:"none"});
	var Class = "";
	$("a.link").click(function(){
		$(this).next().toggleClass("mail_open");
		Class = $(this).next().attr("class");
		if((Class=="mail_out mail_open")){
			$(".mail_out").slideUp("slow");
			$(".mail_out").removeClass("mail_open");
			$(this).next().slideDown("slow");
			$(this).next().toggleClass("mail_open");
		} else {
			$(this).next().slideUp("slow");
		};
		return false;
	});
	
	
	
	$(".hide").css({display:"none", opacity:"0.0"});
	var first = true;
	var idFix = "";
	
	$("a.jg").click(function(){
		if(first){
			var id = $(this).attr("id");
			$(".hide").css({display:"none", opacity:"0.0"}, 1200);
			$(".hide#"+id).animate({height:"show", opacity:"1.0"}, 1200);
			first = false;
			idFix = id;
			return false;
		} else {
			var id = $(this).attr("id");
			if(id==idFix){
				$(".hide#"+id).animate({height:"show", opacity:"1.0"}, 1200);
				$(".hide").animate({height:"hide", opacity:"0.0"}, 1200);
				idFix = id;
				//$(".hide#"+id).animate({height:"show", opacity:"1.0"}, 1200);
			} else {
				$(".hide").animate({height:"hide", opacity:"0.0"}, 1200);
				$(".hide#"+id).animate({height:"show", opacity:"1.0"}, 1200);
				idFix = id;
			};
			return false;
		}
	});
	
});
// #########################################################################################################################
// #########################################################################################################################
// #########################################################################################################################



