$(document).ready(function() {
var headerheigh = document.getElementById("header").offsetHeight;
window.onscroll = function() {
var scrolled = window.pageYOffset || document.documentElement.scrollTop;
if (scrolled > headerheigh*1.5)
{
$(".totop").addClass("active");
}
else
{
$(".totop").removeClass("active");
}
}
});