if (element.length > 0) {
$.scrollTo(element, 500, {offset: {top: -50, left: 0}});
if (element.length > 0) {
$.scrollTo(element, 500, {offset: {top: -50, left: 0}});
// On page load, scroll to anchor
scrollToAnchor(window.location.hash)
// On page load, scroll to anchor
scrollToAnchor(window.location.hash)