jQuery(document).ready(function(){ jQuery(".cam-banner .downlink a, .cam-banner .cambansmall ul li > a").on('click', function(event) { if (this.hash !== "") { event.preventDefault(); var headHgt = jQuery(".cust-header").outerHeight(); var hash = this.hash; jQuery('html, body').animate({ scrollTop: jQuery(hash).offset().top }, 800, function(){ window.location.hash = hash; }); } }); });