Скрол страницы при зажатии на кнопке

Кнопка вверх и вниз. Скрол происходит при зажатии на одной из кнопок.

by Denis Tverdokhlebov

HTML

<div id="to_bot" class="button">вниз</div>
<div id="content"></div>
<div id="to_top" class="button">вверх</div>

CSS

.button {
    position: fixed;
    right: 0;
    width: 100px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border: 1px solid #999;
    background: #dedede;
    cursor: pointer;
}
#to_top {
    top: 0;    
}
#to_bot {
    bottom: 0;
}
#content {
    height: 5000px;
    background: url(http://www.clipart-fr.com/en/data/Background/set_03/clipart_Background_webmaster_01475.jpg) 0 0 repeat;
}

JavaScript

var docBody = $('html,body');
var docH = $(document).height();
var but = $('.button');
var direction = 0;
but.mousedown(function(){
    if($(this).index('.button')) {
        direction = 0;
    } else {
        direction = docH;
    }
    docBody.animate({
        scrollTop: direction
    }, 3000);
});
but.mouseup(function(){
    docBody.stop();
});