changes to JS for ajax update of links