diff --git a/core/modules/shortcut/shortcut.base-rtl.css b/core/modules/shortcut/shortcut.base-rtl.css
index c236f47..523cdc8 100644
--- a/core/modules/shortcut/shortcut.base-rtl.css
+++ b/core/modules/shortcut/shortcut.base-rtl.css
@@ -1,4 +1,3 @@
-
 /**
  * @file
  * Generic RTL base styles for shortcut module.
@@ -26,3 +25,10 @@
 .add-or-remove-shortcuts .text {
   float: right;
 }
+
+/**
+ * Toggle link
+ */
+#toolbar div.toolbar-menu {
+  padding-left: 50px; /* LTR */
+}
diff --git a/core/modules/shortcut/shortcut.base.css b/core/modules/shortcut/shortcut.base.css
index 90a1046..3698237 100644
--- a/core/modules/shortcut/shortcut.base.css
+++ b/core/modules/shortcut/shortcut.base.css
@@ -1,4 +1,3 @@
-
 /**
  * @file
  * Generic base styles for shortcut module.
@@ -32,3 +31,22 @@
 .add-or-remove-shortcuts a:hover .text {
   display: block;
 }
+
+/**
+ * Toggle link
+ */
+#toolbar div.toolbar-menu {
+  padding-right: 50px; /* LTR */
+}
+#toolbar div.collapsed {
+  display: none;
+  visibility: hidden;
+}
+
+/**
+ * Collapsed drawer of additional toolbar content.
+ */
+#toolbar div.toolbar-drawer {
+  position: relative;
+  padding: 0 10px;
+}
diff --git a/core/modules/shortcut/shortcut.js b/core/modules/shortcut/shortcut.js
new file mode 100644
index 0000000..4dc033c
--- /dev/null
+++ b/core/modules/shortcut/shortcut.js
@@ -0,0 +1,112 @@
+(function ($, Drupal) {
+
+"use strict";
+
+/**
+ * Store the state of shortcut bar.
+ * Default value is to show shortcuts.
+ */
+var collapseShortcut = JSON.parse(localStorage.getItem('Drupal.shortcut.collapsed'));
+
+var shortcut = Drupal.shortcut = Drupal.shortcut || {};
+
+var $toolbar;
+
+/**
+ * Attach toggling behavior and notify the overlay of the toolbar.
+ */
+Drupal.behaviors.shortcut = {
+  attach: function () {
+    $toolbar = $('#toolbar').once('shortcut');
+    if ($toolbar.length) {
+
+      // Set the initial state of the toolbar.
+      Drupal.shortcut.displayShortcut(collapseShortcut);
+
+      // Toggling toolbar drawer.
+      $toolbar.find('a.toggle').once('shortcut-toggle').click(function (e) {
+        e.preventDefault();
+        Drupal.shortcut.toggle();
+        // Allow resize event handlers to recalculate sizes/positions.
+        $(window).trigger('resize');
+      });
+      // React to a toggle from another window/tab.
+      $(window).bind('storage', function (e) {
+        // Only react to 'Drupal.tableDrag.showWeight' value change.
+        if (e.originalEvent.key === 'Drupal.shortcut.collapsed') {
+          // This was changed in another window, get the new value for this window.
+          collapseShortcut = JSON.parse(e.originalEvent.newValue);
+          Drupal.shortcut.displayShortcut(collapseShortcut);
+        }
+      });
+    }
+  }
+};
+
+
+$.extend(shortcut, {
+  /**
+   * Calls expand or collapse function and triggers a custom event.
+   *
+   * @param collapseShortcut
+   */
+  displayShortcut: function (collapseShortcut) {
+    if (collapseShortcut) {
+      this.collapse();
+    }
+    // Default action is to show shortcuts.
+    else {
+      this.expand();
+    }
+    $('body').addClass('toolbar-drawer').css('padding-top', this.height());
+    $(document).trigger('offsettopchange');
+  },
+  /**
+   * Toggle shortcuts toolbar.
+   */
+  toggle: function () {
+    collapseShortcut = !collapseShortcut;
+    this.displayShortcut(collapseShortcut);
+    if (collapseShortcut) {
+      // Save default override.
+      localStorage.setItem('Drupal.shortcut.collapsed', collapseShortcut);
+    }
+    else {
+      // Reset the value to its default.
+      localStorage.removeItem('Drupal.shortcut.collapsed');
+    }
+  },
+  /**
+   * Collapse shortcuts.
+   */
+  collapse: function () {
+    var toggle_text = Drupal.t('Show shortcuts');
+    $toolbar.find('div.toolbar-drawer').addClass('collapsed');
+    $toolbar.find('a.toggle')
+      .removeClass('toggle-active')
+      .attr('title', toggle_text)
+      .html(toggle_text);
+  },
+  /**
+   * Expand shortcuts.
+   */
+  expand: function () {
+    var toggle_text = Drupal.t('Hide shortcuts');
+    $toolbar.find('div.toolbar-drawer').removeClass('collapsed');
+    $toolbar.find('a.toggle')
+      .addClass('toggle-active')
+      .attr('title', toggle_text)
+      .html(toggle_text);
+  },
+  /**
+   * Update the toolbar height.
+   * @return height
+   */
+  height: function () {
+    var height = $toolbar.outerHeight();
+    $toolbar.attr('data-offset-top', height);
+    return height;
+  }
+});
+
+})(jQuery, Drupal);
diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module
index 9bbb12a..eb9393b 100644
--- a/core/modules/shortcut/shortcut.module
+++ b/core/modules/shortcut/shortcut.module
@@ -157,6 +157,12 @@ function shortcut_menu() {
     'type' => MENU_LOCAL_TASK,
     'file' => 'shortcut.admin.inc',
   );
