Index: modules/overlay/overlay-child.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/overlay/overlay-child.js,v
retrieving revision 1.10
diff -u -r1.10 overlay-child.js
--- modules/overlay/overlay-child.js	8 Jul 2010 12:20:23 -0000	1.10
+++ modules/overlay/overlay-child.js	4 Sep 2010 15:41:49 -0000
@@ -120,6 +120,8 @@
   var dots = '';
 
   $(document).bind('drupalOverlayBeforeLoad.drupal-overlay.drupal-overlay-child-loading', function () {
+    $(document.documentElement).addClass('overlay-loading');
+    
     $title = $('#overlay-title').text(text);
     var id = setInterval(function () {
       dots = (dots.length > 10) ? '' : dots + '.';
@@ -142,23 +144,6 @@
 };
 
 /**
- * If the shortcut add/delete button exists, move it to the overlay titlebar.
- */
-Drupal.overlayChild.behaviors.shortcutAddLink = function (context, settings) {
-  // Remove any existing shortcut button markup from the titlebar.
-  $('#overlay-titlebar').find('.add-or-remove-shortcuts').remove();
-  // If the shortcut add/delete button exists, move it to the titlebar.
-  var $addToShortcuts = $('.add-or-remove-shortcuts');
-  if ($addToShortcuts.length) {
-    $addToShortcuts.insertAfter('#overlay-title');
-  }
-
-  $(document).bind('drupalOverlayBeforeLoad.drupal-overlay.drupal-overlay-child-loading', function () {
-    $('#overlay-titlebar').find('.add-or-remove-shortcuts').remove();
-  });
-};
-
-/**
  * Use displacement from parent window.
  */
 Drupal.overlayChild.behaviors.alterTableHeaderOffset = function (context, settings) {
Index: modules/overlay/overlay.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/overlay/overlay.module,v
retrieving revision 1.31
diff -u -r1.31 overlay.module
--- modules/overlay/overlay.module	31 Aug 2010 15:04:09 -0000	1.31
+++ modules/overlay/overlay.module	4 Sep 2010 15:41:49 -0000
@@ -253,11 +253,6 @@
       $page[$skipped_region]['#access'] = FALSE;
     }
   }
-
-  if (overlay_get_mode() == 'child') {
-    // Add the overlay wrapper before the html wrapper.
-    array_unshift($page['#theme_wrappers'], 'overlay');
-  }
 }
 
 /**
@@ -319,38 +314,27 @@
 }
 
 /**
- * Preprocesses template variables for overlay.tpl.php
- *
- * @see overlay.tpl.php
- */
-function template_preprocess_overlay(&$variables) {
-  $variables['tabs']              = menu_primary_local_tasks();
-  $variables['title']             = drupal_get_title();
-
-  $variables['content_attributes_array']['class'][] = 'clearfix';
-}
-
-/**
- * Processes variables for overlay.tpl.php
- *
- * @see template_preprocess_overlay()
- * @see overlay.tpl.php
- */
-function template_process_overlay(&$variables) {
-  // Place the rendered HTML for the page body into a top level variable.
-  $variables['page'] = $variables['page']['#children'];
-}
-
-/**
  * Implements hook_preprocess_page().
  *
- * Hide tabs inside the overlay.
+ * Use overlay.tpl.php instead of page.tpl if the current page is to be shown
+ * inside the overlay.
  *
  * @see overlay_get_mode()
  */
 function overlay_preprocess_page(&$variables) {
   if (overlay_get_mode() == 'child') {
-    unset($variables['tabs'][0]);
+    $variables += array(
+      'overlay_title'          => drupal_get_title(),
+      'overlay_tabs'           => menu_primary_local_tasks(),
+      'overlay_secondary_tabs' => menu_secondary_local_tasks(),
+    );
+
+    // Make sure we use overlay.tpl.php instead of page.tpl.php.
+    foreach ($variables['theme_hook_suggestions'] as &$suggestion) {
+      $suggestion = 'overlay__' . $suggestion;
+    }
+    array_unshift($variables['theme_hook_suggestions'], 'overlay');
+
   }
 }
 
Index: modules/overlay/overlay-child.css
===================================================================
RCS file: /cvs/drupal/drupal/modules/overlay/overlay-child.css,v
retrieving revision 1.6
diff -u -r1.6 overlay-child.css
--- modules/overlay/overlay-child.css	28 Jul 2010 01:26:00 -0000	1.6
+++ modules/overlay/overlay-child.css	4 Sep 2010 15:41:49 -0000
@@ -29,7 +29,7 @@
   background: #fff;
   clear: both;
   color: #000;
-  padding: .5em 1em;
+  padding: 26px 2.5em;
   position: relative;
 }
 
