// JavaScript Document

$(function() {
		   
	//Examples of how to assign the ColorBox event to elements
	$("a[rel='colorbox']").colorbox();
	$("a[rel='example2']").colorbox({transition:"fade"});
	$("a[rel='example3']").colorbox({transition:"none", width:"75%", height:"75%"});
	$("a[rel='example4']").colorbox({slideshow:true});
	$(".single").colorbox({}, function(){
		alert('Howdy, this is an example callback.');
	});
	$(".colorbox").colorbox();
	$(".youtube").colorbox({iframe:true, width:650, height:550});
	$(".iframe").colorbox({width:"80%", height:"80%", iframe:true});
	$(".inline").colorbox({width:"50%", inline:true, href:"#inline_example1"});
	
	//Example of preserving a JavaScript event for inline calls.
	$("#click").click(function(){ 
		$('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
		return false;
	});
	
	// Kein Border-Bottom bei der letzten Zeile einer Tabelle
	$("table tr:last td").css("border","none");

	// Fragen und Antworten
	$("dl dd").hide();
	 
	 $("dl dt").click(function(){
         $(this).toggleClass('open').next('dd').slideToggle();
      });
	 
	 $(".show-all").click(function(){
         $('dd:not(.open)').toggle();
    });
	 
	// Navigation Hover
	$("ul#navigation li:not(.active) ul").hide();
	
	$('#navigation>li:not(.active)').hover(
	  function() {
		$(this).find('>ul').stop().height('auto').slideDown(); // the height('auto') prevents the menu from memorizing an incorrect height-value forever when leaving the menu while the animation is running
	  },
	  function() {
		$(this).find('>ul').stop().slideUp('50');
	  }
	);

	// Header Animation
	$("#scroller").simplyScroll({
		autoMode: 'loop',
		pauseOnHover: false
	});
	
	// Ganzer Block clickable in Download-Liste
	/*$(".list-downloads li").click(function(){
	  window.location=$(this).find("a").attr("href"); return false;
	});*/




});
