title: Open another submenu closed submenu
body: <p>I make a script for my submenu in the navigation. When i open the submenu. The submen is show and when i mouseout. The submenu is closed width a delay of 300.</p>
  
  <p>But i have a problem in the script. The navigation have 8 submenu's. When i hover over the first submenu. This submenu is open. When i hover over the second submenu. Than i have two submenu's open.</p>
  
  <p>When I open a new submenu. And there is another submenu open. The other sub should immediately close. How can I make?</p>
  
  <p>Thanks a lot!</p>
  
  <p>This is my script:</p>
  
  <pre><code>    $('.nav-main .container li').hover(function() {
      if ($(this).find('.submenu').length &gt; 0) {
          $(this).addClass("hover");
          $(this).find('.submenu').show();
      }
  }, function() {
      var object = $(this);
      setTimeout(function()
      {
          $(object).find('.submenu').hide();
          $(object).removeClass("hover");
      }, 300);
  });
  </code></pre>