Animate the page scroll to anchor
/**
* Anima scroll de links para bookmarks dentro da página
*/
$(function() {
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
target.velocity('scroll', {
duration: 1500,
easing: "ease-in-out",
offset: -50
});
return false;
}
}
});
});