using jquery mousemove and setTimeout and clearTimeout to reveal/hide a menu
<p>I pasted some code below of what seems to be a common approach to reveal a menu on mousemove. It seems that as the mouse continues to move, the duration of the timeout increases. What's up with that? Is there a reason why the cleartimeout would not be working?</p>

<pre><code>var timer;
    $(document).mousemove(function() {
        if (timer) {
            clearTimeout(timer);
            timer = 0;
        }

        $('.navi a, a.left, a.right').animate({top:'0px'},'fast');
        timer = setTimeout(function() {
           $('.navi a, a.left, a.right').animate({top:'50px'},'fast');
        }, 1000)
    });
</code></pre>
