//var $j = jQuery.noConflict();

$(document).ready(function() {

	//Höhe der Subnav berechnen
	$('DIV.navipunkt').each(function() {
		hoehe = 0;
			$(this).children('DIV.dropdown').children('A').each(function() {
				hoehe = hoehe + parseFloat($(this).height()) + 10;
			});
			$(this).children('DIV.dropdown').children('A.a-subsub').each(function() {
				hoehe = hoehe - 10;
			});
			$(this).attr('alt',hoehe);
	});
	

	$('DIV.navipunkt').hover (
	
		// Bei MouseOver
		function() {
		
			diesehoehe = $(this).attr('alt');
		
			$(this).children('DIV.dropdown').css("border","1px solid #CCCCCC").stop().animate({
							height: diesehoehe,
							paddingTop: 5,
							paddingBottom: 5
						}, 200, function() {
							// Animation complete.
						});
		},
		
		// Bei MouseOut
		function() {
			$(this).children('DIV.dropdown').stop().animate({
							height: 0,
							paddingTop: 0,
							paddingBottom: 0
						}, 200, function() {
							// Animation complete.
							$(this).css("border","0px solid #CCCCCC");
						});
						
		}		
	);

	
	//Scrollbar-Padding-Problem im Seiteninhalt
	$(function() {
		innerheightleft = 0;
		$('DIV.left').children(".csc-default").each(function() {
			innerheightleft = innerheightleft + parseFloat($(this).height());
		});
		
		if(innerheightleft < '380'){
			$('DIV.left').css("width","320px");
		}
		
		innerheightright = 0;
		$('DIV.rightcontent').children(".csc-default").each(function() {
			innerheightright = innerheightright + parseFloat($(this).height());
		});
		
		if(innerheightright < '400'){
			$('DIV.rightcontent').css("width","320px");
		}
		
	});
	
	$(function() {
		$("DIV.csc-default:last-child").css("padding-bottom","30px");
	});


});
