JQuery offset #NaN issue
<p>I have a fixed menu bar at top of the page and all menu links are anchor links on the same page. In short, it's a one page website divided in sections with anchor links as menu items.</p>

<p>I am using the javascript below for smooth slide to section when menu items are clicked.</p>

<pre><code>$(document).ready(function() {
    $("a.anchorLink").anchorAnimate()
});

jQuery.fn.anchorAnimate = function(settings) {

    settings = jQuery.extend({
        speed : 1100
    }, settings);   

    return this.each(function(){
        var caller = this
        $(caller).click(function (event) {  
            event.preventDefault()
            var locationHref = window.location.href
            var elementClick = $(caller).attr("href")

            var destination = $(elementClick).offset().top-60;
            $("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination}, settings.speed, function() {
                window.location.hash = elementClick-60
            });
            return false;
        })
    })
}
</code></pre>

<p>Since the top menu height is 60 pixels, I need to subtract it from offset().top to ensure slide works properly. I also have to subtract in location hash else there is a jerky slide (in FF and IE, works fine in Chrome) once the slide on click in complete. </p>

<p>It works great but the problem is the URL is shown as <a href="http://www.site.com/#NaN" rel="nofollow">http://www.site.com/#NaN</a> instead of <a href="http://www.site.com/#linkname" rel="nofollow">http://www.site.com/#linkname</a> </p>

<p>Here is the full code - <a href="http://jsfiddle.net/85saK/1/" rel="nofollow">http://jsfiddle.net/85saK/1/</a>. Unfortunately, it won't show you the URL after click which ends with #NaN instead of the actual link ID, e.g #store, #home or #contact.</p>
