Index: src/wp-admin/js/media-upload.js
===================================================================
--- src/wp-admin/js/media-upload.js	(revision 26321)
+++ src/wp-admin/js/media-upload.js	(working copy)
@@ -50,17 +50,22 @@
 var tb_position;
 (function($) {
 	tb_position = function() {
-		var tbWindow = $('#TB_window'), width = $(window).width(), H = $(window).height(), W = ( 720 < width ) ? 720 : width, adminbar_height = 0;
+		var tbWindow = $('#TB_window'),
+			width = $(window).width(),
+			H = $(window).height(),
+			W = ( 720 < width ) ? 720 : width,
+			adminbar_height = 0;
 
-		if ( $('body.admin-bar').length )
-			adminbar_height = 28;
+		if ( $('body.admin-bar').length ) {
+			adminbar_height = parseInt( jQuery('#wpadminbar').css('height'), 10 );
+		}
 
 		if ( tbWindow.size() ) {
 			tbWindow.width( W - 50 ).height( H - 45 - adminbar_height );
 			$('#TB_iframeContent').width( W - 50 ).height( H - 75 - adminbar_height );
-			tbWindow.css({'margin-left': '-' + parseInt((( W - 50 ) / 2),10) + 'px'});
-			if ( typeof document.body.style.maxWidth != 'undefined' )
-				tbWindow.css({'top': 20 + adminbar_height + 'px','margin-top':'0'});
+			tbWindow.css({'margin-left': '-' + parseInt( ( ( W - 50 ) / 2 ), 10 ) + 'px'});
+			if ( typeof document.body.style.maxWidth !== 'undefined' )
+				tbWindow.css({'top': 20 + adminbar_height + 'px', 'margin-top': '0'});
 		}
 
 		return $('a.thickbox').each( function() {
Index: src/wp-admin/js/plugin-install.js
===================================================================
--- src/wp-admin/js/plugin-install.js	(revision 26321)
+++ src/wp-admin/js/plugin-install.js	(working copy)
@@ -4,17 +4,22 @@
 var tb_position;
 jQuery(document).ready(function($) {
 	tb_position = function() {
-		var tbWindow = $('#TB_window'), width = $(window).width(), H = $(window).height(), W = ( 720 < width ) ? 720 : width, adminbar_height = 0;
+		var tbWindow = $('#TB_window'),
+			width = $(window).width(),
+			H = $(window).height(),
+			W = ( 720 < width ) ? 720 : width,
+			adminbar_height = 0;
 
-		if ( $('body.admin-bar').length )
-			adminbar_height = 28;
+		if ( $('body.admin-bar').length ) {
+			adminbar_height = parseInt( jQuery('#wpadminbar').css('height'), 10 );
+		}
 
 		if ( tbWindow.size() ) {
 			tbWindow.width( W - 50 ).height( H - 45 - adminbar_height );
 			$('#TB_iframeContent').width( W - 50 ).height( H - 75 - adminbar_height );
-			tbWindow.css({'margin-left': '-' + parseInt((( W - 50 ) / 2),10) + 'px'});
-			if ( typeof document.body.style.maxWidth != 'undefined' )
-				tbWindow.css({'top': 20 + adminbar_height + 'px','margin-top':'0'});
+			tbWindow.css({'margin-left': '-' + parseInt( ( ( W - 50 ) / 2 ), 10 ) + 'px'});
+			if ( typeof document.body.style.maxWidth !== 'undefined' )
+				tbWindow.css({'top': 20 + adminbar_height + 'px', 'margin-top': '0'});
 		}
 
 		return $('a.thickbox').each( function() {
Index: src/wp-admin/js/theme-install.js
===================================================================
--- src/wp-admin/js/theme-install.js	(revision 26321)
+++ src/wp-admin/js/theme-install.js	(working copy)
@@ -23,33 +23,6 @@
 });
 
 /**
- * Theme Browser Thickbox
- *
- * Aligns theme browser thickbox.
- */
-var tb_position;
-jQuery(document).ready( function($) {
-	tb_position = function() {
-		var tbWindow = $('#TB_window'), width = $(window).width(), H = $(window).height(), W = ( 1040 < width ) ? 1040 : width, adminbar_height = 0;
-
-		if ( $('body.admin-bar').length ) {
-			adminbar_height = 28;
-		}
-
-		if ( tbWindow.size() ) {
-			tbWindow.width( W - 50 ).height( H - 45 - adminbar_height );
-			$('#TB_iframeContent').width( W - 50 ).height( H - 75 - adminbar_height );
-			tbWindow.css({'margin-left': '-' + parseInt( ( ( W - 50 ) / 2 ), 10 ) + 'px'});
-			if ( typeof document.body.style.maxWidth !== 'undefined' ) {
-				tbWindow.css({'top': 20 + adminbar_height + 'px','margin-top':'0'});
-			}
-		}
-	};
-
-	$(window).resize(function(){ tb_position(); });
-});
-
-/**
  * Theme Install
  *
  * Displays theme previews on theme install pages.
Index: src/wp-admin/js/theme.js
===================================================================
--- src/wp-admin/js/theme.js	(revision 26321)
+++ src/wp-admin/js/theme.js	(working copy)
@@ -661,3 +661,30 @@
 );
 
 })( jQuery );
+
+// Align theme browser thickbox
+var tb_position;
+jQuery(document).ready( function($) {
+	tb_position = function() {
+		var tbWindow = $('#TB_window'),
+			width = $(window).width(),
+			H = $(window).height(),
+			W = ( 1040 < width ) ? 1040 : width,
+			adminbar_height = 0;
+
+		if ( $('body.admin-bar').length ) {
+			adminbar_height = parseInt( jQuery('#wpadminbar').css('height'), 10 );
+		}
+
+		if ( tbWindow.size() ) {
+			tbWindow.width( W - 50 ).height( H - 45 - adminbar_height );
+			$('#TB_iframeContent').width( W - 50 ).height( H - 75 - adminbar_height );
+			tbWindow.css({'margin-left': '-' + parseInt( ( ( W - 50 ) / 2 ), 10 ) + 'px'});
+			if ( typeof document.body.style.maxWidth !== 'undefined' ) {
+				tbWindow.css({'top': 20 + adminbar_height + 'px', 'margin-top': '0'});
+			}
+		}
+	};
+
+	$(window).resize(function(){ tb_position(); });
+});
