title: jQuery .offset top of viewport issue
body: <p>I've been having problems working out what I'm doing wrong here. Basically, the drop-down menu  works fine if the user is at the top of the page, but the minute the user scrolls down the menu will not retract when it's clicked.</p>
  
  <p>I know there is a workaround using .position instead of .offset, but no matter how much documentation I read, I can't work out how to add in $(window) to .offset</p>
  
  <p>Here's what I've got so far:</p>
  
  <pre><code>$(document).ready(function() {
  $('.title-bar, #menu-wrap').click(function() {
  if($('#menu-wrap').offset().top === 0){
      $('#menu-wrap').stop().animate({top:'-300px'}, 1000);
  } else {
      $('#menu-wrap').stop().animate({top:'0px'}, 1000);
  }
  });
  });​
  </code></pre>
  
  <p>And here it is in a <a href="http://jsfiddle.net/2Tdx7/1/" rel="nofollow">fiddle</a></p>
  
  <p>I'm sure the solution is simple, but I am having a hard time getting into the swing of stringing together Jquery scripts - it's taking me longer than anything else I've learnt so far which is, as you can maybe imagine (or not!) is really frustrating.</p>