title: jQuery hover mouseover/mouseout timing
body: <p>I have the following live example at <a href="http://freakyleaf.co.uk/hoverfade/" rel="nofollow">freakyleaf.co.uk/hoverfade/</a> whereby upon hovering over a tile, the tile background image fades form 1 to 0.25 opacity over 600ms (.tile_img), then text fades from 0 to 1 opacity over 500ms (.overlay). On mouseout, the reverse happens.</p>
  
  <p>This all works fine as long as the mouse leaves only once the mouseover animation has completed. If the mouse leave during the mouseover animation, the tile image fades back to full opacity, but the text does not fade, leaving it visible.</p>
  
  <p>I have the following code:</p>
  
  <pre><code>$(document).ready(function(){
  $(".tile").hoverIntent(function() {
  
  $(".tile_img", this).animate({"opacity": "0.25"}, 600,
  function() { $(this).next(".overlay").animate({"opacity": "1"}, 500); }
      );
  },
  function() {
  $(".overlay", this).animate({"opacity": "0"}, 500,
  function() { $(this).prev(".tile_img").animate({"opacity": "1"}, 600); }
      );
  });
  });
  </code></pre>
  
  <p>And HTML:</p>
  
  <pre><code>&lt;div class="wrapper"&gt;
    &lt;ul id="service_boxes"&gt;
      &lt;li id="sb_recording" class="tile" onClick="location.href='recording.php';" style="cursor: pointer;"&gt;
        &lt;h2&gt;&lt;a href="recording.php"&gt;Recording&lt;/a&gt;&lt;/h2&gt;
        &lt;div class="tile_img"&gt;&lt;/div&gt;
        &lt;div class="overlay"&gt;&lt;p&gt;Vintage analogue warmth and cutting-edge digital technology working in perfect harmony - That's the SoundARC sound!&lt;/p&gt;&lt;/div&gt;
      &lt;/li&gt; 
    &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I understand that I should perhaps use the .stop function but so have tried it in a few places but have only broken the code so far.</p>
  
  <p>I'm not even sure if what I have is the best way to achieve what I want; I have only got to this point purely by chance as I am a complete novice.</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p>Many thanks.</p>