title: How to add a delay to a jQuery fadeout?
body: <p>I'm designing a navigation bar for a site, and I'm trying to noodle out how to get the submenu that appears with each tab to stay visible after the cursor leaves the tab.  Since it fades out immediately after the cursor leaves, I can't set a function on the submenu.  So what I'm trying to do is introduce a setTimeout() to the out side of the .hover in jQuery, without success.  Here's the code:</p>
  
  <pre><code>$('.hovernav').hover(
          function () {
              $(this).css('background-image', $(this).css('background-image').replace("_o.", "_i."));
              tabShowSubnav($(this).attr('id'));
          }, 
          function () {
              $(this).css('background-image', $(this).css('background-image').replace("_i.", "_o."));
              setTimeout('tabHideSubnav($(this).attr("id"))','2000');
          });
  </code></pre>
  
  <p>What am I missing about this setup?</p>