How to use a relative path to your JS and CSS in Drupal 7

By default, Drupal uses an absolute path, and will insert your domain name into the path to your JS and CSS files.

You can override this, in template.php, like so: