Index: tabs.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/jstools/tabs/tabs.js,v
retrieving revision 1.4
diff -u -r1.4 tabs.js
--- tabs.js	21 Feb 2007 21:27:07 -0000	1.4
+++ tabs.js	12 Mar 2007 02:56:57 -0000
@@ -1,5 +1,54 @@
 Drupal.tabsAttach = function() {
+  // Process standard Drupal local task tabs.
+  // Only proceed if we have dynamicload available.
+  if (Drupal.dynamicload && typeof(Drupal.dynamicload == 'function')) {
+
+    $('ul.tabs.primary')
+      .each(function() {
+        var index = 1;
+        var activeIndex;
+        $(this).addClass('anchors')
+        .addClass('tabs-processed')
+        .find('li > a')
+        .each(function () {
+          var div = document.createElement('div');
+          $(div)
+            .attr('id', 'section-' + index)
+            .addClass('fragment');
+          var parentDiv = $(this).parents('div').get(0);
+          parentDiv.appendChild(div);
+          // The active tab already has content showing.
+          if ($(this).is('.active')) {
+            activeIndex = parseInt(index);
+          }
+          // Other tabs need to load their content.
+          else {
+            Drupal.dynamicload(this, {
+              target: document.getElementById('section-' + index),
+              useClick: false,
+              show: false
+            });
+          }
+          $(this).attr('href', '#section-' + index);
+          index++;
+        })
+        .end()
+        .parent('div')
+        .each(function() {
+          while (this.nextSibling) {
+            var oldDiv = this.parentNode.removeChild(this.nextSibling);
+            document.getElementById('section-' + activeIndex).appendChild(oldDiv);
+          }
+        })
+        .tabs({
+          onShow: Drupal.tabsAddClassesCallback()
+        });
+    });
+  }
+
+  // Process custom tabs.
   $('.drupal-tabs')
+    .addClass('tabs-processed')
     .addClass('tabs')
     .tabs({
       onShow: Drupal.tabsAddClassesCallback()
Index: tabs.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/jstools/tabs/tabs.module,v
retrieving revision 1.17
diff -u -r1.17 tabs.module
--- tabs.module	10 Mar 2007 15:51:39 -0000	1.17
+++ tabs.module	11 Mar 2007 06:21:43 -0000
@@ -1,13 +1,19 @@
 <?php
+// $Id: $
 
 /**
  * @file
  * API for creating tabbed pages.
  */
 
+function tabs_menu($may_cache) {
+  if (!$may_cache) {
+    tabs_load();
+  }
+}
+
 function tabs_process_tabset($element) {
   static $names = array();
-  tabs_load();
   // Ensure name is unique.
   $i = 0;
   // Assign a name, reading from the first parent (the key of this tabset element).
