The task: Put some custom javascript in a file and have it run on a Drupal page.
This is theoretically easy, but I had trouble getting the javascript to do certain things with certain page elements. Drupal makes it easy to add javascript, but then it sets up a bunch of restrictions. This is for security reasons and it's a good idea, but it's just one more thing in D7 that is more complicated than it should be. Anyway, here's the solution:(function($) { // wrapper to make it work with Drupal