$(document).ready(function(){
		  		//agbs
				$(".agb").each(function(){
					$(this).children().hide();				
				});								
				
				$(".top").each(function(){
					$(this).hide();				
				});		
				
				//$("div.dreispalter div").eq(1).slideToggle("slow");//shows the first div with content
				//$("#agb_navi a").eq(0).addClass("agbhighlight");
				
				$("#agb_navi").children().click(function(){
						var nummer = $(this).attr("rel");
						$(".agb div").slideUp("slow");
						$(this).siblings().removeClass("agbhighlight");
						$(this).parent().parent().siblings().find("div").eq(nummer).pause(600).slideDown("slow");
						$(this).addClass("agbhighlight");
				});	
				
				$("#navi a").hover(
					function() {
							if($(this).attr("class") != "naviactive"){
							 $(this).highlightFade({start: 'rgb(255,255,255)', speed:200,end:'rgb(197,231,238)',iterator:'exponential'});
							 }
						},
						function() {
							if($(this).attr("class") != "naviactive"){
							 $(this).highlightFade({start: 'rgb(197,231,238)', speed:400,end:'rgb(255,255,255)',iterator:'exponential'});
							 }
						});
						
				var relId = parseInt( window.location.hash.substring(2) );
				relId = (relId > -1 && relId < 11) ? relId : 0;	
					
				$("#agb_navi a").eq(relId).click();		
//				$("#agb_navi a[href]").eq(0).click();		
 		  });
