The extensions module has access to an arcapi object, and implements custom JavaScript and CSS stylesheets.
arcapi