@@ -123,12 +123,27 @@
   color: #000;
 }
 
+#overlay-breadcrumb {
+
+}
+#overlay-secondary-tabs {
+  position: absolute;
+  top: 26px;
+  right: 2.5em;
+}
+#overlay-action-links {
+  clear: both;
+}
+
 /**
  * Add to shortcuts link
  */
 #overlay-titlebar .add-or-remove-shortcuts {
   padding-top: 0.9em;
 }
+.overlay-loading #overlay-titlebar .add-or-remove-shortcuts {
+  display: none;
+}
 
 /**
  * IE6 shows elements with position:fixed as position:static so replace
Index: modules/overlay/overlay.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/overlay/overlay.tpl.php,v
retrieving revision 1.3
diff -u -r1.3 overlay.tpl.php
--- modules/overlay/overlay.tpl.php	11 Jul 2010 22:03:45 -0000	1.3
+++ modules/overlay/overlay.tpl.php	4 Sep 2010 15:41:49 -0000
@@ -5,33 +5,43 @@
  * @file
  * Default theme implementation to display a page in the overlay.
  *
- * Available variables:
- * - $title: the (sanitized) title of the page.
- * - $page: The rendered page content.
- * - $tabs (array): Tabs linking to any sub-pages beneath the current page
- *   (e.g., the view and edit tabs when displaying a node).
- *
- * Helper variables:
- * - $classes_array: Array of html class attribute values. It is flattened
- *   into a string within the variable $classes.
+ * Overlay variables:
+ * - $overlay_title: the (sanitized) title of the page.
+ * - $overlay_tabs (array): Tabs linking to any sub-pages beneath the current
+ *   page (e.g., the view and edit tabs when displaying a node).
  *
  * @see template_preprocess()
- * @see template_preprocess_overlay()
+ * @see template_preprocess_page()
+ * @see overlay_preprocess_page()
  * @see template_process()
+ * @see system/page.tpl.php
  */
 ?>
 
 <div id="overlay" <?php print $attributes; ?>>
   <div id="overlay-titlebar" class="clearfix">
     <div id="overlay-title-wrapper" class="clearfix">
-      <h1 id="overlay-title"<?php print $title_attributes; ?>><?php print $title; ?></h1>
+      <?php print render($title_prefix); ?>
+      <h1 id="overlay-title"><?php print $overlay_title; ?></h1>
+      <?php print render($title_suffix); ?>
     </div>
     <div id="overlay-close-wrapper">
       <a id="overlay-close" href="#" class="overlay-close"><span class="element-invisible"><?php print t('Close overlay'); ?></span></a>
     </div>
-    <?php if ($tabs): ?><ul id="overlay-tabs"><?php print render($tabs); ?></ul><?php endif; ?>
+    <?php if ($overlay_tabs): ?><ul id="overlay-tabs"><?php print render($overlay_tabs); ?></ul><?php endif; ?>
   </div>
