 $(document).ready(function() {          
        $("ul.blockeasing li.main").mouseover(function(){ //When mouse over ...
        	   //Following event is applied to the subnav itself (making height of subnav 300px)
		      $(this).find('.subnav')
			  .css('display', 'block')
			  .addClass('on-top')
			  .stop().animate({height: '300px', opacity:'1'},{queue:false, duration:1000, easing: 'easeOutBack'});
		});
	
	    $("ul.blockeasing li.main").mouseout(function(){ //When mouse out ...
	          //Following event is applied to the subnav itself (making height of subnav 0px)
		      $(this).find('.subnav')
			 // .css('display', 'none')
			  .removeClass("on-top")
			  .stop().animate({height:'0px', opacity:'0'},{queue:false, duration:600, easing: 'easeOutBack'});
		});

          	
        //menu itembackground color animation			
		$("ul.blockeasing li").hover(function() {
              $(this).stop().animate({ backgroundColor: "#096fb4"}, 600);},
           function() {
              $(this).stop().animate({ backgroundColor: "#002248"}, 600);
        });
		
        //menu itembackground color animation			
		$("ul.blockeasing li ul li").hover(function() {
              $(this).stop().animate({ backgroundColor: "#096fb4"}, 600);},
           function() {
              $(this).stop().animate({ backgroundColor: "#096fb4"}, 600);
        });		
});
