$(document).ready(reformatAnchorLinks);

function reformatAnchorLinks() {
   var jAnchors = $('a');
   var reAnchor = /#.+$/;

   jAnchors.each(function () {
      var _href = this.href;
      if (reAnchor.test(_href)) {
         this.href = _href.match(reAnchor)[0];
         console.log('replaced url ['+ _href + '] width ['+ this.href+ ']');
      }
   })
}
