$(function () { 
// PageTop 
    $('a[href^=#], area[href^=#]').not('a[href=#], area[href=#]').click(function () { 
        var duration = 200; 
        // easing values: swing | linear 
        var easing = 'swing'; 
        var newHash = this.hash; 
        var target = $(this.hash).offset().top; 
        var oldLocation = window.location.href.replace(window.location.hash, ''); 
        var newLocation = this; 
        if (oldLocation + newHash == newLocation) { 
            $('html:not(:animated),body:not(:animated)').animate({ 
                scrollTop: target 
            }, duration, easing, function () { 
                window.location.href = newLocation; 
            }); 
            return false; 
        } 
    }); 
});
