$(document).ready(function(){
	
	//Fix Errors - http://www.learningjquery.com/2009/01/quick-tip-prevent-animation-queue-buildup/
	
	//Remove outline from links
	
	
	var offHeight = "15px";
	
	$.each(["Projects", "Company"], function () {
		
		var h = 37;
		$(".nav" + this + " ul li").each(function () {
			h += ($(this).height() || 0) + 4;
		});
		
		$(".nav" + this).mouseover(function(){
			$(this).stop().animate({height:h + "px"},{queue:false, duration:600, easing: 'easeOutBounce'})
		});
	
		$(".nav" + this).mouseout(function(){
			$(this).stop().animate({height:offHeight},{queue:false, duration:600, easing: 'easeOutBounce'})
		}); 
	});
	
	
	// assume the info panel is fixed width?
	$("#infoPanel").mouseover(function(){
		$(this).stop().animate({width:'544px'},{queue:false, duration:600, easing: 'easeInQuint'})
	});

	//When mouse is removed
	$("#infoPanel").mouseout(function(){
		$(this).stop().animate({width:'20px'},{queue:false, duration:600, easing: 'easeOutQuint'})
	});

	
});