jQuery swap div on hover with delay
<p>I'm trying to create two "buttons" that using the hover event, hide some divs and then display some others in their place. I'm then trying to delay the swapping back to the default div. </p>

<p>All works, fine, unless you go from one button to the other at which point you get many divs displaying at the same time until the delay passes. If we don't use the delay it works perfectly.</p>

<p>The javascript:</p>

<pre><code>jQuery(function ($) {

$('#servers-btn').hover(
   function() {
    $('#servers, #servers-heading, #servers-arrow').show(0);
    $('#default, #default-heading').hide(0);
   }, 
   function() {
   setTimeout( function() {
        $('#servers, #servers-heading, #servers-arrow').hide(0);
        $('#default, #default-heading').show(0);
        },1000)
    }
);

$('#hosting-btn').hover(
   function() {
    $('#hosting, #hosting-heading, #hosting-arrow').show(0);
    $('#default, #default-heading').hide(0);
   }, 
   function() {
   setTimeout( function() {
        $('#hosting, #hosting-heading, #hosting-arrow').hide(0);
        $('#default, #default-heading').show(0);
        },1000)
    }
);

});
</code></pre>

<p>I assume i need to make one hover function aware of the other so it can cancel the timeout, i just have no clue how to do it. </p>

<p>EDIT - just tidyed up code to put all divs into one hide/show.</p>

<p>Also, i should have probably mentioned that the #default, #servers and #hosting divs appear in exactly the same location. So need to instantly switch at the same time (which the above does). </p>

<p>EDIT - latest attempt to use clearTimeout here <a href="http://jsfiddle.net/KH4tt/1/" rel="nofollow">http://jsfiddle.net/KH4tt/1/</a> - but can't quite make it work right. </p>
