I found this fiddle http://jsfiddle.net/tovic/kw7LD/ that shows how to apply smooth scroll to external link with class. I'd like to know if is possible apply the same effect using id instead of classes.
$(window).bind("load", function () {
var urlHash = window.location.href.split("#")[1];
$('html,body').animate({
scrollTop: $('.' + urlHash).offset().top
}, 4000);
});
P.S. I found also this question Smooth scrolling when clicking an anchor link but the answer didn't work for me.