<a name="top"></a>
<a href="#Gosha">Гоша</a>
<a href="#Petr">Петя</a>
<a href="#Igor">Игорь</a>
<hr/>
    <a name="Gosha">Гоша</a> <a href="#top">↑</a>
<div class="razd"></div>
    <a name="Petr">Петя</a> <a href="#top">↑</a>
<div class="razd"></div>
    <a name="Igor">Игорь</a> <a href="#top">↑</a>
<div class="razd"></div>

.razd{
    height: 600px;
}
a[href='#top']{
    text-decoration: none;
    color: red;
}

jQuery(function($){
   $(this).on('click', 'a[href^=#]', function () {
        $('html, body').animate({ scrollTop:  $('a[name="'+this.hash.slice(1)+'"]').offset().top }, 1000 ); 
        return false;
    });
});