diff --git a/core/modules/overlay/overlay-child.js b/core/modules/overlay/overlay-child.js
index 6a2da9e..f67b81d 100644
--- a/core/modules/overlay/overlay-child.js
+++ b/core/modules/overlay/overlay-child.js
@@ -18,7 +18,7 @@ Drupal.behaviors.overlayChild = {
       window.location = window.location.href.replace(/([?&]?)render=overlay&?/g, '$1').replace(/\?$/, '');
     }
 
-    var settings = settings.overlayChild || {};
+    settings = settings.overlayChild || {};
 
     // If the entire parent window should be refreshed when the overlay is
     // closed, pass that information to the parent window.
@@ -190,7 +190,7 @@ Drupal.overlayChild.behaviors.alterTableHeaderOffset = function (context, settin
 Drupal.overlayChild.tableHeaderOffset = function () {
   var topOffset = Drupal.overlayChild.prevTableHeaderOffset ? eval(Drupal.overlayChild.prevTableHeaderOffset + '()') : 0;
 
-  return topOffset + parseInt($(document.body).css('marginTop'));
+  return topOffset + parseInt($(document.body).css('marginTop'), 10);
 };
 
 })(jQuery);
diff --git a/core/modules/overlay/overlay-parent.js b/core/modules/overlay/overlay-parent.js
index 9c0b527..99f1749 100644
--- a/core/modules/overlay/overlay-parent.js
+++ b/core/modules/overlay/overlay-parent.js
@@ -388,7 +388,7 @@ Drupal.overlay.isAdminLink = function (url) {
  *   TRUE if the URL is external to the site, FALSE otherwise.
  */
 Drupal.overlay.isExternalLink = function (url) {
-  var re = RegExp('^((f|ht)tps?:)?//(?!' + window.location.host + ')');
+  var re = new RegExp('^((f|ht)tps?:)?//(?!' + window.location.host + ')');
   return re.test(url);
 };
 
@@ -456,7 +456,7 @@ Drupal.overlay.eventhandlerAlterDisplacedElements = function (event) {
     else {
       var el1 = $('<div style="direction: rtl; overflow: scroll;"></div>').appendTo(document.body);
       var el2 = $('<div></div>').appendTo(el1);
-      Drupal.overlay.leftSidedScrollbarOffset = parseInt(el2[0].offsetLeft - el1[0].offsetLeft);
+      Drupal.overlay.leftSidedScrollbarOffset = parseInt(el2[0].offsetLeft - el1[0].offsetLeft, 10);
       el1.remove();
     }
   }
@@ -476,7 +476,7 @@ Drupal.overlay.eventhandlerAlterDisplacedElements = function (event) {
     }
 
     // Prevent displaced elements overlapping window's scrollbar.
-    var currentMaxWidth = parseInt($(this).css(maxWidthName));
+    var currentMaxWidth = parseInt($(this).css(maxWidthName), 10);
     if ((data.drupalOverlay && data.drupalOverlay.maxWidth) || isNaN(currentMaxWidth) || currentMaxWidth > maxWidth || currentMaxWidth <= 0) {
       $(this).css(maxWidthName, maxWidth);
       (data.drupalOverlay = data.drupalOverlay || {}).maxWidth = true;
@@ -576,9 +576,7 @@ Drupal.overlay.eventhandlerOverrideLink = function (event) {
     else if (this.isAdminLink(href)) {
       // If the link contains the overlay-restore class and the overlay-context
       // state is set, also update the parent window's location.
-      var parentLocation = ($target.hasClass('overlay-restore') && typeof $.bbq.getState('overlay-context') === 'string')
-        ? Drupal.url($.bbq.getState('overlay-context'))
-        : null;
+      var parentLocation = ($target.hasClass('overlay-restore') && typeof $.bbq.getState('overlay-context') === 'string') ? Drupal.url($.bbq.getState('overlay-context')) : null;
       href = this.fragmentizeLink($target.get(0), parentLocation);
       // Only override default behavior when left-clicking and user is not
       // pressing the ALT, CTRL, META (Command key on the Macintosh keyboard)
