Smooth scroller in 15 lines
// Source: http://www.paulund.co.uk/smooth-scroll-to-internal-links-with-jquery
function saosSmoothScroll() {
$('a[href^="#"]').on('click',function(e) {
e.preventDefault();
var target = this.hash;
var $target = $(target);
$('html, body').stop().animate({
'scrollTop': $target.offset().top
}, 900, 'swing', function () {
window.location.hash = target;
});
});
}