$(document).ready(function() {
	$(function() {
		// Tabs
		/* 
		if ($("#tabs")) {
			var i = 1;
			$("#tabs ul li").each(function() {
				$(this).href = "#tabs-" + i;
				i++;
			});
		}
		 */
		$("#tabs").tabs({
			event: 'mouseover'
		});
	});
	
	$(function() {
		// Accordion
		$("#accordion").accordion({ header: "h3" });
	});
	
	/* Rollover horizontale Menüs */
	$("li.nav_h").hover(
	// Roll in
	function() {
		$("#navi_horizontal_sub ul").each(function() {
			$(this).css("display","none");
			$(this).removeClass("navi_horizontal_visible");
		});
		$("li.nav_h").each(function() {
			$(this).attr("id", "");
		});
		var index = ($("li.nav_h").index(this))+1;
		$(this).attr("id", "navi_h_marker");
		$("#nav_hs_" + index).css("display","block");
		// Fade in
		$("#nav_hs_" + index).css("opacity","0");
		$("#nav_hs_" + index).animate({"opacity": "1"}, "slow");
	},
	// Roll out
	function() {
	});
	
	/* Verlassen der Horizontalen Nav */
	$("#navi_horizontal_container").hover(
	// Roll in
	function() {
	},
	// Roll out
	function() {
		// Alles ausblenden
		$("#navi_horizontal_sub ul").each(function() {
			$(this).css("display","none");
		});
		$("li.nav_h").each(function() {
			$(this).attr("id", "");
		});
		// Default Eintrag der Seite markieren
		if (show_sub != 0)
		{
			$("li.nav_h")[show_sub-1].id = "navi_h_marker";
			$("#nav_hs_" + show_sub).css("display","block");
		}
	});
});
