$(function(){
$("#totop").hide();
$(window).scroll(function(){
if ($(window).scrollTop()>1200){
$("#totop").fadeIn();
}else{
$("#totop").fadeOut();
}
});
$("#totop").click(function(){
$('body,html').animate({scrollTop:0},1200);
return false;
});
});