// JavaScript Document

function bereich_wechseln(categorie) {
	if (categorie == "load_azubi") { 
		var this_cat = "azubi";
		var other_cat = "un";
		var dir_first = "left";
		var dir_second = "right";
	} else if (categorie == "load_un") { 
		var this_cat = "un";
		var other_cat = "azubi";
		var dir_first = "right";
		var dir_second = "left";
	}
	
	$(document).ready(function() {
		$("span[name="+this_cat+"_header]").toggleClass("header_active_cat");
		$("span[name="+other_cat+"_header").removeClass("header_active_cat");
							   
		$("#navi_scroll_div").hide("slide", {direction: dir_first}, 500, function() { 
			$.get("includes/"+this_cat+"_navi.php", function(text){ 
				$("#navi_scroll_div").html(text).show("slide", {direction: dir_second}, 500, function() {
					window.location.hash = "location="+this_cat+"_start.php";
				});   
			});  
		});
	});
	
	$('#content_var').fadeOut(500, function() {
		$('#content_var').css("margin", "0 0 0 0");
		$('#content_var').load(this_cat+'_start.php #content_var', function() {
			$('#content_var').fadeIn('fast');
		});
	});

}
