jQuery.extend( jQuery.easing,
{
	def: 'easeOutQuad',
	
	easeInQuad: function (x, t, b, c, d) {
		return c*(t/=d)*t + b;
	},
	easeOutCubic: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t + 1) + b;
	},
	easeInOutQuad: function (x, t, b, c, d) {
	if ((t/=d/2) < 1) return c/2*t*t + b;
	return -c/2 * ((--t)*(t-2) - 1) + b;
	}
		
});
$(function(){	
//MENU HOVER
////////////////////////////////
$('#menu a').hover(
	function(){
		$(this).siblings().stop().animate({ 
		height: '100%' 
		},{duration:200, easing:'easeOutCubic'});
	},
	function(){
		$(this).siblings().stop().animate({ 
		height: '0' 
		},{duration:200, easing:'easeOutCubic'});
	}
);

//SUBMENU SERVIÇOS
////////////////////////////////

var menuServicosHeight=$('#menuServicos').height();

	function fechaMenu(tempo){
		$('#menuServicos').stop().animate({ 
		height: '0px', 
		paddingTop: '0px', 
		paddingBottom: '0px'
		},{duration:tempo, easing:'easeOutCubic'});
	};
	function abreMenu(){
		$('#menuServicos').stop().animate({ 
		height: menuServicosHeight, 
		paddingTop: '20px', 
		paddingBottom: '20px'
		},{duration:700, easing:'easeOutCubic'});
	};
	
	$('#linkServicos').toggle(abreMenu,function(){fechaMenu(700)});
	
	fechaMenu(0);

//ANIMAÇÂO LOGO 
////////////////////////////////
var mTop=$('#logoM').position().top;
var macromindTop=$('#logoMacromind').position().top;

$('#logoM,#logoMacromind').css("top", "65px" );

$('#logoM').animate({ 
top: '0px' 
},{duration:700, easing:'easeOutCubic'});

$('#logoMacromind').delay(400).animate({ 
top: '0px' 
},{duration:700, easing:'easeOutCubic'});

	
});

