$(document).ready( function() {
	$(".help a[rel]").overlay({top:351, absolute:true});
	$(".question a[rel]").overlay({expose: '#000', top:361, absolute:true});
	$(".form a[rel]").overlay({expose: '#fff', top:275, absolute:true});
	$(".answer a[rel]").overlay({expose: '#000'});
	//$(".add-keyword a[rel]").overlay({expose: '#fff', top:187, absolute:true});
	$(".cat-folders a[rel]").overlay({expose: '#fff', top:570, absolute:true});
	
	
	var topValue = 0;
	
	if($("#contactInfoDiv").height() != null)
		topValue += $("#contactInfoDiv").height();
	if($("#keywordCatDiv").height() != null)
		topValue +=$("#keywordCatDiv").height();
	if($("#keywordEnterDiv").height() != null)
		topValue +=$("#keywordEnterDiv").height();
	
	topValue += $(".folders").height();
    $(".folders a[rel]").overlay({expose: '#fff', top: topValue, absolute:true});
	$("a.toggle").click(function(){
	  $(this).next("div.container-toggle").slideToggle("slow");
	  $(this).toggleClass('toggle-active');
	 });
	$(".navi li a").mouseover(
	  function () {		
		$(this).next().css('display', 'block');
		$(this).next().next().css('display', 'block');
		$(this).next().mouseover(
			function () {
				$(this).prev().addClass('active');
				$(this).css('display', 'block');
				$(this).next().css('display', 'block');
		});
		$(this).next().next().mouseover(
			function () {
				$(this).prev().prev().addClass('active');
				$(this).prev().css('display', 'block');
				$(this).css('display', 'block');
		});
		$(this).next().mouseout(
			function () {
				$(this).prev().removeClass('active');
				$(this).css('display', 'none');
				$(this).next().css('display', 'none');
		});
		$(this).next().next().mouseout(
			function () {
				$(this).prev().prev().removeClass('active');
				$(this).prev().css('display', 'none');
				$(this).css('display', 'none');
		});

		$(this).mouseout(
			function () {
				$(this).next().css('display', 'none');
				$(this).next().next().css('display', 'none');
		});
	  });
	if (!$.browser.msie) $("textarea.autogrow").autogrow();/*not working in IE muss als letztes stehn*/
});