+  $items['shortcut/toggle'] = array(
+    'title' => 'Toggle shortcut drawer visibility',
+    'type' => MENU_CALLBACK,
+    'page callback' => 'shortcut_toggle_page',
+    'access arguments' => array('access toolbar'),
+  );
 
   return $items;
 }
@@ -180,6 +186,12 @@ function shortcut_theme() {
       'render element' => 'form',
       'file' => 'shortcut.admin.inc',
     ),
+    'shortcut_toggle' => array(
+      'variables' => array(
+        'collapsed' => NULL,
+        'attributes' => array(),
+      ),
+    ),
   );
 }
 
@@ -207,6 +219,31 @@ function shortcut_block_view($delta = '') {
 }
 
 /**
+ * Page callback: Toggles the visibility of the toolbar drawer.
+ *
+ * @see toolbar_menu().
+ */
+function shortcut_toggle_page() {
+  global $base_path;
+  // Toggle the value in the cookie.
+  setcookie('Drupal.shortcut.collapsed', !_shortcut_is_collapsed(), NULL, $base_path);
+  // Redirect the user from where he used the toggle element.
+  drupal_goto();
+}
+
+/**
+ * Determines the current state of the toolbar drawer's visibility.
+ *
+ * @return
+ *   TRUE when drawer is collapsed, FALSE when it is expanded.
+ */
+function _shortcut_is_collapsed() {
+  // PHP converts dots into underscores in cookie names to avoid problems with
+  // its parser, so we use a converted cookie name.
+  return isset($_COOKIE['Drupal_shortcut_collapsed']) ? $_COOKIE['Drupal_shortcut_collapsed'] : 0;
+}
+
+/**
  * Access callback for editing a shortcut set.
  *
  * @param object $shortcut_set
@@ -652,6 +689,19 @@ function shortcut_preprocess_block(&$variables) {
 }
 
 /**
+ * Implements hook_preprocess_HOOK() for html.tpl.php.
+ *
+ * Add some page classes, so global page theming can adjust to the toolbar.
+ */
+function shortcut_preprocess_html(&$vars) {
+  if (isset($vars['page']['page_top']['toolbar']) && user_access('access toolbar')) {
+    if (!_shortcut_is_collapsed()) {
+      $vars['attributes']['class'][] = 'toolbar-drawer';
+    }
+  }
+}
+
+/**
  * Implements hook_preprocess_HOOK() for page.tpl.php.
  */
 function shortcut_preprocess_page(&$variables) {
@@ -717,6 +767,7 @@ function shortcut_preprocess_page(&$variables) {
  */
 function shortcut_page_alter(&$page) {
   if (isset($page['page_top']['toolbar'])) {
+    $page['page_top']['toolbar']['toolbar_drawer'] = array();
     // If the toolbar is available, add a pre-render function to display the
     // current shortcuts in the toolbar drawer.
     $page['page_top']['toolbar']['#pre_render'][] = 'shortcut_toolbar_pre_render';
@@ -728,12 +779,7 @@ function shortcut_page_alter(&$page) {
  */
 function shortcut_toolbar_pre_render($toolbar) {
   $links = shortcut_renderable_links();
-  $links['#attached'] = array(
-    'css' => array(
-      drupal_get_path('module', 'shortcut') . '/shortcut.base.css',
-      drupal_get_path('module', 'shortcut') . '/shortcut.theme.css',
-    ),
-  );
+  $links['#attached']['library'][] = array('shortcut', 'drupal.shortcut');
   $links['#prefix'] = '<div id="shortcut-toolbar">';
   $links['#suffix'] = '</div>';
   $shortcut_set = shortcut_current_displayed_set();
@@ -747,6 +793,24 @@ function shortcut_toolbar_pre_render($toolbar) {
     );
   }
 
+  // Add an anchor to be able to toggle the visibility of the drawer.
+  $toolbar['toolbar_toggle'] = array(
+    '#theme' => 'shortcut_toggle',
+    '#collapsed' => _shortcut_is_collapsed(),
+    '#attributes' => array('class' => array('toggle')),
+  );
+
+  // Prepare the drawer links CSS classes.
+  $toolbar_drawer_classes = array(
+    'toolbar-drawer',
+    'clearfix',
+  );
+  if (_shortcut_is_collapsed()) {
+    $toolbar_drawer_classes[] = 'collapsed';
+  }
+  $toolbar['toolbar_drawer']['#type'] = 'container';
+  $toolbar['toolbar_drawer']['#attributes']['class'] = $toolbar_drawer_classes;
+
   $drawer = array(
     'shortcuts' => $links,
     'configure' => $configure_link,
@@ -757,6 +821,30 @@ function shortcut_toolbar_pre_render($toolbar) {
 }
 
 /**
+ * Formats an element used to toggle the shortcut drawer's visibility.
+ *
+ * @param $variables
+ *   An associative array containing:
+ *   - collapsed: A boolean value representing the shortcut drawer's visibility.
+ *   - attributes: An associative array of HTML attributes.
+ *
+ * @return
+ *   An HTML string representing the element for toggling.
+ *
+ * @ingroup themable
+ */
+function theme_shortcut_toggle($variables) {
+  if ($variables['collapsed']) {
+    $toggle_text = t('Show shortcuts');
+  }
+  else {
+    $toggle_text = t('Hide shortcuts');
+    $variables['attributes']['class'][] = 'toggle-active';
+  }
+  return l($toggle_text, 'shortcut/toggle', array('query' => drupal_get_destination(), 'attributes' => array('title' => $toggle_text) + $variables['attributes']));
+}
+
+/**
  * Returns the title of a shortcut set.
  *
  * Title callback for the editing pages for shortcut sets.
@@ -774,7 +862,7 @@ function shortcut_set_title($shortcut_set) {
  */
 function shortcut_library_info() {
   $libraries['drupal.shortcut.admin'] = array(
-    'title' => 'Shortcut',
+    'title' => 'Shortcut admin',
     'version' => VERSION,
     'js' => array(
       drupal_get_path('module', 'shortcut') . '/shortcut.admin.js' => array(),
@@ -784,6 +872,22 @@ function shortcut_library_info() {
       array('system', 'drupal'),
     ),
   );
+  $libraries['drupal.shortcut'] = array(
+    'title' => 'Shortcut',
+    'version' => VERSION,
+    'js' => array(
+      drupal_get_path('module', 'shortcut') . '/shortcut.js' => array(),
+    ),
+    'css' => array(
+      drupal_get_path('module', 'shortcut') . '/shortcut.base.css',
+      drupal_get_path('module', 'shortcut') . '/shortcut.theme.css',
+    ),
+    'dependencies' => array(
+      array('system', 'jquery'),
+      array('system', 'drupal'),
+      array('system', 'jquery.once'),
+    ),
+  );
 
   return $libraries;
 }
diff --git a/core/modules/shortcut/shortcut.theme-rtl.css b/core/modules/shortcut/shortcut.theme-rtl.css
index 424f38f..c1bd40b 100644
--- a/core/modules/shortcut/shortcut.theme-rtl.css
+++ b/core/modules/shortcut/shortcut.theme-rtl.css
@@ -1,4 +1,3 @@
-
 /**
  * @file
  * RTL styling for the shortcut module.
@@ -42,3 +41,11 @@
 .add-or-remove-shortcuts a:hover .text {
   border-radius: 5px 0 0 5px;
 }
+
+/**
+ * Toggle link
+ */
+#toolbar div.toolbar-menu a.toggle {
+  left: 10px;
+  right: auto;
+}
diff --git a/core/modules/shortcut/shortcut.theme.css b/core/modules/shortcut/shortcut.theme.css
index 9e2dc69..0f13ff8 100644
--- a/core/modules/shortcut/shortcut.theme.css
+++ b/core/modules/shortcut/shortcut.theme.css
@@ -1,4 +1,3 @@
-
 /**
  * @file
  * Styling for the shortcut module.
@@ -77,3 +76,29 @@
   font-size: 10px;
   line-height: 12px;
 }
+
+/**
+ * Toggle link
+ */
+#toolbar div.toolbar-menu a.toggle {
+  background: url(../toolbar/toolbar.png) 0 -20px no-repeat;
+  bottom: 0;
+  cursor: pointer;
+  height: 25px;
+  overflow: hidden;
+  position: absolute;
+  right: 10px; /* LTR */
+  text-indent: -9999px;
+  width: 25px;
+}
+#toolbar div.toolbar-menu a.toggle:focus,
+#toolbar div.toolbar-menu a.toggle:hover {
+  background-position:  -50px -20px;
+}
+#toolbar div.toolbar-menu a.toggle-active {
+  background-position:  -25px -20px;
+}
+#toolbar div.toolbar-menu a.toggle-active.toggle:focus,
+#toolbar div.toolbar-menu a.toggle-active.toggle:hover {
+  background-position:  -75px -20px;
+}
diff --git a/core/modules/toolbar/toolbar-rtl.css b/core/modules/toolbar/toolbar-rtl.css
index e121547..79a065a 100644
--- a/core/modules/toolbar/toolbar-rtl.css
+++ b/core/modules/toolbar/toolbar-rtl.css
@@ -1,4 +1,3 @@
-
 #toolbar,
 #toolbar * {
   text-align: right;
@@ -11,9 +10,6 @@
   float: none;
   zoom: 1;
 }
-#toolbar div.toolbar-menu {
-  padding: 5px 50px 5px 50px;
-}
 #toolbar-user {
   float: left;
 }
