How can I have all drupal links work on ajax based?
Maybe this module will help you: http://drupal.org/project/ajax_links_api


  Ajax links API module help you to load any content to a specified DIV
  using JQuery Ajax. This module will also load JS and CSS for
  Ajax-loaded content by using Drupal.attachBehaviors(). Links will work
  as normal if Javacript is disabled.
  
  In HTML5 browsers, title bar and url will change using
  window.history.replaceState() (This feature is disabled by default.
  Check ajax_links_api.js to enable).