Check active div onload
<p>I'm using something like this in a layout</p>

<pre><code>&lt;nav id="main-nav"&gt;
   &lt;a href="#link1"&gt;Link1&lt;/a&gt;
   &lt;a href="#link2"&gt;Link2&lt;/a&gt;
   &lt;a href="#link3"&gt;Link3&lt;/a&gt;
&lt;/nav&gt;
&lt;div id="link1"&gt;
   some content goes here
&lt;/div&gt;
&lt;div id="link2"&gt;
   some content goes here
&lt;/div&gt;
&lt;div id="link3"&gt;
   some content goes here
&lt;/div&gt;
</code></pre>

<p>So when i click on some nav link it scrolls down to the correct div. The thing is that NAV is a fixed positioned menu, and it uses 200px from the top.
the JS i use to scroll is this:</p>

<pre><code>$('#main-nav a').click( function(event) {
    var nome = $(this).attr("href");
    $('html, body').animate({
         scrollTop: $(nome).offset().top-198
     }, 1600);
});
</code></pre>

<p>Ok, so there's this internal page, where the nav links become:</p>

<pre><code>&lt;a href="http://www.mysite.com/#link1"&gt;Link1&lt;/a&gt;
</code></pre>

<p>The problem is that it loads the home ok, but the div starts from top, under the NAV (because there's no <code>offset().top-198</code> when it loads the page.)
I think what i need is to find a way to get the <code>#link</code> from the url that loads and make a <code>onLoad</code> <code>scrollTop</code>, is that right?</p>

<p>Any helps please?</p>
