Index: wp-includes/script-loader.php
===================================================================
--- wp-includes/script-loader.php	(revision 21917)
+++ wp-includes/script-loader.php	(working copy)
@@ -172,6 +172,8 @@
 	$scripts->add( 'jquery-table-hotkeys', "/wp-includes/js/jquery/jquery.table-hotkeys$suffix.js", array('jquery', 'jquery-hotkeys'), false, 1 );
 	$scripts->add( 'jquery-touch-punch', "/wp-includes/js/jquery/jquery.ui.touch-punch.js", array('jquery-ui-widget', 'jquery-ui-mouse'), '0.2.2', 1 );
 
+	$scripts->add( 'jquery-masonry', "/wp-includes/js/jquery.masonry$suffix.js", array('jquery'), '2.1.03', 1 );
+
 	$scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20111117', 1 );
 	did_action( 'init' ) && $scripts->localize( 'thickbox', 'thickboxL10n', array(
 			'next' => __('Next &gt;'),
Index: wp-admin/custom-header.php
===================================================================
--- wp-admin/custom-header.php	(revision 21917)
+++ wp-admin/custom-header.php	(working copy)
@@ -170,12 +170,15 @@
 	function js_includes() {
 		$step = $this->step();
 
+		wp_enqueue_script( 'jquery-masonry' );
+		
 		if ( ( 1 == $step || 3 == $step ) ) {
 			add_thickbox();
 			wp_enqueue_script( 'media-upload' );
 			wp_enqueue_script( 'custom-header' );
-			if ( current_theme_supports( 'custom-header', 'header-text' ) )
-				wp_enqueue_script('farbtastic');
+			if ( current_theme_supports( 'custom-header', 'header-text' ) ) {
+				wp_enqueue_script( 'farbtastic' );
+			}
 		} elseif ( 2 == $step ) {
 			wp_enqueue_script('imgareaselect');
 		}
@@ -393,6 +396,14 @@
 			});
 		});
 
+		var container = $('.available-headers');
+		container.imagesLoaded(function(){
+			container.masonry({
+				itemSelector: '.default-header',
+				columnWidth: 230
+			});
+		});
+
 		farbtastic = $.farbtastic('#color-picker', function(color) { pickColor(color); });
 		<?php if ( display_header_text() ) { ?>
 		pickColor('#<?php echo get_header_textcolor(); ?>');
