$(document).ready(function(){
// macht aus Tabellen gestreifte Tabellen
// benoetigt jQuery und jQuery.color
	$("table.striped tbody tr").not("table.striped_intern").mouseover( function() {
		$(this).animate({backgroundColor: "#cce1eb"}, {queue:false, duration:350 });
	}).mouseout( function() {
		if($(this).attr("class") == "odd" || $(this).attr("class") == "odd klappbar") {
			$(this).animate({backgroundColor: "#FFFFFF"}, { queue:false, duration:350});
		} else {
			$(this).animate({backgroundColor: "#ebe1bc"}, { queue:false, duration:350});
		}
	});
	
	// fuellt leere TDs, da sonst der IE kein Border setzen kann
	$("table.striped tbody tr td.spacer:empty").text(" ");
	
	// macht die Tabelle im zebrastyle
	$("table.striped tbody").not("table.striped_intern").children("tr:odd").addClass("odd");
	$("table.striped tbody").not("table.striped_intern").children("tr:even").addClass("even");

// ############################
// Accordion-Effekt fuer interne Tabellen
	
	$("table.striped_intern").hide();
	$("table.striped_intern").parent("td").css('padding', '0');	// entfernt den 3px padding
	$("table.striped_intern").parent().parent().prev().addClass("klappbar").click(function(){
		// $(this) ist der angeklickte TR-Tag
		
		// klappe alle sichtbaren Elemente ein und entferne beim tr td die klasse active
		$("table.striped_intern").hide();
		$("table.striped_intern").removeClass("active").parent().parent().prev().children("td:first-child").removeClass("arrowactive").addClass("arrowinactive");
		
		// fahre aus
		$(this).next().children("td:first").children("table:first").addClass("test").show();
		
		// setze klasse aktiv fuer aktuelles h3
		$(this).children("td:first").removeClass("arrowinactive");
		$(this).children("td:first").addClass("arrowactive");
	}).children("td:first-child").addClass("arrowinactive");
	$("table.striped_intern").parent().parent().css('background-color', '#fff');



	
// ############################
// Accordion-Effekt fuer H3
	
	$("div.divAccordion h3.accordionHeadline:first").addClass("active");
	$("div.divAccordion div.accordionContent:not(:first)").hide();

	$("div.divAccordion h3.accordionHeadline").click(function(){
		// klappe alle sichtbaren Elemente ein und entferne bei h3 die klasse active
		$("div.divAccordion h3.accordionHeadline").siblings("div.accordionContent:visible").slideUp("slow").prev().removeClass("active");
		// fahre aus
		$(this).next("div.accordionContent").slideToggle("slow");
		// setze klasse aktiv fuer aktuelles h3
		$(this).toggleClass("active");
	});
  // fuer downloadbereich extra implementiert
  $("div.downloadArea div.divAccordionDownload div.accordionContent").hide();
	$("div.downloadArea div.divAccordionDownload h3.accordionHeadline").each(function(){
    if ($(this).hasClass("active")) {
      $(this).parent().find('div.accordionContent').show();
    }
  });
	$("div.downloadArea div.divAccordionDownload h3.accordionHeadline").click(function(){
		// klappe alle sichtbaren Elemente ein und entferne bei h3 die klasse active
		$("div.downloadArea div.divAccordionDownload h3.accordionHeadline").siblings("div.accordionContent:visible").slideUp("slow").prev().removeClass("active");
		// fahre aus
		$(this).next("div.accordionContent").slideToggle("slow");
		// setze klasse aktiv fuer aktuelles h3
		$(this).toggleClass("active");
	});



// ############################
// Info-Bar-Hoehe mindestens 120px
	
	if ($("#infoBar").height() < 120) {
		$("#infoBar").css('height', '120px');
	}
	
	if ($("#infoBarStart #infoBar").height() < 121) {
		$("#infoBarStart #infoBar").css('height', '120px');
	}
	
});










/*
// macht aus Tabellen gestreifte Tabellen
// benoetigt jQuery und jQuery.color
$(document).ready( function() {
	$("table.striped tbody tr").mouseover( function() {
		$(this).animate({backgroundColor: "#cce1eb"}, {queue:false, duration:350 });
	}).mouseout( function() {
		if($(this).attr("class") == "odd") {
			$(this).animate({backgroundColor: "#FFFFFF"}, { queue:false, duration:350});
		} else {
			$(this).animate({backgroundColor: "#ebe1bc"}, { queue:false, duration:350});
		}
	});
	
	// fuellt leere TDs, da sonst der IE kein Border setzen kann
	$("table.striped tbody tr td.spacer:empty").text(" ");
	
	// macht die Tabelle im zebrastyle
	//$("table.striped tbody tr:odd").addClass("odd");
	$("table.striped tbody tr:even").addClass("even");
});
// Accordion-Effekt
$(document).ready(function(){
	
	$("div.divAccordion h3.accordionHeadline:first").addClass("active");
	$("div.divAccordion div.accordionContent:not(:first)").hide();

	$("div.divAccordion h3.accordionHeadline").click(function(){
		// klappe alle sichtbaren Elemente ein und entferne bei h3 die klasse active
		$("div.divAccordion h3.accordionHeadline").siblings("div.accordionContent:visible").slideUp("slow").prev().removeClass("active");
		// fahre aus
		$(this).next("div.accordionContent").slideToggle("slow");
		// setze klasse aktiv fuer aktuelles h3
		$(this).toggleClass("active");
	});

});

*/