@@ -31,7 +27,3 @@
   position: absolute;
   right: 10px;
 }
-#toolbar div.toolbar-menu a.toggle {
-  left: 10px;
-  right: auto;
-}
diff --git a/core/modules/toolbar/toolbar.css b/core/modules/toolbar/toolbar.css
index bd18110..a1f5ee7 100644
--- a/core/modules/toolbar/toolbar.css
+++ b/core/modules/toolbar/toolbar.css
@@ -1,9 +1,8 @@
-
 body.toolbar {
   padding-top: 2.2em;
 }
 body.toolbar-drawer {
-  padding-top: 5.3em;
+  padding-top: 2.3em;
 }
 
 /**
@@ -42,10 +41,6 @@ body.toolbar-drawer {
   box-shadow: 0 3px 20px #000;
   z-index: 600;
 }
-#toolbar div.collapsed {
-  display: none;
-  visibility: hidden;
-}
 #toolbar a {
   color: #fff;
   font-size: .846em;
@@ -62,7 +57,7 @@ body.toolbar-drawer {
 #toolbar div.toolbar-menu {
   background: #000;
   line-height: 20px;
-  padding: 5px 50px 5px 10px; /* LTR */
+  padding: 5px 10px;
   position: relative;
 }
 #toolbar-home a span {
