When I load an overlay to edit a node, how can I open a specific vertical tab? I have a content type with field collections. I want to open an overlay to edit a node but switch to a tab for a specific field collection. Does anyone know how I can do this?

I can open the overlay with #overlay=node/16/edit, but this will just go to the first vertical tab.
I took a look at vertical-tabs.js, and as best I can tell you'll have to add some JS to the page to trigger the click event on the correct link. On line 33, the Drupal.verticalTab object gets instantiated, but not assigned to a namespace where you can get to it later to run its focus() method. (This would be a good thing to fix in D8. Hmm.)

So basically, you need a .js file that does something like

(function ($) {
  Drupal.behaviors.yourModuleName = {
    attach: function (context, settings) {
      $('a:contains("Revision information")').click();
    }
  };
})(jQuery);


where "Revision information" is the actual text of the link that opens your vertical tab.

Note: There is some URL fragment handling in vertical-tabs.js, which I think is supposed to make it so that if you set the URL fragment to the id of a fieldset, that vertical tab will open automatically. It might be worth trying, but I couldn't get it to work even on a non-overlay page.