Any reason we can't use drupal.settings.base_path or whatever the js equivalent for base_url is?