$(document).ready(function () {

  $("div#menu ul li a").hover(function() {
  
    if ($(this).is(":animated")) {
      $(this).stop().animate({width: "310px"}, {duration: 450, easing: "easeOutQuad"});
        
    } else {
      
      $(this).stop().animate({width: "310px"}, {duration: 400, easing: "easeOutQuad"});
    }
  },
  
  function () {
    
    if ($(this).is(":animated")) {
      $(this).stop().animate({width: "80px"}, {duration: 400, easing: "easeInOutQuad"});
    } else {
      
      $(this).stop(":animated").animate({width: "80px"}, {duration: 450, easing: "easeInOutQuad"});
    }
  });
  
});