$(function() {
	/*
	**
	** Untermenues auf- und zuklappen
	**
	*/	
	$("#menu li:has(ul) > a").toggle(
        function () {
			$(this).next("ul").show();
        },function(){
			$(this).next("ul").hide();
	});	
	
	/*
	** 
	** Aktuellen Menuepunkt markieren
	**
	*/		
	$('#menu li#' + window.jsonVars['activeMenu'] + ' a').attr('class', 'active');	
	$('#menu li#' + window.jsonVars['activeMenu']).parent('ul').show();
	$('.login li#' + window.jsonVars['activeMenu'] + ' a').attr('class', 'active');
	
	/*
	**
	** Seitenhilfe auf-und zuklappen
	**
	*/
	$("a#show-help").click(
        function () {
			$('div#instruction').show();
			$('a#hide-help').show();
			$('a#show-help').hide();
			return false;
        });
	$("a#hide-help").click(
        function () {			
			$('div#instruction').hide();
			$('a#hide-help').hide();
			$('a#show-help').show();
			return false;
		});
	
	/*
	**
	** Mindesthoehe definieren
	**
	*/	
	/*
	var minheight = $(window).height() - $('#header').height();
	if (minheight > $('#container3').height()) $('#container3').height(minheight);	
	$(window).resize(function(){
  		var minheight = $(window).height() - $('#header').height();
		if (minheight > $('#container3').height()) $('#container3').height(minheight);	
		
	});
	*/
		
	
 });