tracking scrolling offset of a fixed div from top of window
<p>So i have a long scrolling 1page website with a fixed navigation bar.</p>

<p>With this navigation bar I would like to track its <code>.offset().top</code> so I may add or remove classes based on the offset from the top of the window.</p>

<p><a href="http://www.designobvio.us/para" rel="nofollow">Live code link</a></p>

<p><strong>Example</strong> (this is my logic but i cannot make the jQuery alert even work.</p>

<pre><code>$(window).scroll(function () {
  var elem = $('.navigation');
  var topValue = offset.top;
  if (topValue &gt; 400) {
    alert(topValue);
  }
});
</code></pre>
