Index: misc/vertical-tabs.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/vertical-tabs.js,v
retrieving revision 1.8
diff -u -r1.8 vertical-tabs.js
--- misc/vertical-tabs.js	5 Mar 2010 13:32:09 -0000	1.8
+++ misc/vertical-tabs.js	9 Mar 2010 20:40:41 -0000
@@ -38,7 +38,12 @@
       $('> li:first', list).addClass('first');
       $('> li:last', list).addClass('last');
 
-      if (!focus) {
+      // If the current URL has a fragment and one of the tabs contains an
+      // element that matches the URL fragment, activate that tab.
+      if (window.location.hash && $(window.location.hash, this).size()) {
+        focus = $(window.location.hash, this).closest('.vertical-tabs-pane');
+      }
+      else if (!focus) {
         focus = $('> .vertical-tabs-pane:first', this);
       }
       if (focus.length) {
