$(function(){
	$(document).ready(function(){
		$("header nav ul li").animate({ 'top' : '-20px' }, 0);
		
		$("header nav ul .current-menu-item").animate({ 'top' : '0' }, 0).css("background", '#000');
		$("header nav ul .current-menu-ancestor").animate({ 'top' : '0' }, 0).css("background", '#000');
		
		var f_height = $("footer").height();
		var c_height = f_height + 10
		$("#container").css({'padding-bottom' : c_height });
	
		$("#news_start_wrapper a:nth-child(1)").css({'margin-right' : '10px'});
	});
});

$(function(){
	$(document).ready(function(){
		var portlet_start_container_height = $("#portlet_start_container").height();
		$("#portlet_start_container .wrapper_con").css({'height' : portlet_start_container_height/2 });
		$("#portlet_start_container .portlet_start").css({'height' : portlet_start_container_height/2 });
		
		$("#portlet_start_container .portlet_start").hover(function(){
			$(this).children(".wrapper").stop().animate({ top: -portlet_start_container_height/2}, 200);
		}, function (){
			$(this).children(".wrapper").stop().animate({ top: 0}, 200);
		});
	});
});

$(function(){
	$("header nav ul li").hover(function(){
		$(this).stop().animate({ top: '0'}, 200);
		$(this).css("background", '#000');
	}, function (){
		$(this).stop().animate({ top: '-20px'}, 300);
		$(this).css("background", '#ff0000');
	});
	$("header nav ul .current-menu-item").hover(function(){
		$(this).stop().animate({ top: '0'}, 0);
	}, function (){
		$(this).stop().animate({ top: '0'}, 0);
		$(this).css("background", '#000');
	});
	$("header nav ul .current-menu-ancestor").hover(function(){
		$(this).stop().animate({ top: '0'}, 0);
	}, function (){
		$(this).stop().animate({ top: '0'}, 0);
		$(this).css("background", '#000');
	});
});

$(function(){
	$(document).ready(function(){
		var NewsStartWrapper = $("#news_start_wrapper").height()-1;
		$("#news_start_wrapper .wrapper_con").css({'height' : NewsStartWrapper/2 });
		$(".news_start").css({'height' : NewsStartWrapper/2});
		
		$(".news_start").hover(function(){
			$(this).children(".wrapper").stop().animate({ top: -NewsStartWrapper/2-20}, 200);
		}, function (){
			$(this).children(".wrapper").stop().animate({ top: 0}, 200);
		});
	});
});