@@ -80,28 +75,6 @@ body.toolbar-drawer {
 #toolbar-menu {
   float: left; /* LTR */
 }
-#toolbar div.toolbar-menu a.toggle {
-  background: url(toolbar.png) 0 -20px no-repeat;
-  bottom: 0;
-  cursor: pointer;
-  height: 25px;
-  overflow: hidden;
-  position: absolute;
-  right: 10px; /* LTR */
-  text-indent: -9999px;
-  width: 25px;
-}
-#toolbar div.toolbar-menu a.toggle:focus,
-#toolbar div.toolbar-menu a.toggle:hover {
-  background-position:  -50px -20px;
-}
-#toolbar div.toolbar-menu a.toggle-active {
-  background-position:  -25px -20px;
-}
-#toolbar div.toolbar-menu a.toggle-active.toggle:focus,
-#toolbar div.toolbar-menu a.toggle-active.toggle:hover {
-  background-position:  -75px -20px;
-}
 #toolbar div.toolbar-menu ul li a {
   padding: 0 10px;
   border-radius: 10px;
@@ -119,11 +92,3 @@ body.toolbar-drawer {
   background: url(toolbar.png) 0 0 repeat-x;
   text-shadow: #333 0 1px 0;
 }
-
-/**
- * Collapsed drawer of additional toolbar content.
- */
-#toolbar div.toolbar-drawer {
-  position: relative;
-  padding: 0 10px;
-}
diff --git a/core/modules/toolbar/toolbar.js b/core/modules/toolbar/toolbar.js
index 2353050..7cb7ff3 100644
--- a/core/modules/toolbar/toolbar.js
+++ b/core/modules/toolbar/toolbar.js
@@ -1,115 +1,36 @@
-(function ($) {
+(function () {
 
 "use strict";
 
-Drupal.toolbar = Drupal.toolbar || {};
+// Store the #toolbar DOM object.
+var toolbar = document.querySelector('#toolbar');
 
 /**
- * Attach toggling behavior and notify the overlay of the toolbar.
+ * Returns the height of #toolbar element taking into account the shadow size.
+ *
+ * @return height
  */
-Drupal.behaviors.toolbar = {
-  attach: function(context, settings) {
-    var $toolbar = $('#toolbar').once('toolbar');
-    if ($toolbar.length) {
-
-      // Set the initial state of the toolbar.
-      Drupal.toolbar.init();
-
-      $(window).on('resize.toolbar', Drupal.toolbar.height);
-
-      // Toggling toolbar drawer.
-      $toolbar.find('a.toggle').once('toolbar-toggle').click(function(e) {
-        e.preventDefault();
-        Drupal.toolbar.toggle();
-        // Allow resize event handlers to recalculate sizes/positions.
-        $(window).triggerHandler('resize');
-      });
-    }
-  }
-};
-
-/**
- * Retrieve last saved cookie settings and set up the initial toolbar state.
- */
-Drupal.toolbar.init = function() {
-  // Retrieve the collapsed status from a stored cookie.
-  var collapsed = $.cookie('Drupal.toolbar.collapsed');
-
-  // Expand or collapse the toolbar based on the cookie value.
-  if (collapsed === '1') {
-    Drupal.toolbar.collapse();
-  }
-  else {
-    Drupal.toolbar.expand();
-  }
-};
-
-/**
- * Collapse the toolbar.
- */
-Drupal.toolbar.collapse = function() {
-  var toggle_text = Drupal.t('Show shortcuts');
-  $('#toolbar div.toolbar-drawer').addClass('collapsed');
-  $('#toolbar a.toggle')
-    .removeClass('toggle-active')
-    .attr('title',  toggle_text)
-    .html(toggle_text);
-  $('body').removeClass('toolbar-drawer').css('paddingTop', Drupal.toolbar.height());
-  $.cookie(
-    'Drupal.toolbar.collapsed',
-    1,
-    {
-      path: Drupal.settings.basePath,
-      // The cookie should "never" expire.
-      expires: 36500
-    }
-  );
-  Drupal.toolbar.height();
-  $(document).trigger('offsettopchange');
-};
-
-/**
- * Expand the toolbar.
- */
-Drupal.toolbar.expand = function() {
-  var toggle_text = Drupal.t('Hide shortcuts');
-  $('#toolbar div.toolbar-drawer').removeClass('collapsed');
-  $('#toolbar a.toggle')
-    .addClass('toggle-active')
-    .attr('title',  toggle_text)
-    .html(toggle_text);
-  $('body').addClass('toolbar-drawer').css('paddingTop', Drupal.toolbar.height());
-  $.cookie(
-    'Drupal.toolbar.collapsed',
-    0,
-    {
-      path: Drupal.settings.basePath,
-      // The cookie should "never" expire.
-      expires: 36500
+function toolbarHeight() {
+  var height = 0;
+  if (toolbar) {
+    height = toolbar.offsetHeight;
+    // In modern browsers (including IE9), when box-shadow is defined, use the
+    // normal height.
+    var cssBoxShadowValue = toolbar.style.boxShadow;
+    var boxShadow = (typeof cssBoxShadowValue !== 'undefined' && cssBoxShadowValue !== 'none');
+    // In IE8 and below, we use the shadow filter to apply box-shadow styles to
+    // the toolbar. It adds some extra height that we need to remove.
+    if (!boxShadow && /DXImageTransform\.Microsoft\.Shadow/.test(toolbar.style.filter)) {
+      height -= +toolbar.filters.item("DXImageTransform.Microsoft.Shadow").strength;
     }
-  );
-  Drupal.toolbar.height();
-  $(document).trigger('offsettopchange');
-};
-
-/**
- * Toggle the toolbar.
- */
-Drupal.toolbar.toggle = function() {
-  if ($('#toolbar div.toolbar-drawer').hasClass('collapsed')) {
-    Drupal.toolbar.expand();
   }
-  else {
-    Drupal.toolbar.collapse();
-  }
-};
-
-Drupal.toolbar.height = function() {
-  // @TODO this needs to be cached outside this function.
-  var $toolbar = $('#toolbar');
-  var height = $toolbar.outerHeight();
-  $toolbar.attr('data-offset-top', height);
   return height;
-};
+}
+
+// Adds the offset-top data attribute for other scripts to use.
+if (!/toolbar-processed/.test(toolbar.className)) {
+  toolbar.setAttribute('data-offset-top', toolbarHeight());
+  toolbar.className += ' toolbar-processed';
+}
 
-})(jQuery);
+}());
diff --git a/core/modules/toolbar/toolbar.module b/core/modules/toolbar/toolbar.module
index 8ff3167..0c37e65 100644
--- a/core/modules/toolbar/toolbar.module
+++ b/core/modules/toolbar/toolbar.module
@@ -42,78 +42,10 @@ function toolbar_theme($existing, $type, $theme, $path) {
     'template' => 'toolbar',
     'path' => drupal_get_path('module', 'toolbar'),
   );
-  $items['toolbar_toggle'] = array(
-    'variables' => array(
-      'collapsed' => NULL,
-      'attributes' => array(),
-    ),
-  );
-  return $items;
-}
-
-/**
- * Implements hook_menu().
- */
-function toolbar_menu() {
-  $items['toolbar/toggle'] = array(
-    'title' => 'Toggle drawer visibility',
-    'type' => MENU_CALLBACK,
-    'page callback' => 'toolbar_toggle_page',
-    'access arguments' => array('access toolbar'),
-  );
   return $items;
 }
 
 /**
- * Page callback: Toggles the visibility of the toolbar drawer.
- *
- * @see toolbar_menu().
- */
-function toolbar_toggle_page() {
-  global $base_path;
-  // Toggle the value in the cookie.
-  setcookie('Drupal.toolbar.collapsed', !_toolbar_is_collapsed(), NULL, $base_path);
-  // Redirect the user from where he used the toggle element.
-  drupal_goto();
-}
-
-/**
- * Formats an element used to toggle the toolbar drawer's visibility.
- *
- * @param $variables
- *   An associative array containing:
- *   - collapsed: A boolean value representing the toolbar drawer's visibility.
- *   - attributes: An associative array of HTML attributes.
- *
- * @return
- *   An HTML string representing the element for toggling.
- *
- * @ingroup themable
- */
-function theme_toolbar_toggle($variables) {
-  if ($variables['collapsed']) {
-    $toggle_text = t('Show shortcuts');
-  }
-  else {
-    $toggle_text = t('Hide shortcuts');
-    $variables['attributes']['class'][] = 'toggle-active';
-  }
-  return l($toggle_text, 'toolbar/toggle', array('query' => drupal_get_destination(), 'attributes' => array('title' => $toggle_text) + $variables['attributes']));
-}
-
-/**
- * Determines the current state of the toolbar drawer's visibility.
- *
- * @return
- *   TRUE when drawer is collapsed, FALSE when it is expanded.
- */
-function _toolbar_is_collapsed() {
-  // PHP converts dots into underscores in cookie names to avoid problems with
-  // its parser, so we use a converted cookie name.
-  return isset($_COOKIE['Drupal_toolbar_collapsed']) ? $_COOKIE['Drupal_toolbar_collapsed'] : 0;
-}
-
-/**
  * Implements hook_page_build().
  *
  * Add admin toolbar to the page_top region automatically.
@@ -122,7 +54,6 @@ function toolbar_page_build(&$page) {
   $page['page_top']['toolbar'] = array(
     '#pre_render' => array('toolbar_pre_render'),
     '#access' => user_access('access toolbar'),
-    'toolbar_drawer' => array(),
   );
 }
 
@@ -147,9 +78,6 @@ function toolbar_pre_render($toolbar) {
 function toolbar_preprocess_html(&$vars) {
   if (isset($vars['page']['page_top']['toolbar']) && user_access('access toolbar')) {
     $vars['attributes']['class'][] = 'toolbar';
-    if (!_toolbar_is_collapsed()) {
-      $vars['attributes']['class'][] = 'toolbar-drawer';
-    }
   }
 }
 
@@ -250,24 +178,6 @@ function toolbar_view() {
     '#attributes' => array('id' => 'toolbar-home'),
   );
 
-  // Add an anchor to be able to toggle the visibility of the drawer.
-  $build['toolbar_toggle'] = array(
-    '#theme' => 'toolbar_toggle',
-    '#collapsed' => _toolbar_is_collapsed(),
-    '#attributes' => array('class' => array('toggle')),
-  );
-
-  // Prepare the drawer links CSS classes.
-  $toolbar_drawer_classes = array(
-    'toolbar-drawer',
-    'clearfix',
-  );
-  if (_toolbar_is_collapsed()) {
-    $toolbar_drawer_classes[] = 'collapsed';
-  }
-  $build['toolbar_drawer']['#type'] = 'container';
-  $build['toolbar_drawer']['#attributes']['class'] = $toolbar_drawer_classes;
-
   return $build;
 }
 
@@ -366,18 +276,11 @@ function toolbar_library_info() {
     'title' => 'Toolbar',
     'version' => VERSION,
     'js' => array(
-      drupal_get_path('module', 'toolbar') . '/toolbar.js' => array(),
+      drupal_get_path('module', 'toolbar') . '/toolbar.js' => array('scope' => 'footer'),
     ),
     'css' => array(
       drupal_get_path('module', 'toolbar') . '/toolbar.css',
     ),
-    'dependencies' => array(
-      array('system', 'jquery'),
-      array('system', 'drupal'),
-      array('system', 'drupalSettings'),
-      array('system', 'jquery.once'),
-      array('system', 'jquery.cookie'),
-    ),
   );
 
   return $libraries;
diff --git a/core/modules/toolbar/toolbar.tpl.php b/core/modules/toolbar/toolbar.tpl.php
index 5b03fee..31dc049 100644
--- a/core/modules/toolbar/toolbar.tpl.php
+++ b/core/modules/toolbar/toolbar.tpl.php
@@ -24,10 +24,9 @@
     <?php print render($toolbar['toolbar_home']); ?>
     <?php print render($toolbar['toolbar_user']); ?>
     <?php print render($toolbar['toolbar_menu']); ?>
-    <?php if ($toolbar['toolbar_drawer']):?>
-      <?php print render($toolbar['toolbar_toggle']); ?>
-    <?php endif; ?>
   </div>
 
-  <?php print render($toolbar['toolbar_drawer']); ?>
+  <?php if (isset($toolbar['toolbar_drawer'])): ?>
+    <?php print render($toolbar['toolbar_drawer']); ?>
+  <?php endif; ?>
 </nav>