-  <div id="overlay-content"<?php print $content_attributes; ?>>
-    <?php print $page; ?>
+  <div id="overlay-content" class="clearfix">
+    <?php if ($breadcrumb): ?>
+      <div id="overlay-breadcrumb"><?php print $breadcrumb; ?></div>
+    <?php endif; ?>
+
+    <?php if ($overlay_secondary_tabs): ?><ul id="overlay-secondary-tabs" class="tabs secondary"><?php print render($overlay_secondary_tabs); ?></ul><?php endif; ?>
+
+    <?php print $messages; ?>
+
+    <?php print render($page['help']); ?>
+    <?php if ($action_links): ?><ul id="overlay-action-links" class="action-links"><?php print render($action_links); ?></ul><?php endif; ?>
+    <?php print render($page['content']); ?>
+    <?php print $feed_icons; ?>
   </div>
 </div>
Index: themes/bartik/css/style.css
===================================================================
RCS file: /cvs/drupal/drupal/themes/bartik/css/style.css,v
retrieving revision 1.7
diff -u -r1.7 style.css
--- themes/bartik/css/style.css	2 Sep 2010 20:43:18 -0000	1.7
+++ themes/bartik/css/style.css	4 Sep 2010 15:41:49 -0000
@@ -1246,32 +1246,15 @@
 
 /* ---------- Overlay layout styles ----------- */
 
-.overlay #main,
-.overlay #content {
-  width: auto;
-  float: none;
-}
-.overlay #page {
-  padding: 0 2em;
-}
-.overlay #skip-link,
-.overlay .region-page-top,
-.overlay #header,
-.overlay #page-title,
-.overlay #featured,
-.overlay #sidebar-first,
-.overlay #triptych-wrapper,
-.overlay #footer-wrapper {
-  display: none;
-}
-.overlay-processed .field-type-image {
- display: block;
- float: none;
-}
 .overlay #messages {
   width: auto;
 }
 
+#overlay-secondary-tabs {
+  border: 0;
+  margin: 0;
+}
+
 /* ---------- Poll ----------- */
 
 .node .poll {
Index: themes/seven/style.css
===================================================================
RCS file: /cvs/drupal/drupal/themes/seven/style.css,v
retrieving revision 1.66
diff -u -r1.66 style.css
--- themes/seven/style.css	1 Sep 2010 03:10:42 -0000	1.66
+++ themes/seven/style.css	4 Sep 2010 15:41:49 -0000
@@ -899,25 +899,6 @@
 }
 
 /* Overlay theming */
-.overlay #branding {
-  background-color: #fff;
-  padding-top: 15px;
-}
-.overlay .primary,
-.overlay #branding h1.page-title,
-.overlay #left,
-.overlay #footer {
-  display: none;
-}
-.overlay #page {
-  margin: 0;
-  padding: 0 20px;
-}
-.overlay #branding div.breadcrumb {
-  float: left;
-  position: relative;
-  z-index: 10;
-}
 #overlay-tabs {
   bottom: -2px;
   font-size: 1.54em;
@@ -927,12 +908,12 @@
 #overlay-tabs li {
   margin: 0 -2px;
 }
-.overlay ul.secondary {
-  background: transparent none;
-  margin: -2.4em 0 0.3em 0;
+#overlay-breadcrumb {
+  font-size: 0.846em;
+  padding-bottom: 5px;
 }
-.overlay #content {
-  padding: 0;
+#overlay-secondary-tabs {
+  background: transparent none;
 }
 
 /* Shortcut theming */
Index: themes/garland/style.css
===================================================================
RCS file: /cvs/drupal/drupal/themes/garland/style.css,v
retrieving revision 1.84
diff -u -r1.84 style.css
--- themes/garland/style.css	28 Jul 2010 01:40:39 -0000	1.84
+++ themes/garland/style.css	4 Sep 2010 15:41:49 -0000
@@ -644,15 +644,6 @@
   background: url("images/body.png") repeat-x scroll 50% -58px #edf5fa;
   color: #fff;
 }
-#overlay-content {
-  padding: 1px;
-}
-#overlay-content #header {
-  display: none;
-}
-#overlay-content #wrapper {
-  background-position: 50% -80px;
-}
 
 
 /**
