Поидее как-то так. Не проверял, под рукой нету подходящей страницы, но поидее должно работать
$(function() {
var hash = document.location.hash;
if (hash.length>1 && $(hash).length){
$('html, body').animate({
scrollTop: $(hash).offset().top-45
}, 0);
}
});