.scrollTop() plugin replacement

scroll de la page web à la place de l'utilisateur, sans plugin jQuery ------------------------------------------- scroll the webpage without jQuery plugin

HTML

<div id="top">Hello, I'm the top-gun!</div>
<div id="bottom">Hello, I'm the bottom end :(</div>

CSS

#top {
    position: relative;
    top: 0;
}

#bottom {
    position: absolute;
    top: 700px;
}

JavaScript

var documentBody = (($.browser.chrome)||($.browser.safari)) ? document.body : document.documentElement;

$('#top').click(function() {
    $(documentBody).animate({scrollTop: $('#bottom').offset().top}, 2000,'easeInOutCubic');
});

$('#bottom').click(function() {
    $(documentBody).animate({scrollTop: $('#top').offset().top}, 2000,'easeInOutCubic');
});