<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('body').append('<div class="button-up" style="display: none; background: #111; opacity: 1;width: 3%; border-right:2px solid #2096e1;z-index:99; height:100%;position: fixed;left: 0px;top: 0px;cursor: pointer;text-align: center;line-height: 30px;color: #d3dbe4;font-weight: bold;"></div>');
jQuery (window).scroll (function () {
if (jQuery (this).scrollTop () > 400) {
jQuery ('.button-up').fadeIn();
} else {
jQuery ('.button-up').fadeOut();
}
});
jQuery('.button-up').click(function(){
jQuery('body,html').animate({
scrollTop: 0
}, 800);
return false;
});
jQuery('.button-up').hover(function() {
jQuery(this).animate({
'opacity':'1',
}).css({'background-color':'black','color':'whitesmoke'});
}, function(){
jQuery(this).animate({
'opacity':'1'
}).css({'background':'#111','color':'#d3dbe4'});;
});
});
</script>