Index: wp-includes/nav-menu-template.php
===================================================================
--- wp-includes/nav-menu-template.php	(revision 14247)
+++ wp-includes/nav-menu-template.php	(working copy)
@@ -8,6 +8,160 @@
  */
 
 /**
+ * Create HTML list of nav menu items.
+ *
+ * @package WordPress
+ * @since 3.0.0
+ * @uses Walker
+ */
+class Walker_Nav_Menu extends Walker {
+	/**
+	 * @see Walker::$tree_type
+	 * @since 3.0.0
+	 * @var string
+	 */
+	var $tree_type = array( 'post_type', 'taxonomy', 'custom' );
+
+	/**
+	 * @see Walker::$db_fields
+	 * @since 3.0.0
+	 * @todo Decouple this.
+	 * @var array
+	 */
+	var $db_fields = array( 'parent' => 'post_parent', 'id' => 'object_id' );
+
+	/**
+	 * @see Walker::start_lvl()
+	 * @since 3.0.0
+	 *
+	 * @param string $output Passed by reference. Used to append additional content.
+	 * @param int $depth Depth of page. Used for padding.
+	 */
+	function start_lvl(&$output, $depth) {
+		$indent = str_repeat("\t", $depth);
+		$output .= "\n$indent<ul class=\"sub-menu\">\n";
+	}
+
+	/**
+	 * @see Walker::end_lvl()
+	 * @since 3.0.0
+	 *
+	 * @param string $output Passed by reference. Used to append additional content.
+	 * @param int $depth Depth of page. Used for padding.
+	 */
+	function end_lvl(&$output, $depth) {
+		$indent = str_repeat("\t", $depth);
+		$output .= "$indent</ul>\n";
+	}
+
+	/**
+	 * @see Walker::start_el()
+	 * @since 3.0.0
+	 *
+	 * @param string $output Passed by reference. Used to append additional content.
+	 * @param object $item Menu item data object.
+	 * @param int $depth Depth of menu item. Used for padding.
+	 * @param int $current_page Menu item ID.
+	 * @param object $args
+	 */
+	function start_el(&$output, $item, $depth, $args) {
+		global $wp_query;
+		$indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
+
+		$classes = $value = '';
+
+		$classes = array( 'menu-item', 'menu-item-type-'. $item->type, $item->classes );
+
+		if ( 'custom' != $item->object )
+			$classes[] = 'menu-item-object-'. $item->object;
+
+		if ( $item->object_id == $wp_query->get_queried_object_id() )
+			$classes[] = 'current-menu-item';
+
+		// @todo add classes for parent/child relationships
+
+		$classes = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) );
+		$classes = ' class="' . esc_attr( $classes ) . '"';
+
+		$output .= $indent . '<li id="menu-item-'. $item->ID . '"' . $value . $classes .'>';
+		
+		$attributes  = ! empty( $item->attr_title ) ? ' title="'  . esc_attr( $item->attr_title ) .'"' : '';
+		$attributes .= ! empty( $item->target )     ? ' target="' . esc_attr( $item->target     ) .'"' : '';
+		$attributes .= ! empty( $item->xfn )        ? ' rel="'    . esc_attr( $item->xfn        ) .'"' : '';
+		$attributes .= ! empty( $item->url )        ? ' href="'   . esc_attr( $item->url        ) .'"' : '';
+
+		$item_output = $args->before;
+		$item_output .= '<a'. $attributes .'>';
+		$item_output .= $args->link_before . apply_filters( 'the_title', $item->title ) . $args->link_after;
+		$item_output .= '</a>';
+		$item_output .= $args->after;
+	
+		$output .= apply_filters( 'wp_get_nav_menu_item', $item_output, $args );
+	}
+
+	/**
+	 * @see Walker::end_el()
+	 * @since 3.0.0
+	 *
+	 * @param string $output Passed by reference. Used to append additional content.
+	 * @param object $item Page data object. Not used.
+	 * @param int $depth Depth of page. Not Used.
+	 */
+	function end_el(&$output, $item, $depth) {
+		$output .= "</li>\n";
+	}
+}
+
+/**
+ * Create HTML list of nav menu input items.
+ *
+ * @package WordPress
+ * @since 3.0.0
+ * @uses Walker_Nav_Menu
+ */
+class Walker_Nav_Menu_Checklist extends Walker_Nav_Menu  {
+
+	/**
+	 * @see Walker::start_el()
+	 * @since 3.0.0
+	 *
+	 * @param string $output Passed by reference. Used to append additional content.
+	 * @param object $item Menu item data object.
+	 * @param int $depth Depth of menu item. Used for padding.
+	 * @param int $current_page Menu item ID.
+	 * @param object $args
+	 */
+	function start_el(&$output, $item, $depth, $args) {
+		static $_placeholder;
+		$_placeholder = 0 > $_placeholder ? $_placeholder - 1 : -1;
+		$possible_object_id = isset( $item->post_type ) && 'nav_menu_item' == $item->post_type ? $item->object_id : $_placeholder;
+		$possible_db_id = ( ! empty( $item->ID ) ) && ( 0 < $possible_object_id ) ? (int) $item->ID : 0;
+
+		$indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
+
+		$output .= $indent . '<li>';
+		$output .= '<label class="menu-item-title">';
+		$output .= '<input type="checkbox" name="menu-item[' . $possible_object_id . '][menu-item-object-id]" value="'. esc_attr( $item->object_id ) .'" />';
+		$output .= $item->title .'</label>';
+
+		// Menu item hidden fields
+		$output .= '<input type="hidden" class="menu-item-db-id" name="menu-item[' . $possible_object_id . '][menu-item-db-id]" value="' . $possible_db_id . '" />';
+		$output .= '<input type="hidden" class="menu-item-object" name="menu-item[' . $possible_object_id . '][menu-item-object]" value="'. esc_attr( $item->object ) .'" />';
+		$output .= '<input type="hidden" class="menu-item-parent-id" name="menu-item[' . $possible_object_id . '][menu-item-parent-id]" value="'. esc_attr( $item->post_parent ) .'" />';
+		$output .= '<input type="hidden" class="menu-item-type" name="menu-item[' . $possible_object_id . '][menu-item-type]" value="'. esc_attr( $item->type ) .'" />';
+		$output .= '<input type="hidden" class="menu-item-append" name="menu-item[' . $possible_object_id . '][menu-item-append]" value="'. esc_attr( $item->append ) .'" />';
+		$output .= '<input type="hidden" class="menu-item-title" name="menu-item[' . $possible_object_id . '][menu-item-title]" value="'. esc_attr( $item->title ) .'" />';
+		$output .= '<input type="hidden" class="menu-item-url" name="menu-item[' . $possible_object_id . '][menu-item-url]" value="'. esc_attr( $item->url ) .'" />';
+		$output .= '<input type="hidden" class="menu-item-append" name="menu-item[' . $possible_object_id . '][menu-item-append]" value="'. esc_attr( $item->append ) .'" />';
+		$output .= '<input type="hidden" class="menu-item-target" name="menu-item[' . $possible_object_id . '][menu-item-target]" value="'. esc_attr( $item->target ) .'" />';
+		$output .= '<input type="hidden" class="menu-item-attr_title" name="menu-item[' . $possible_object_id . '][menu-item-attr_title]" value="'. esc_attr( $item->attr_title ) .'" />';
+		$output .= '<input type="hidden" class="menu-item-description" name="menu-item[' . $possible_object_id . '][menu-item-description]" value="'. esc_attr( $item->description ) .'" />';
+		$output .= '<input type="hidden" class="menu-item-classes" name="menu-item[' . $possible_object_id . '][menu-item-classes]" value="'. esc_attr( $item->classes ) .'" />';
+		$output .= '<input type="hidden" class="menu-item-xfn" name="menu-item[' . $possible_object_id . '][menu-item-xfn]" value="'. esc_attr( $item->xfn ) .'" />';
+	}
+}
+
+/**
  * Displays a navigation menu.
  *
  * Optional $args contents:
@@ -17,9 +171,6 @@
  * menu_class - CSS class to use for the div container of the menu list. Defaults to 'menu'.
  * format - Whether to format the ul. Defaults to 'div'.
  * fallback_cb - If the menu doesn't exists, a callback function will fire. Defaults to 'wp_page_menu'.
- * container - Type of container tag. Avalible options div, p, or nav. Defaults to 'div'. 
- * container_class - Chooses a class for the container.
- * container_id - Chooses an id for the container.
  * before - Text before the link text.
  * after - Text after the link text.
  * link_before - Text before the link.
@@ -33,7 +184,7 @@
  * @param array $args Arguments
  */
 function wp_nav_menu( $args = array() ) {
-	$defaults = array( 'menu' => '', 'container' => 'div', 'container_class' => '', 'container_id' => '', 'menu_class' => 'menu', 'echo' => true,
+	$defaults = array( 'menu' => '', 'container' => 'div', 'container_class' => '', 'menu_class' => 'menu', 'echo' => true,
 	'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '',
 	'depth' => 0, 'walker' => '', 'context' => 'frontend' );
 
@@ -46,7 +197,7 @@
 
 	// If we couldn't find a menu based off the name, id or slug,
 	// get the first menu that has items.
-	if ( !$menu ) {
+	if ( ! $menu ) {
 		$menus = wp_get_nav_menus();
 		foreach ( $menus as $menu_maybe ) {
 			if ( wp_get_nav_menu_items($menu_maybe->term_id) ) {
@@ -56,9 +207,9 @@
 		}
 	}
 	
-	// If the menu exists, get it's items.
-	if ( $menu && !is_wp_error($menu) )
-		$menu_items = wp_get_nav_menu_items( $menu->term_id, $args->context );
+	// If the menu exists, get its items.
+	if ( $menu && ! is_wp_error($menu) )
+		$menu_items = wp_get_nav_menu_items( $menu->term_id );
 
 	// If no menu was found or if the menu has no items, call the fallback_cb
 	if ( !$menu || is_wp_error($menu) || ( isset($menu_items) && empty($menu_items) ) ) {
@@ -73,15 +224,15 @@
 
 	if ( in_array( $args->container, $container_allowedtags ) ) {
 		$class = $args->container_class ? ' class="' . esc_attr($args->container_class) . '"' : ' class="menu-'. $menu->slug .'-container"';
-		$container_id = $args->container_id ? ' id="' . esc_attr($args->container_id) . '"' : '' ;
-		$nav_menu .= '<'. $args->container . $class . $container_id .'>';
+		$nav_menu .= '<'. $args->container . $class .'>';
 	}
 
 	// Set up the $menu_item variables
+	$sorted_menu_items = array();
 	foreach ( (array) $menu_items as $key => $menu_item )
-		$menu_items[$menu_item->menu_order] = wp_setup_nav_menu_item( $menu_item, 'frontend' );
+		$sorted_menu_items[$menu_item->menu_order] = wp_setup_nav_menu_item( $menu_item );
 
-	$items .= walk_nav_menu_tree( $menu_items, $args->depth, $args );
+	$items .= walk_nav_menu_tree( $sorted_menu_items, $args->depth, $args );
 
 	// Attributes	
 	$attributes  = ' id="menu-' . $menu->slug . '"';
@@ -112,83 +263,17 @@
 }
 
 /**
- * Returns the menu item formatted based on it's context.
+ * Retrieve the HTML list content for nav menu items.
  *
- * @since 3.0.0
- *
- * @param string $menu_item The menu item to format.
- * @param string $context The context to which the menu item will be formatted to.
- * @param string $args Optional. Args used for the 'template' context.
- * @return string $output The menu formatted menu item.
+ * @uses Walker_Nav_Menu to create HTML list content.
+ * @since 2.1.0
+ * @see Walker::walk() for parameters and return description.
  */
-function wp_get_nav_menu_item( $menu_item, $context = 'frontend', $args = array() ) {
-	$output = '';
-	switch ( $context ) {
-		case 'frontend':
-			$attributes  = ! empty( $menu_item->attr_title ) ? ' title="'  . esc_attr( $menu_item->attr_title ) .'"' : '';
-			$attributes .= ! empty( $menu_item->target )     ? ' target="' . esc_attr( $menu_item->target     ) .'"' : '';
-			$attributes .= ! empty( $menu_item->xfn )        ? ' rel="'    . esc_attr( $menu_item->xfn        ) .'"' : '';
-			$attributes .= ! empty( $menu_item->url )        ? ' href="'   . esc_attr( $menu_item->url        ) .'"' : '';
+function walk_nav_menu_tree( $items, $depth, $r ) {
+	$walker = ( empty($r->walker) ) ? new Walker_Nav_Menu : $r->walker;
+	$args = array( $items, $depth, $r );
 
-			$output .= $args->before;
-			$output .= '<a'. $attributes .'>';
-			$output .= $args->link_before . apply_filters( 'the_title', $menu_item->title ) . $args->link_after;
-			$output .= '</a>';
-			$output .= $args->after;
+	return call_user_func_array( array(&$walker, 'walk'), $args );
+}
 
-			break;
-
-		case 'backend':
-			$output .= '<dl><dt>';
-			$output .= '<span class="item-title">'. esc_html( $menu_item->title ) .'</span>';
-			$output .= '<span class="item-controls">';
-			$output .= '<span class="item-type">'. esc_html( $menu_item->append ) .'</span>';
-
-			// Actions
-			$output .= '<a class="item-edit thickbox" id="edit-'. esc_attr( $menu_item->ID ) .'" value="'. esc_attr( $menu_item->ID ) .'" title="'. __('Edit Menu Item') .'" href="#TB_inline?height=540&width=300&inlineId=menu-item-settings">'. __('Edit') .'</a> | ';
-			$output .= '<a class="item-delete" id="delete-'. esc_attr( $menu_item->ID ) .'" value="'. esc_attr( $menu_item->ID ) .'">'. __('Delete') .'</a>';
-
-			$output .= '</span></dt></dl>';
-
-			// Menu Item Settings
-			$output .= '<input type="hidden" name="menu-item-db-id[]" value="'. esc_attr( $menu_item->ID ) .'" />';
-			$output .= '<input type="hidden" name="menu-item-object-id[]" value="'. esc_attr( $menu_item->object_id ) .'" />';
-			$output .= '<input type="hidden" name="menu-item-object[]" value="'. esc_attr( $menu_item->object ) .'" />';
-			$output .= '<input type="hidden" name="menu-item-parent-id[]" value="'. esc_attr( $menu_item->post_parent ) .'" />';
-			$output .= '<input type="hidden" name="menu-item-position[]" value="'. esc_attr( $menu_item->menu_order ) .'" />';
-			$output .= '<input type="hidden" name="menu-item-type[]" value="'. esc_attr( $menu_item->type ) .'" />';
-			$output .= '<input type="hidden" name="menu-item-title[]" value="'. esc_attr( $menu_item->title ) .'" />';
-			$output .= '<input type="hidden" name="menu-item-url[]" value="'. esc_attr( $menu_item->url ) .'" />';
-			$output .= '<input type="hidden" name="menu-item-description[]" value="'. esc_attr( $menu_item->description ) .'" />';
-			$output .= '<input type="hidden" name="menu-item-classes[]" value="'. esc_attr( $menu_item->classes ) .'" />';
-			$output .= '<input type="hidden" name="menu-item-xfn[]" value="'. esc_attr( $menu_item->xfn ) .'" />';
-			$output .= '<input type="hidden" name="menu-item-attr-title[]" value="'.esc_attr( $menu_item->post_excerpt )  .'" />';
-			$output .= '<input type="hidden" name="menu-item-target[]" value="'. esc_attr( $menu_item->target ) .'" />';
-			break;
-
-		case 'custom':
-		case 'taxonomy':
-		case 'post_type':
-			$output .= '<label class="menu-item-title"><input type="checkbox" id="'. esc_attr( 'menu-item-' . $menu_item->object_id ) .'" value="'. esc_attr( $menu_item->url ) .'" />'. $menu_item->title .'</label>';
-
-			// Menu item hidden fields
-			$output .= '<input type="hidden" class="menu-item-db-id" value="0" />';
-			$output .= '<input type="hidden" class="menu-item-object-id" value="'. esc_attr( $menu_item->object_id ) .'" />';
-			$output .= '<input type="hidden" class="menu-item-object" value="'. esc_attr( $menu_item->object ) .'" />';
-			$output .= '<input type="hidden" class="menu-item-parent-id" value="'. esc_attr( $menu_item->post_parent ) .'" />';
-			$output .= '<input type="hidden" class="menu-item-type" value="'. esc_attr( $menu_item->type ) .'" />';
-			$output .= '<input type="hidden" class="menu-item-append" value="'. esc_attr( $menu_item->append ) .'" />';
-			$output .= '<input type="hidden" class="menu-item-title" value="'. esc_attr( $menu_item->title ) .'" />';
-			$output .= '<input type="hidden" class="menu-item-url" value="'. esc_attr( $menu_item->url ) .'" />';
-			$output .= '<input type="hidden" class="menu-item-append" value="'. esc_attr( $menu_item->append ) .'" />';
-			$output .= '<input type="hidden" class="menu-item-target" value="'. esc_attr( $menu_item->target ) .'" />';
-			$output .= '<input type="hidden" class="menu-item-attr_title" value="'. esc_attr( $menu_item->attr_title ) .'" />';
-			$output .= '<input type="hidden" class="menu-item-description" value="'. esc_attr( $menu_item->description ) .'" />';
-			$output .= '<input type="hidden" class="menu-item-classes" value="'. esc_attr( $menu_item->classes ) .'" />';
-			$output .= '<input type="hidden" class="menu-item-xfn" value="'. esc_attr( $menu_item->xfn ) .'" />';
-			break;
-	}
-
-	return apply_filters( 'wp_get_nav_menu_item', $output, $context, $args );
-}
-?>
\ No newline at end of file
+?>
Index: wp-includes/post.php
===================================================================
--- wp-includes/post.php	(revision 14247)
+++ wp-includes/post.php	(working copy)
@@ -2190,7 +2190,7 @@
 	$data = stripslashes_deep( $data );
 	$where = array( 'ID' => $post_ID );
 
-	if ($update) {
+	if ( $update ) {
 		do_action( 'pre_post_update', $post_ID );
 		if ( false === $wpdb->update( $wpdb->posts, $data, $where ) ) {
 			if ( $wp_error )
@@ -2265,7 +2265,7 @@
 
 	wp_transition_post_status($data['post_status'], $previous_status, $post);
 
-	if ( $update)
+	if ( $update )
 		do_action('edit_post', $post_ID, $post);
 
 	do_action('save_post', $post_ID, $post);
Index: wp-includes/classes.php
===================================================================
--- wp-includes/classes.php	(revision 14247)
+++ wp-includes/classes.php	(working copy)
@@ -1124,102 +1124,6 @@
 }
 
 /**
- * Create HTML list of nav menu items.
- *
- * @package WordPress
- * @since 3.0.0
- * @uses Walker
- */
-class Walker_Nav_Menu extends Walker {
-	/**
-	 * @see Walker::$tree_type
-	 * @since 3.0.0
-	 * @var string
-	 */
-	var $tree_type = array( 'post_type', 'taxonomy', 'custom' );
-
-	/**
-	 * @see Walker::$db_fields
-	 * @since 3.0.0
-	 * @todo Decouple this.
-	 * @var array
-	 */
-	var $db_fields = array( 'parent' => 'post_parent', 'id' => 'object_id' );
-
-	/**
-	 * @see Walker::start_lvl()
-	 * @since 3.0.0
-	 *
-	 * @param string $output Passed by reference. Used to append additional content.
-	 * @param int $depth Depth of page. Used for padding.
-	 */
-	function start_lvl(&$output, $depth) {
-		$indent = str_repeat("\t", $depth);
-		$output .= "\n$indent<ul class=\"sub-menu\">\n";
-	}
-
-	/**
-	 * @see Walker::end_lvl()
-	 * @since 3.0.0
-	 *
-	 * @param string $output Passed by reference. Used to append additional content.
-	 * @param int $depth Depth of page. Used for padding.
-	 */
-	function end_lvl(&$output, $depth) {
-		$indent = str_repeat("\t", $depth);
-		$output .= "$indent</ul>\n";
-	}
-
-	/**
-	 * @see Walker::start_el()
-	 * @since 3.0.0
-	 *
-	 * @param string $output Passed by reference. Used to append additional content.
-	 * @param object $item Menu item data object.
-	 * @param int $depth Depth of menu item. Used for padding.
-	 * @param int $current_page Menu item ID.
-	 * @param object $args
-	 */
-	function start_el(&$output, $item, $depth, $args) {
-		$indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
-
-		$classes = $value = '';
-		if ( 'frontend' == $args->context ) {
-			global $wp_query;
-
-			$classes = array( 'menu-item', 'menu-item-type-'. $item->type, $item->classes );
-
-			if ( 'custom' != $item->object )
-				$classes[] = 'menu-item-object-'. $item->object;
-
-			if ( $item->object_id == $wp_query->get_queried_object_id() )
-				$classes[] = 'current-menu-item';
-
-			// @todo add classes for parent/child relationships
-
-			$classes = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) );
-			$classes = ' class="' . esc_attr( $classes ) . '"';
-		} else {
-			$value = ' value="' . $item->ID . '"';
-		}
-
-		$output .= $indent . '<li id="menu-item-'. $item->ID . '"' . $value . $classes .'>' . wp_get_nav_menu_item( $item, $args->context, $args );
-	}
-
-	/**
-	 * @see Walker::end_el()
-	 * @since 3.0.0
-	 *
-	 * @param string $output Passed by reference. Used to append additional content.
-	 * @param object $item Page data object. Not used.
-	 * @param int $depth Depth of page. Not Used.
-	 */
-	function end_el(&$output, $item, $depth) {
-		$output .= "</li>\n";
-	}
-}
-
-/**
  * Create HTML list of pages.
  *
  * @package WordPress
Index: wp-includes/script-loader.php
===================================================================
--- wp-includes/script-loader.php	(revision 14247)
+++ wp-includes/script-loader.php	(working copy)
@@ -393,12 +393,13 @@
 		) );
 
 		// Custom Navigation
-		$scripts->add( 'nav-menu', "/wp-admin/js/nav-menu$suffix.js", false, '20100403' );
+		$scripts->add( 'nav-menu', "/wp-admin/js/nav-menu$suffix.js", false, '20100426' );
 		$scripts->localize( 'nav-menu', 'navMenuL10n', array(
 			'custom' => _x('Custom', 'menu nav item type'),
 			'thickbox' => _x('Edit Menu Item', 'Thickbox Title'),
 			'edit' => _x('Edit', 'menu item edit text'),
-			'warnDelete' => __( "You are about to permanently delete this menu. \n 'Cancel' to stop, 'OK' to delete." ),
+			'warnDeleteMenu' => __( "You are about to permanently delete this menu. \n 'Cancel' to stop, 'OK' to delete." ),
+			'warnDeleteMenuItem' => __( "You are about to permanently delete this menu item. \n 'Cancel' to stop, 'OK' to delete." ),
 		) );
 
 		$scripts->add( 'custom-background', "/wp-admin/js/custom-background$suffix.js", array('farbtastic'), '20100321' );
@@ -472,7 +473,7 @@
 	$styles->add( 'farbtastic', '/wp-admin/css/farbtastic.css', array(), '1.2' );
 	$styles->add( 'jcrop', '/wp-includes/js/jcrop/jquery.Jcrop.css', array(), '0.9.8' );
 	$styles->add( 'imgareaselect', '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.1' );
-	$styles->add( 'nav-menu', "/wp-admin/css/nav-menu$suffix.css", array(), '20100322' );
+	$styles->add( 'nav-menu', "/wp-admin/css/nav-menu$suffix.css", array(), '20100426' );
 
 	foreach ( $rtl_styles as $rtl_style ) {
 		$styles->add_data( $rtl_style, 'rtl', true );
Index: wp-includes/nav-menu.php
===================================================================
--- wp-includes/nav-menu.php	(revision 14247)
+++ wp-includes/nav-menu.php	(working copy)
@@ -16,7 +16,22 @@
  * @return mixed $menu|false Or WP_Error
  */
 function wp_get_nav_menu_object( $menu ) {
-	return is_nav_menu( $menu );
+	if ( ! $menu ) 
+		return false;
+
+	$menu_obj = get_term( $menu, 'nav_menu' );
+
+	if ( ! $menu_obj )
+		$menu_obj = get_term_by( 'slug', $menu, 'nav_menu' );
+
+	if ( ! $menu_obj )
+		$menu_obj = get_term_by( 'name', $menu, 'nav_menu' );
+
+	if ( ! $menu_obj ) {
+		$menu_obj = false;
+	}
+
+	return $menu_obj;
 }
 
 /**
@@ -27,25 +42,18 @@
  * @since 3.0.0
  *
  * @param int|string $menu The menu to check
- * @return mixed Menu Object, if it exists. Else, false or WP_Error
+ * @return bool Whether the menu exists.
  */
 function is_nav_menu( $menu ) {
-	if ( !$menu )
+	if ( ! $menu )
 		return false;
+	
+	$menu_obj = wp_get_nav_menu_object( $menu );
 
-	$menu_obj = get_term( $menu, 'nav_menu' );
-
-	if ( !$menu_obj )
-		$menu_obj = get_term_by( 'slug', $menu, 'nav_menu' );
-
-	if ( !$menu_obj )
-		$menu_obj = get_term_by( 'name', $menu, 'nav_menu' );
-
-	if ( !$menu_obj ) {
-		$menu_obj = false;
-	}
-
-	return $menu_obj;
+	if ( $menu_obj && ! is_wp_error( $menu_obj ) && ! empty( $menu_obj->term_id ) ) 
+		return true;
+	
+	return false;
 }
 
 /**
@@ -96,7 +104,7 @@
  */
 function wp_delete_nav_menu( $menu ) {
 	$menu = wp_get_nav_menu_object( $menu );
-	if ( !$menu  )
+	if ( ! $menu  )
 		return false;
 
 	$menu_objects = get_objects_in_term( $menu->term_id, 'nav_menu' );
@@ -117,6 +125,151 @@
 }
 
 /**
+ * Save the properties of a menu or create a new menu with those properties.
+ *
+ * @since 3.0.0
+ *
+ * @param int $menu_id The ID of the menu
+ * @param array $menu_data The array of menu data.
+ * @return int The menu's ID.
+ */
+function wp_update_nav_menu_object( $menu_id = 0, $menu_data = array() ) {
+	$menu_id = (int) $menu_id;
+
+	$_menu = wp_get_nav_menu_object( $menu_id );
+
+	// menu doesn't already exist
+	if ( ! $_menu || is_wp_error( $_menu ) ) {
+		$_menu = wp_create_nav_menu( $menu_data['menu-name'] );
+	}
+
+	if ( $_menu && isset( $_menu->term_id ) && ! is_wp_error( $_menu ) ) {
+		$args = array( 
+			'description' => ( isset( $menu_data['description'] ) ? $menu_data['description'] : '' ), 
+			'name' => ( isset( $menu_data['menu-name'] ) ? $menu_data['menu-name'] : '' ), 
+			'parent' => ( isset( $menu_data['parent'] ) ? (int) $menu_data['parent'] : 0 ), 
+			'slug' => null, 
+		);
+	
+		$menu_id = (int) $_menu->term_id;
+
+		$update_response = wp_update_term( $menu_id, 'nav_menu', $args );
+
+		if ( ! is_wp_error( $update_response ) ) {
+			return $menu_id;
+		}
+	} else {
+		return 0;
+	}
+}
+
+/**
+ * Save the properties of a menu item or create a new one.
+ *
+ * @since 3.0.0
+ *
+ * @param int $menu_id The ID of the menu. Required.
+ * @param int $menu_item_db_id The ID of the menu item. If "0", creates a new menu item.
+ * @param array $menu_item_data The menu item's data.
+ * @return int The menu item's database ID or WP_Error object on failure.
+ */
+function wp_update_nav_menu_item( $menu_id = 0, $menu_item_db_id = 0, $menu_item_data = array() ) {
+
+	$menu_id = (int) $menu_id;
+	$menu_item_db_id = (int) $menu_item_db_id;
+
+	$menu = wp_get_nav_menu_object( $menu_id );
+
+	if ( ! $menu || is_wp_error( $menu ) ) {
+		return $menu;
+	}
+
+	$menu_items = (array) wp_get_nav_menu_items( $menu_id );
+
+	$count = count( $menu_items );
+
+	$defaults = array(
+		'menu-item-db-id' => $menu_item_db_id,
+		'menu-item-object-id' => 0,
+		'menu-item-object' => '',
+		'menu-item-parent-id' => 0,
+		'menu-item-position' => 0,
+		'menu-item-type' => 'custom',
+		'menu-item-append' => 'custom',
+		'menu-item-title' => '',
+		'menu-item-url' => '',
+		'menu-item-description' => '',
+		'menu-item-attr-title' => '',
+		'menu-item-target' => '',
+		'menu-item-classes' => '',
+		'menu-item-xfn' => '',
+	);
+
+	$args = wp_parse_args( $menu_item_data, $defaults );
+
+	if ( 0 == (int) $args['menu-item-position'] ) {
+		$last_item = array_pop( $menu_items );
+		if ( $last_item && isset( $last_item->ID ) ) {
+			$last_data = get_post( $last_item->ID );
+			if ( ! is_wp_error( $last_data ) && isset( $last_data->menu_order ) ) {
+				$args['menu-item-position'] = 1 + (int) $last_data->menu_order;
+			}
+
+		} else {
+			$args['menu-item-position'] = $count;
+		}
+	}
+	
+	// Populate the menu item object
+	$post = array(
+		'menu_order' => $args['menu-item-position'],
+		'ping_status' => 0,
+		'post_content' => $args['menu-item-description'],
+		'post_excerpt' => $args['menu-item-attr-title'],
+		'post_parent' => $args['menu-item-parent-id'], 
+		'post_status' => 'publish', 
+		'post_title' => $args['menu-item-title'], 
+		'post_type' => 'nav_menu_item', 
+		'tax_input' => array( 'nav_menu' => $menu->name ),
+	);
+
+	// New menu item
+	if ( 0 == $menu_item_db_id ) {
+		$menu_item_db_id = wp_insert_post( $post );
+
+	// Update existing menu item
+	} else {
+		$post['ID'] = $menu_item_db_id;
+		wp_update_post( $post );
+	}
+
+	if ( 'custom' == $args['menu-item-type'] ) {
+		$args['menu-item-object-id'] = $menu_item_db_id;
+		$args['menu-item-object'] = 'custom';
+	}
+
+	if ( $menu_item_db_id && ! is_wp_error( $menu_item_db_id ) ) {
+
+		$menu_item_db_id = (int) $menu_item_db_id;
+
+		update_post_meta( $menu_item_db_id, '_menu_item_type', sanitize_key($args['menu-item-type']) );
+		update_post_meta( $menu_item_db_id, '_menu_item_object_id', (int) $args['menu-item-object-id'] );
+		update_post_meta( $menu_item_db_id, '_menu_item_object', sanitize_key($args['menu-item-object']) );
+		update_post_meta( $menu_item_db_id, '_menu_item_target', sanitize_key($args['menu-item-target']) );
+		// @todo handle sanitizing multiple classes separated by whitespace.
+		update_post_meta( $menu_item_db_id, '_menu_item_classes', sanitize_html_class($args['menu-item-classes']) );
+		update_post_meta( $menu_item_db_id, '_menu_item_xfn', sanitize_html_class($args['menu-item-xfn']) );
+
+		// @todo: only save custom link urls.
+		update_post_meta( $menu_item_db_id, '_menu_item_url', esc_url_raw($args['menu-item-url']) );
+
+		do_action('wp_update_nav_menu_item', $menu_id, $menu_item_db_id, $args );
+	}
+
+	return $menu_item_db_id;
+}
+
+/**
  * Returns all navigation menu objects.
  *
  * @since 3.0.0
@@ -127,7 +280,44 @@
 	return get_terms( 'nav_menu', array( 'hide_empty' => false, 'orderby' => 'id' ) );
 }
 
+
 /**
+ * Sort menu items by the desired key.
+ *
+ * @since 3.0.0
+ * @access private
+ *
+ * @param object $a The first object to compare
+ * @param object $b The second object to compare
+ * @return int -1, 0, or 1 if $a is considered to be respectively less than, equal to, or greater than $b.
+ */
+function _sort_nav_menu_items($a, $b) {
+	global $_menu_item_sort_prop;
+
+	if ( empty( $_menu_item_sort_prop ) ) {
+		return 0;
+	}
+
+	if ( isset( $a->$_menu_item_sort_prop ) && isset( $b->$_menu_item_sort_prop ) ) {
+		$_a = (int) $a->$_menu_item_sort_prop;
+		$_b = (int) $b->$_menu_item_sort_prop;
+
+		if ( $a->$_menu_item_sort_prop == $b->$_menu_item_sort_prop ) {
+			return 0;	
+		} elseif ( 
+			( $_a == $a->$_menu_item_sort_prop ) && 
+			( $_b == $b->$_menu_item_sort_prop ) 
+		) {
+			return $_a < $_b ? -1 : 1;
+		} else {
+			return strcmp( $a->$_menu_item_sort_prop, $b->$_menu_item_sort_prop );
+		}
+	} else {
+		return 0;
+	}
+}
+
+/**
  * Returns all menu items of a navigation menu.
  *
  * @since 3.0.0
@@ -139,13 +329,13 @@
 function wp_get_nav_menu_items( $menu, $args = array() ) {
 	$menu = wp_get_nav_menu_object( $menu );
 
-	if ( !$menu )
+	if ( ! $menu )
 		return false;
-
+	
 	$items = get_objects_in_term( $menu->term_id, 'nav_menu' );
 
 	if ( ! empty( $items ) ) {
-		$defaults = array( 'orderby' => 'menu_order', 'post_type' => 'nav_menu_item', 'post_status' => 'publish', 'output' => ARRAY_A, 'output_key' => 'menu_order' );
+		$defaults = array( 'order' => 'ASC', 'orderby' => 'menu_order', 'post_type' => 'nav_menu_item', 'post_status' => 'publish', 'output' => ARRAY_A, 'output_key' => 'menu_order' );
 		$args = wp_parse_args( $args, $defaults );
 		if ( count( $items ) > 1 )
 			$args['include'] = implode( ',', $items );
@@ -155,50 +345,48 @@
 		$items = get_posts( $args );
 
 		if ( ARRAY_A == $args['output'] ) {
-			$output = array();
-			foreach ( $items as $item ) {
-				$output[$item->$args['output_key']] = $item;
+			$GLOBALS['_menu_item_sort_prop'] = $args['output_key'];
+			usort($items, '_sort_nav_menu_items');
+			$i = 1;
+			foreach( $items as $k => $item ) {
+				$items[$k]->$args['output_key'] = $i++;
 			}
-			unset( $items );
-			ksort( $output );
-			return $output;
 		}
 	}
 	return $items;
 }
 
 /**
- * Retrieve the HTML list content for nav menu items.
+ * Decorates a menu item object with the shared navigation menu item properties.
  *
- * @uses Walker_Nav_Menu to create HTML list content.
- * @since 2.1.0
- * @see Walker::walk() for parameters and return description.
- */
-function walk_nav_menu_tree( $items, $depth, $r ) {
-	$walker = ( empty($r->walker) ) ? new Walker_Nav_Menu : $r->walker;
-	$args = array( $items, $depth, $r );
-
-	return call_user_func_array( array(&$walker, 'walk'), $args );
-}
-
-/**
- * Adds all the navigation menu properties to the menu item.
+ * Properties:
+ * - db_id: 		The DB ID of the this item as a nav_menu_item object, if it exists (0 if it doesn't exist).
+ * - object_id:		The DB ID of the original object this menu item represents, e.g. ID for posts and term_id for categories.
+ * - type:		The family of objects originally represented, such as "post_type" or "taxonomy."
+ * - object:		The type of object originally represented, such as "category," "post", or "attachment."
+ * - append:		The singular label used to describe this type of menu item.
+ * - parent:		The DB ID of the original object's parent object, if any (0 otherwise).
+ * - url:		The URL to which this menu item points.
+ * - title:		The title of this menu item.
+ * - target: 		The target attribute of the link element for this menu item.
+ * - attr_title:	The title attribute of the link element for this menu item.	 
+ * - classes:		The class attribute value for the link element of this menu item.
+ * - xfn:		The XFN relationship expressed in the link of this menu item.
+ * - description:	The description of this menu item.
  *
  * @since 3.0.0
  *
- * @param string $menu_item The menu item to modify
- * @param string $menu_item_type The menu item type (frontend, custom, post_type, taxonomy).
- * @param string $menu_item_object Optional. The menu item object type (post type or taxonomy).
- * @return object $menu_item The modified menu item.
+ * @param object $menu_item The menu item to modify.
+ * @return object $menu_item The menu item with standard menu item properties.
  */
-function wp_setup_nav_menu_item( $menu_item, $menu_item_type = null, $menu_item_object = '' ) {
-	switch ( $menu_item_type ) {
-		case 'frontend':
+function wp_setup_nav_menu_item( $menu_item ) {
+	if ( isset( $menu_item->post_type ) ) {
+		if ( 'nav_menu_item' == $menu_item->post_type ) {
 			$menu_item->db_id = (int) $menu_item->ID;
 			$menu_item->object_id = get_post_meta( $menu_item->ID, '_menu_item_object_id', true );
 			$menu_item->object = get_post_meta( $menu_item->ID, '_menu_item_object', true );
 			$menu_item->type = get_post_meta( $menu_item->ID, '_menu_item_type', true );
-
+			
 			if ( 'post_type' == $menu_item->type ) {
 				$object = get_post_type_object( $menu_item->object );
 				$menu_item->append = $object->singular_label;
@@ -213,7 +401,7 @@
 				$menu_item->append = __('Custom');
 				$menu_item->url = get_post_meta( $menu_item->ID, '_menu_item_url', true );
 			}
-
+			
 			$menu_item->title = $menu_item->post_title;
 			$menu_item->target = get_post_meta( $menu_item->ID, '_menu_item_target', true );
 
@@ -222,31 +410,12 @@
 
 			$menu_item->classes = get_post_meta( $menu_item->ID, '_menu_item_classes', true );
 			$menu_item->xfn = get_post_meta( $menu_item->ID, '_menu_item_xfn', true );
-			break;
-		
-		case 'custom':
+		} else {
 			$menu_item->db_id = 0;
 			$menu_item->object_id = (int) $menu_item->ID;
-			$menu_item->object = 'custom';
-			$menu_item->type = 'custom';
-			$menu_item->append = __('custom');
+			$menu_item->type = 'post_type';
 
-			$menu_item->attr_title = strip_tags( $menu_item->post_excerpt );
-			$menu_item->description = strip_tags( $menu_item->post_content );
-
-			$menu_item->title = $menu_item->post_title;
-			$menu_item->url = get_post_meta( $menu_item->ID, '_menu_item_url', true );
-			$menu_item->target = get_post_meta( $menu_item->ID, '_menu_item_target', true );
-			$menu_item->classes = get_post_meta( $menu_item->ID, '_menu_item_target', true );
-			$menu_item->xfn = get_post_meta( $menu_item->ID, '_menu_item_xfn', true );
-			break;
-
-		case 'post_type':
-			$menu_item->db_id = 0;
-			$menu_item->object_id = (int) $menu_item->ID;
-			$menu_item->type = $menu_item_type;
-
-			$object = get_post_type_object( $menu_item_object );
+			$object = get_post_type_object( $menu_item->post_type );
 			$menu_item->object = $object->name;
 			$menu_item->append = strtolower( $object->singular_label );
 
@@ -254,33 +423,32 @@
 			$menu_item->url = get_permalink( $menu_item->ID );
 			$menu_item->target = '';
 
-			$menu_item->attr_title = '';
+			$menu_item->attr_title = strip_tags( $menu_item->post_excerpt );
 			$menu_item->description = strip_tags( $menu_item->post_content );
 			$menu_item->classes = '';
 			$menu_item->xfn = '';
-			break;
+		}
+	} elseif ( isset( $menu_item->taxonomy ) ) {
+		$menu_item->ID = $menu_item->term_id;
+		$menu_item->db_id = 0;
+		$menu_item->object_id = (int) $menu_item->term_id;
+		$menu_item->post_parent = (int) $menu_item->parent;
+		$menu_item->type = 'taxonomy';
 
-		case 'taxonomy':
-			$menu_item->ID = $menu_item->term_id;
-			$menu_item->db_id = 0;
-			$menu_item->object_id = (int) $menu_item->term_id;
-			$menu_item->post_parent = (int) $menu_item->parent;
-			$menu_item->type = $menu_item_type;
+		$object = get_taxonomy( $menu_item->taxonomy );
+		$menu_item->object = $object->name;
+		$menu_item->append = strtolower( $object->singular_label );
 
-			$object = get_taxonomy( $menu_item_object );
-			$menu_item->object = $object->name;
-			$menu_item->append = strtolower( $object->singular_label );
+		$menu_item->title = $menu_item->name;
+		$menu_item->url = get_term_link( $menu_item, $menu_item->taxonomy );
+		$menu_item->target = '';
+		$menu_item->attr_title = '';
+		$menu_item->description = strip_tags( get_term_field( 'description', $menu_item->term_id, $menu_item->taxonomy ) );
+		$menu_item->classes = '';
+		$menu_item->xfn = '';
 
-			$menu_item->title = $menu_item->name;
-			$menu_item->url = get_term_link( $menu_item, $menu_item_object );
-			$menu_item->target = '';
-			$menu_item->attr_title = '';
-			$menu_item->description = '';
-			$menu_item->classes = '';
-			$menu_item->xfn = '';
-			break;
 	}
-	
-	return apply_filters( 'wp_setup_nav_menu_item', $menu_item, $menu_item_type, $menu_item_object );
+
+	return apply_filters( 'wp_setup_nav_menu_item', $menu_item );
 }
-?>
\ No newline at end of file
+?>
Index: wp-admin/admin-ajax.php
===================================================================
--- wp-admin/admin-ajax.php	(revision 14247)
+++ wp-admin/admin-ajax.php	(working copy)
@@ -126,11 +126,21 @@
 	check_ajax_referer( "image_editor-$post_id" );
 
 	include_once( ABSPATH . 'wp-admin/includes/image-edit.php' );
-	if ( !stream_preview_image($post_id) )
+	if ( ! stream_preview_image($post_id) )
 		die('-1');
 
 	die();
 	break;
+case 'menu-quick-search':
+	if ( ! current_user_can( 'switch_themes' ) )
+		die('-1');
+	
+	require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
+
+	_wp_ajax_menu_quick_search( $_REQUEST );
+
+	exit;
+	break;
 case 'oembed-cache' :
 	$return = ( $wp_embed->cache_oembed( $_GET['post'] ) ) ? '1' : '0';
 	die( $return );
@@ -386,6 +396,17 @@
 	else
 		die('0');
 	break;
+case 'delete-menu-item' :
+	$menu_item_id = (int) $_POST['menu-item'];
+	check_admin_referer( 'delete-menu_item_' . $menu_item_id );
+	if ( ! current_user_can( 'switch_themes' ) ) 
+		die('-1');
+
+	if ( 'nav_menu_item' == get_post_type( $menu_item_id ) && wp_delete_post( $menu_item_id, true ) )
+		die('1');
+	else
+		die('0');
+	break;
 case 'delete-meta' :
 	check_ajax_referer( "delete-meta_$id" );
 	if ( !$meta = get_post_meta_by_id( $id ) )
@@ -795,6 +816,40 @@
 
 	$x->send();
 	break;
+case 'add-menu-item' :
+	if ( ! current_user_can( 'switch_themes' ) )
+		die('-1');
+
+	check_admin_referer( 'add-menu_item', 'menu-settings-column-nonce' );
+
+	require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
+
+	$menu_id = (int) $_POST['menu'];
+	if ( isset( $_POST['menu-item'] ) ) {
+		$item_ids = wp_save_nav_menu_item( $menu_id, $_POST['menu-item'] );
+	} else {
+		$item_ids = array();
+	}
+	
+	foreach ( (array) $item_ids as $menu_item_id ) {
+		$menu_obj = get_post( $menu_item_id );
+		if ( ! empty( $menu_obj->ID ) ) {
+			$menu_items[] = wp_setup_nav_menu_item( $menu_obj );
+		}
+	}
+
+	if ( ! empty( $menu_items ) ) {
+		$args = array(
+			'after' => '',
+			'before' => '',
+			'context' => 'backend',
+			'link_after' => '',
+			'link_before' => '',
+			'walker' => new Walker_Nav_Menu_Edit, 
+		);
+		echo walk_nav_menu_tree( $menu_items, 0, (object) $args );
+	}
+	break;
 case 'add-meta' :
 	check_ajax_referer( 'add-meta' );
 	$c = 0;
@@ -1033,6 +1088,16 @@
 
 	die('1');
 	break;
+case 'menu-quick-search':
+	if ( ! current_user_can( 'switch_themes' ) )
+		die('-1');
+	
+	require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
+
+	_wp_ajax_menu_quick_search( $_REQUEST );
+
+	exit;
+	break;
 case 'meta-box-order':
 	check_ajax_referer( 'meta-box-order' );
 	$order = isset( $_POST['order'] ) ? (array) $_POST['order'] : false;
Index: wp-admin/includes/nav-menu.php
===================================================================
--- wp-admin/includes/nav-menu.php	(revision 14247)
+++ wp-admin/includes/nav-menu.php	(working copy)
@@ -1,13 +1,268 @@
 <?php
+
 /**
+ * Create HTML list of nav menu input items.
+ *
+ * @package WordPress
+ * @since 3.0.0
+ * @uses Walker_Nav_Menu
+ */
+class Walker_Nav_Menu_Edit extends Walker_Nav_Menu  {
+
+	/**
+	 * @see Walker::start_el()
+	 * @since 3.0.0
+	 *
+	 * @param string $output Passed by reference. Used to append additional content.
+	 * @param object $item Menu item data object.
+	 * @param int $depth Depth of menu item. Used for padding.
+	 * @param int $current_page Menu item ID.
+	 * @param object $args
+	 */
+	function start_el(&$output, $item, $depth, $args) {
+		$indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
+
+		ob_start();
+		$item_id = esc_attr( $item->ID );
+		$removed_args = array(
+			'action',
+			'customlink-tab',
+			'edit-menu-item',
+			'menu-item',
+			'page-tab',
+			'_wpnonce',
+		);
+		?>
+		<li id="menu-item-<?php echo $item_id; ?>">
+			<dl>
+				<dt>
+					<span class="item-title"><?php echo esc_html( $item->title ); ?></span>
+					<span class="item-controls">
+						<span class="item-type"><?php echo esc_html( $item->append ); ?></span>
+						<span class="item-order">
+							<a href="<?php
+								echo wp_nonce_url( 
+									add_query_arg(
+										array(
+											'action' => 'move-up-menu-item', 
+											'menu-item' => $item_id,
+										),
+										remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) ) 
+									), 
+									'move-item' 
+								); 
+							?>" class="item-move-up"><abbr title="<?php esc_attr_e('Move up'); ?>">&#8593;</abbr></a>
+							|
+							<a href="<?php
+								echo wp_nonce_url( 
+									add_query_arg(
+										array(
+											'action' => 'move-down-menu-item', 
+											'menu-item' => $item_id,
+										),
+										remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) ) 
+									), 
+									'move-item'
+								); 
+							?>" class="item-move-down"><abbr title="<?php esc_attr_e('Move down'); ?>">&#8595;</abbr></a>
+							|
+						</span>
+						<a class="item-edit" id="edit-<?php echo $item_id; ?>" title="<?php _e('Edit Menu Item'); ?>" href="<?php 
+							echo add_query_arg('edit-menu-item', $item_id, remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) ) ); 
+						?>#menu-item-settings-<?php echo $item_id; ?>"><?php _e('Edit'); ?></a> |
+						<a class="item-delete submitdelete deletion" id="delete-<?php echo $item_id; ?>" href="<?php 
+						echo wp_nonce_url(
+							add_query_arg(
+								array(
+									'action' => 'delete-menu-item',
+									'menu-item' => $item_id,
+								),
+								remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) ) 
+							),
+							'delete-menu_item_' . $item_id
+						); ?>"><?php _e('Delete'); ?></a>
+					</span>
+				</dt>
+			</dl>
+
+			<div class="menu-item-settings <?php 
+				if ( isset($_GET['edit-menu-item']) && $item_id == $_GET['edit-menu-item'] ) :
+					echo ' menu-item-edit-active';
+				else :
+					echo ' menu-item-edit-inactive';
+				endif;
+			?>" id="menu-item-settings-<?php echo $item_id; ?>">
+				<p class="description">
+					<label for="edit-menu-item-title-<?php echo $item_id; ?>">
+						<?php _e( 'Menu Title' ); ?><br />
+						<input type="text" id="edit-menu-item-title-<?php echo $item_id; ?>" class="widefat edit-menu-item-title" name="menu-item-title[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->title ); ?>" />
+					</label>
+				</p>
+				<p class="description">
+					<label for="edit-menu-item-url-<?php echo $item_id; ?>">
+						<?php _e( 'URL' ); ?><br />
+						<input type="text" id="edit-menu-item-url-<?php echo $item_id; ?>" class="widefat code edit-menu-item-url" name="menu-item-url[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->url ); ?>" />
+					</label>
+				</p>
+				<p class="description">
+					<label for="edit-menu-item-attr-title-<?php echo $item_id; ?>">
+						<?php _e( 'Title Attribute' ); ?><br />
+						<input type="text" id="edit-menu-item-attr-title-<?php echo $item_id; ?>" class="widefat edit-menu-item-attr-title" name="menu-item-attr-title[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->post_excerpt ); ?>" />
+					</label>
+				</p>
+				<p class="description">
+					<label for="edit-menu-item-target-<?php echo $item_id; ?>">
+						<?php _e( 'Link Target' ); ?><br />
+						<select id="edit-menu-item-target-<?php echo $item_id; ?>" class="widefat edit-menu-item-target" name="menu-item-target[<?php echo $item_id; ?>]">
+							<option value="" <?php selected( $item->target, ''); ?>><?php _e('Same window or tab'); ?></option>
+							<option value="_blank" <?php selected( $item->target, '_blank'); ?>><?php _e('New window or tab'); ?></option>
+						</select>
+					</label>
+				</p>
+				<p class="description">
+					<label for="edit-menu-item-classes-<?php echo $item_id; ?>">
+						<?php _e( 'CSS Classes (optional)' ); ?><br />
+						<input type="text" id="edit-menu-item-classes-<?php echo $item_id; ?>" class="widefat code edit-menu-item-classes" name="menu-item-classes[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->classes ); ?>" />
+					</label>
+				</p>
+				<p class="description">
+					<label for="edit-menu-item-xfn-<?php echo $item_id; ?>">
+						<?php _e( 'Link Relationship (XFN) (optional)' ); ?><br />
+						<input type="text" id="edit-menu-item-xfn-<?php echo $item_id; ?>" class="widefat code edit-menu-item-xfn" name="menu-item-xfn[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->xfn ); ?>" />
+					</label>
+				</p>
+				<p class="description">
+					<label for="edit-menu-item-description-<?php echo $item_id; ?>">
+						<?php _e( 'Description (optional)' ); ?><br />
+						<textarea id="edit-menu-item-description-<?php echo $item_id; ?>" class="widefat edit-menu-item-description" rows="3" name="menu-item-description[<?php echo $item_id; ?>]"><?php echo esc_html( $item->description ); ?></textarea>
+						<span class="description"><?php _e('The description will be displayed in the menu if the current theme supports it.'); ?></span>
+					</label>
+				</p>
+				
+				<input type="hidden" name="menu-item-append[<?php echo $item_id; ?>]" value="<?php echo $item->append; ?>" />
+				<input type="hidden" name="menu-item-db-id[<?php echo $item_id; ?>]" value="<?php echo $item_id; ?>" />
+				<input type="hidden" name="menu-item-object-id[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->object_id ); ?>" />
+				<input type="hidden" name="menu-item-object[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->object ); ?>" />
+				<input type="hidden" name="menu-item-parent-id[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->post_parent ); ?>" />
+				<input type="hidden" class="menu-item-position" name="menu-item-position[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->menu_order ); ?>" />
+				<input type="hidden" name="menu-item-type[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->type ); ?>" />
+			</div><!-- .menu-item-settings-->
+		<?php
+		$output .= ob_get_clean();
+	}
+}
+
+/**
+ * Prints the appropriate response to a menu quick search.
+ *
+ * @since 3.0.0
+ * 
+ * @param array $request The unsanitized request values.
+ */
+function _wp_ajax_menu_quick_search( $request = array() ) {
+	$args = array();
+	$type = isset( $request['type'] ) ? $request['type'] : '';
+	$object_type = isset( $request['object_type'] ) ? $request['object_type'] : '';
+	$query = isset( $request['q'] ) ? $request['q'] : '';
+	$response_format = isset( $request['response-format'] ) && in_array( $request['response-format'], array( 'json', 'markup' ) ) ? $request['response-format'] : 'json';
+
+	if ( 'markup' == $response_format ) {
+		$args['walker'] = new Walker_Nav_Menu_Checklist;
+	}
+
+	if ( 'get-post-item' == $type ) {
+		if ( get_post_type_object( $object_type ) ) {
+			if ( isset( $request['ID'] ) ) {
+				$object_id = (int) $request['ID'];
+				if ( 'markup' == $response_format ) {
+					echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', array( get_post( $object_id ) ) ), 0, (object) $args );
+				} elseif ( 'json' == $response_format ) {
+					$post_obj = get_post( $object_id );
+					echo json_encode(
+						array(
+							'ID' => $object_id,
+							'post_title' => get_the_title( $object_id ),
+							'post_type' => get_post_type( $object_id ),
+						)
+					);
+					echo "\n";
+				}
+			}
+		} elseif ( is_taxonomy( $object_type ) ) {
+			if ( isset( $request['ID'] ) ) {
+				$object_id = (int) $request['ID'];
+				if ( 'markup' == $response_format ) {
+					echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', array( get_term( $object_id, $object_type ) ) ), 0, (object) $args );
+				} elseif ( 'json' == $response_format ) {
+					$post_obj = get_term( $object_id, $object_type );
+					echo json_encode(
+						array(
+							'ID' => $object_id,
+							'post_title' => $post_obj->name,
+							'post_type' => $object_type,
+						)
+					);
+					echo "\n";
+				}
+			}
+
+		}
+
+
+	} elseif ( preg_match('/quick-search-(posttype|taxonomy)-([a-zA-Z_-]*\b)/', $type, $matches) ) {
+		if ( 'posttype' == $matches[1] && get_post_type_object( $matches[2] ) ) {
+			query_posts(array(
+				'posts_per_page' => 10,
+				'post_type' => $matches[2],
+				's' => $query,
+			));
+			while ( have_posts() ) {
+				the_post();
+				if ( 'markup' == $response_format ) {
+					echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', array( get_post( get_the_ID() ) ) ), 0, (object) $args );
+				} elseif ( 'json' == $response_format ) {
+					echo json_encode(
+						array(
+							'ID' => get_the_ID(),
+							'post_title' => get_the_title(),
+							'post_type' => get_post_type(),
+						)
+					);
+					echo "\n";
+				}
+			}
+		} elseif ( 'taxonomy' == $matches[1] ) {
+			$terms = get_terms( $matches[2], array(
+				'name__like' => $query,
+				'number' => 10,
+			));
+			foreach( (array) $terms as $term ) {
+				if ( 'markup' == $response_format ) {
+					echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', array( $term ) ), 0, (object) $args );
+				} elseif ( 'json' == $response_format ) {
+					echo json_encode(
+						array(
+							'ID' => $term->term_id,
+							'post_title' => $term->name,
+							'post_type' => $matches[2],
+						)
+					);
+					echo "\n";
+				}
+			}
+		}
+	}
+}
+
+/**
  * Register nav menu metaboxes
  *
  * @since 3.0.0
  **/
-function wp_nav_menu_metaboxes_setup() {
-	add_meta_box( 'add-custom-links', __('Add Custom Links'), 'wp_nav_menu_item_link_metabox', 'nav-menus', 'side', 'default' );
-	wp_nav_menu_post_type_metaboxes();
-	wp_nav_menu_taxonomy_metaboxes();
+function wp_nav_menu_meta_boxes_setup() {
+	add_meta_box( 'add-custom-links', __('Add Custom Links'), 'wp_nav_menu_item_link_meta_box', 'nav-menus', 'side', 'default' );
+	wp_nav_menu_post_type_meta_boxes();
+	wp_nav_menu_taxonomy_meta_boxes();
 }
 
 /**
@@ -18,7 +273,7 @@
 function wp_initial_nav_menu_meta_boxes() {
 	global $wp_meta_boxes;
 
-	if ( !get_user_option( 'metaboxhidden_nav-menus' ) && is_array($wp_meta_boxes) ) {
+	if ( !get_user_option( 'meta-box-hidden_nav-menus' ) && is_array($wp_meta_boxes) ) {
 
 		$initial_meta_boxes = array( 'manage-menu', 'create-menu', 'add-custom-links', 'add-page', 'add-category' );
 		$hidden_meta_boxes = array();
@@ -35,7 +290,7 @@
 			}
 		}
 		$user = wp_get_current_user();
-		update_user_meta( $user->ID, 'metaboxhidden_nav-menus', $hidden_meta_boxes );
+		update_user_meta( $user->ID, 'meta-box-hidden_nav-menus', $hidden_meta_boxes );
 
 		// returns all the hidden metaboxes to the js function: wpNavMenu.initial_meta_boxes()
 		return join( ',', $hidden_meta_boxes );
@@ -47,7 +302,7 @@
  *
  * @since 3.0.0
  */
-function wp_nav_menu_post_type_metaboxes() {
+function wp_nav_menu_post_type_meta_boxes() {
 	$post_types = get_post_types( array( 'public' => true ), 'object' );
 
 	if ( !$post_types )
@@ -55,7 +310,7 @@
 
 	foreach ( $post_types as $post_type ) {
 		$id = $post_type->name;
-		add_meta_box( "add-{$id}", sprintf( __('Add %s'), $post_type->label ), 'wp_nav_menu_item_post_type_metabox', 'nav-menus', 'side', 'default', $post_type );
+		add_meta_box( "add-{$id}", sprintf( __('Add %s'), $post_type->label ), 'wp_nav_menu_item_post_type_meta_box', 'nav-menus', 'side', 'default', $post_type );
 	}
 }
 
@@ -64,7 +319,7 @@
  *
  * @since 3.0.0
  */
-function wp_nav_menu_taxonomy_metaboxes() {
+function wp_nav_menu_taxonomy_meta_boxes() {
 	$taxonomies = get_taxonomies( array( 'show_ui' => true ), 'object' );
 
 	if ( !$taxonomies )
@@ -72,97 +327,84 @@
 
 	foreach ( $taxonomies as $tax ) {
 		$id = $tax->name;
-		add_meta_box( "add-{$id}", sprintf( __('Add %s'), $tax->label ), 'wp_nav_menu_item_taxonomy_metabox', 'nav-menus', 'side', 'default', $tax );
+		add_meta_box( "add-{$id}", sprintf( __('Add %s'), $tax->label ), 'wp_nav_menu_item_taxonomy_meta_box', 'nav-menus', 'side', 'default', $tax );
 	}
 }
 
 /**
- * Displays a metabox for managing the active menu being edited.
+ * Displays a metabox for the custom links menu item.
  *
  * @since 3.0.0
  */
-function wp_nav_menu_manage_menu_metabox( $object, $menu ) { ?>
-	<div id="submitpost" class="submitbox">
-		<div id="minor-publishing">
-			<div class="misc-pub-section misc-pub-section-last">
-				<label class="howto" for="menu-name">
-					<span><?php _e('Name'); ?></span>
-					<input id="menu-name" name="menu-name" type="text" class="regular-text menu-item-textbox" value="<?php echo esc_attr( $menu['args'][1] ); ?>" />
-					<br class="clear" />
-				</label>
-			</div><!--END .misc-pub-section misc-pub-section-last-->
-			<br class="clear" />
-		</div><!--END #misc-publishing-actions-->
-		<div id="major-publishing-actions">
-			<div id="delete-action">
-				<a class="submitdelete deletion" href="<?php echo wp_nonce_url( admin_url('nav-menus.php?action=delete&amp;menu=' . $menu['args'][0]), 'delete-nav_menu-' . $menu['args'][0] ); ?>"><?php _e('Delete Menu'); ?></a>
-			</div><!--END #delete-action-->
+function wp_nav_menu_item_link_meta_box() {
+	static $_placeholder;
+	$_placeholder = 0 > $_placeholder ? $_placeholder - 1 : -1;
 
-			<div id="publishing-action">
-				<input class="button-primary" name="save_menu" type="submit" value="<?php esc_attr_e('Save Menu'); ?>" />
-			</div><!--END #publishing-action-->
-			<br class="clear" />
-		</div><!--END #major-publishing-actions-->
-	</div><!--END #submitpost .submitbox-->
-	<?php
-}
-
-/**
- * Displays a metabox for creating a new menu.
- *
- * @since 3.0.0
- */
-function wp_nav_menu_create_metabox() { ?>
-	<p>
-		<input type="text" name="create-menu-name" id="create-menu-name" class="regular-text" value="<?php esc_attr_e( 'Menu name' ); ?>"  />
-		<input type="submit" name="create-menu-button" id="create-menu-button" class="button" value="<?php esc_attr_e('Create Menu'); ?>" />
-	</p>
-	<?php
-}
-
-/**
- * Displays a metabox for the custom links menu item.
- *
- * @since 3.0.0
- */
-function wp_nav_menu_item_link_metabox() {
 	// @note: hacky query, see #12660
 	$args = array( 'post_type' => 'nav_menu_item', 'post_status' => 'any', 'meta_key' => '_menu_item_type', 'numberposts' => -1, 'orderby' => 'title', );
 
 	// @todo transient caching of these results with proper invalidation on updating links
 	$links = get_posts( $args );
+
+	$current_tab = 'create';
+	if ( isset( $_REQUEST['customlink-tab'] ) && in_array( $_REQUEST['customlink-tab'], array('create', 'all') ) ) {
+		$current_tab = $_REQUEST['customlink-tab'];
+	}
+
+	$removed_args = array(
+		'action', 
+		'customlink-tab',
+		'edit-menu-item',
+		'menu-item',
+		'page-tab',
+		'_wpnonce',
+	);
+
 	?>
-	<p id="menu-item-url-wrap">
-		<label class="howto" for="menu-item-url">
-			<span><?php _e('URL'); ?></span>
-			<input id="custom-menu-item-url" name="custom-menu-item-url" type="text" class="code menu-item-textbox" value="http://" />
-		</label>
-	</p>
-	<p id="menu-item-name-wrap">
-		<label class="howto" for="custom-menu-item-name">
-			<span><?php _e('Text'); ?></span>
-			<input id="custom-menu-item-name" name="custom-menu-item-name" type="text" class="regular-text menu-item-textbox" value="<?php echo esc_attr( __('Menu Item') ); ?>" />
-		</label>
-	</p>
+	<div class="customlinkdiv">
+		<ul id="customlink-tabs" class="customlink-tabs add-menu-item-tabs">
+			<li <?php echo ( 'create' == $current_tab ? ' class="tabs"' : '' ); ?>><a class="menu-tab-link" href="<?php echo add_query_arg('customlink-tab', 'create', remove_query_arg($removed_args)); ?>#tabs-panel-create-custom"><?php _e('Create New'); ?></a></li>
+			<li <?php echo ( 'all' == $current_tab ? ' class="tabs"' : '' ); ?>><a class="menu-tab-link" href="<?php echo add_query_arg('customlink-tab', 'all', remove_query_arg($removed_args)); ?>#tabs-panel-all-custom"><?php _e('View All'); ?></a></li>
+		</ul>
 
-	<p class="button-controls">
-		<span class="lists-controls">
-			<a class="show-all"><?php _e('View All'); ?></a>
-			<a class="hide-all"><?php _e('Hide All'); ?></a>
-		</span>
+		<div class="tabs-panel <?php 
+			echo ( 'create' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' );
+		?>" id="tabs-panel-create-custom">
+			<input type="hidden" value="custom" name="menu-item[<?php echo $_placeholder; ?>][menu-item-type]" />
+			<p id="menu-item-url-wrap">
+				<label class="howto" for="custom-menu-item-url">
+					<span><?php _e('URL'); ?></span>
+					<input id="custom-menu-item-url" name="menu-item[<?php echo $_placeholder; ?>][menu-item-url]" type="text" class="code menu-item-textbox" value="http://" />
+				</label>
+			</p>
 
-		<span class="add-to-menu">
-			<a class="button"><?php _e('Add to Menu'); ?></a>
-		</span>
-	</p>
-	<div id="available-links" class="list-wrap">
-		<div class="list-container">
-			<ul class="list">
-				<?php echo wp_nav_menu_get_items( $links, 'custom', 'custom' ); ?>
+			<p id="menu-item-name-wrap">
+				<label class="howto" for="custom-menu-item-name">
+					<span><?php _e('Text'); ?></span>
+					<input id="custom-menu-item-name" name="menu-item[<?php echo $_placeholder; ?>][menu-item-title]" type="text" class="regular-text menu-item-textbox" value="<?php echo esc_attr( __('Menu Item') ); ?>" />
+				</label>
+			</p>
+		</div><!-- /.tabs-panel -->
+
+		<div class="tabs-panel <?php 
+			echo ( 'all' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' );
+		?>" id="tabs-panel-all-custom">
+			<ul id="customlinkchecklist" class="list:customlink customlinkchecklist form-no-clear">
+				<?php
+				$args['walker'] = new Walker_Nav_Menu_Checklist;
+				echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $links), 0, (object) $args );
+				?>
 			</ul>
-		</div><!-- /.list-container-->
-	</div><!-- /#available-links-->
-	<div class="clear"></div>
+		</div><!-- /.tabs-panel -->
+
+		<p class="button-controls">
+			<span class="add-to-menu">
+				<input type="submit" class="button-secondary" value="<?php esc_attr_e('Add to Menu'); ?>" name="add-custom-menu-item" />
+			</span>
+		</p>
+
+		<div class="clear"></div>
+	</div><!-- /.customlinkdiv -->
 	<?php
 }
 
@@ -174,58 +416,173 @@
  * @param string $object Not used.
  * @param string $post_type The post type object.
  */
-function wp_nav_menu_item_post_type_metabox( $object, $post_type ) {
-	$args = array( 'post_type' => $post_type['args']->name, 'numberposts' => -1, 'orderby' => 'title', );
+function wp_nav_menu_item_post_type_meta_box( $object, $post_type ) {
+	$post_type_name = $post_type['args']->name;
 
+	// paginate browsing for large numbers of post objects
+	$per_page = 50;
+	$pagenum = isset( $_REQUEST[$post_type_name . '-tab'] ) && isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 1;
+	$offset = 0 < $pagenum ? $per_page * ( $pagenum - 1 ) : 0;
+
+	$args = array( 
+		'offset' => $offset, 
+		'order' => 'ASC',
+		'orderby' => 'title', 
+		'posts_per_page' => $per_page, 
+		'post_type' => $post_type_name, 
+		'suppress_filters' => true, 
+	);
+
 	// @todo transient caching of these results with proper invalidation on updating of a post of this type
-	$posts = get_posts( $args );
+	$get_posts = new WP_Query;
+	$posts = $get_posts->query( $args );
 
+	$post_type_object = get_post_type_object($post_type_name);
+
+	$num_pages = $get_posts->max_num_pages;
+
+	$count_posts = (int) @count( $posts );
+
+	if ( isset( $get_posts->found_posts ) && ( $get_posts->found_posts > $count_posts ) ) {
+		// somewhat like display_page_row(), let's make sure ancestors show up on paged display
+		$parent_ids = array();
+		$child_ids = array();
+		foreach( (array) $posts as $post ) {
+			$parent_ids[] = (int) $post->post_parent;
+			$child_ids[] = (int) $post->ID;
+		}
+		$parent_ids = array_unique($parent_ids);
+		$child_ids = array_unique($child_ids);
+		
+		$missing_parents = array();
+		do {
+			foreach( (array) $missing_parents as $missing_parent_id ) {
+				$missing_parent = get_post($missing_parent_id);
+				$posts[] = $missing_parent;
+				$child_ids[] = $missing_parent_id;
+				$parent_ids[] = $missing_parent->post_parent;
+			}
+			
+			$missing_parents = array_filter( array_diff( array_unique( $parent_ids ), array_unique( $child_ids ) ) );
+
+		} while( 0 < count( $missing_parents ) );
+		
+	}
+
+	$page_links = paginate_links( array(
+		'base' => add_query_arg( 
+			array(
+				$post_type_name . '-tab' => 'all',
+				'paged' => '%#%',
+			)
+		),
+		'format' => '', 
+		'prev_text' => __('&laquo;'),
+		'next_text' => __('&raquo;'),
+		'total' => $num_pages,
+		'current' => $pagenum
+	));
+	
 	if ( !$posts )
 		$error = '<li id="error">'. sprintf( __( 'No %s exists' ), $post_type['args']->label ) .'</li>';
 
-	$pt_names = '';
-	if ( is_array($posts) ) {
-		foreach ( $posts as $post ) {
-			if ( $post->post_title ) {
-				$pt_names .= htmlentities( $post->post_title ) .'|';
-			}
-		}
+	$current_tab = 'search';
+	if ( isset( $_REQUEST[$post_type_name . '-tab'] ) && in_array( $_REQUEST[$post_type_name . '-tab'], array('all', 'search') ) ) {
+		$current_tab = $_REQUEST[$post_type_name . '-tab'];
 	}
 
-	$id = $post_type['args']->name;
+	if ( ! empty( $_REQUEST['quick-search-posttype-' . $post_type_name] ) ) {
+		$current_tab = 'search';
+	}
+
+	$removed_args = array(
+		'action', 
+		'customlink-tab',
+		'edit-menu-item',
+		'menu-item',
+		'page-tab',
+		'_wpnonce',
+	);
+
 	?>
-	<p class="quick-search-wrap">
-		<input type="text" class="quick-search regular-text" value="" />
-		<a class="quick-search-submit button-secondary"><?php _e('Search'); ?></a>
-	</p>
+	<div id="posttype-<?php echo $post_type_name; ?>" class="posttypediv">
+		<ul id="posttype-<?php echo $post_type_name; ?>-tabs" class="posttype-tabs add-menu-item-tabs">
+			<li <?php echo ( 'search' == $current_tab ? ' class="tabs"' : '' ); ?>><a class="menu-tab-link" href="<?php echo add_query_arg($post_type_name . '-tab', 'search', remove_query_arg($removed_args)); ?>#tabs-panel-posttype-<?php echo $post_type_name; ?>-search"><?php _e('Search'); ?></a></li>
+			<li <?php echo ( 'all' == $current_tab ? ' class="tabs"' : '' ); ?>><a class="menu-tab-link" href="<?php echo add_query_arg($post_type_name . '-tab', 'all', remove_query_arg($removed_args)); ?>#<?php echo $post_type_name; ?>-all"><?php _e('View All'); ?></a></li>
+		</ul>
 
-	<p class="button-controls">
-		<span class="lists-controls">
-			<a class="show-all"><?php _e('View All'); ?></a>
-			<a class="hide-all"><?php _e('Hide All'); ?></a>
-		</span>
+		<div class="tabs-panel <?php 
+			echo ( 'search' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' );
+		?>" id="tabs-panel-posttype-<?php echo $post_type_name; ?>-search">
+			<?php 
+			if ( isset( $_REQUEST['quick-search-posttype-' . $post_type_name] ) ) {
+				$searched = esc_attr( $_REQUEST['quick-search-posttype-' . $post_type_name] );
+				$search_results = get_posts( array( 's' => $searched, 'post_type' => $post_type_name, 'fields' => 'all', 'order' => 'DESC', ) );
+			} else {
+				$searched = '';
+				$search_results = array();
+			}
+			?>
+			<p class="quick-search-wrap">
+				<input type="text" class="quick-search regular-text" value="<?php echo $searched; ?>" name="quick-search-posttype-<?php echo $post_type_name; ?>" />
+				<input type="submit" class="quick-search-submit button-secondary" value="<?php esc_attr_e('Search'); ?>" />
+			</p>
 
-		<span class="add-to-menu">
-			<a class="button"><?php _e('Add to Menu'); ?></a>
-		</span>
-	</p>
+			<ul id="<?php echo $post_type_name; ?>-search-checklist" class="list:<?php echo $post_type_name?> categorychecklist form-no-clear">
+			<?php if ( ! empty( $search_results ) && ! is_wp_error( $search_results ) ) : ?>
+				<?php
+				$args['walker'] = new Walker_Nav_Menu_Checklist;
+				echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $search_results), 0, (object) $args );
+				?>
+			<?php endif; ?>
+			</ul>
+		</div><!-- /.tabs-panel -->
 
-	<div id="existing-<?php echo esc_attr( $id ); ?>" class="list-wrap">
-		<div class="list-container">
-			<ul class="list">
-				<?php echo isset( $error ) ? $error : wp_nav_menu_get_items( $posts, 'post_type', $id ); ?>
+
+		<div id="<?php echo $post_type_name; ?>-all" class="tabs-panel <?php
+			echo ( 'all' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' );
+		?>">
+			<div class="add-menu-item-pagelinks">
+				<?php echo $page_links; ?>
+			</div>
+			<ul id="<?php echo $post_type_name; ?>checklist" class="list:<?php echo $post_type_name?> categorychecklist form-no-clear">
+				<?php
+				$args['walker'] = new Walker_Nav_Menu_Checklist;
+				$checkbox_items = walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $posts), 0, (object) $args );
+
+				if ( 'all' == $current_tab && ! empty( $_REQUEST['selectall'] ) ) {
+					$checkbox_items = preg_replace('/(type=(.)checkbox(\2))/', '$1 checked=$2checked$2', $checkbox_items);
+					
+				}
+				echo $checkbox_items;
+				?>
 			</ul>
-		</div><!-- /.list-container-->
-	</div><!-- /#existing-categories-->
-	<input type="hidden" class="autocomplete" name="autocomplete-<?php echo esc_attr( $id ); ?>-names" value="<?php echo esc_js( $pt_names ); ?>" />
-	<br class="clear" />
-	<script type="text/javascript" charset="utf-8">
-		// <![CDATA[
-		jQuery(document).ready(function(){
-			wpNavMenu.autocomplete('<?php echo esc_attr($id); ?>');
-		});
-		// ]]>
-	</script>
+			<div class="add-menu-item-pagelinks">
+				<?php echo $page_links; ?>
+			</div>
+		</div><!-- /.tabs-panel -->
+
+
+		<p class="button-controls">
+			<span class="lists-controls">
+				<a href="<?php 
+					echo add_query_arg(
+						array(
+							$post_type_name . '-tab' => 'all',
+							'selectall' => 1,
+						),
+						remove_query_arg($removed_args)
+					);
+				?>#posttype-<?php echo $post_type_name; ?>" class="select-all"><?php _e('Select All'); ?></a>
+			</span>
+
+			<span class="add-to-menu">
+				<input type="submit" class="button-secondary" value="<?php esc_attr_e('Add to Menu'); ?>" name="add-post-type-menu-item" />
+			</span>
+		</p>
+
+		<br class="clear" />
+	</div><!-- /.posttypediv -->
 	<?php
 }
 
@@ -237,169 +594,246 @@
  * @param string $object Not used.
  * @param string $taxonomy The taxonomy object.
  */
-function wp_nav_menu_item_taxonomy_metabox( $object, $taxonomy ) {
+function wp_nav_menu_item_taxonomy_meta_box( $object, $taxonomy ) {
+	$taxonomy_name = $taxonomy['args']->name;
+	// paginate browsing for large numbers of objects
+	$per_page = 50;
+	$pagenum = isset( $_REQUEST[$taxonomy_name . '-tab'] ) && isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 1;
+	$offset = 0 < $pagenum ? $per_page * ( $pagenum - 1 ) : 0;
+	
 	$args = array(
-		'child_of' => 0, 'orderby' => 'name', 'order' => 'ASC',
-		'hide_empty' => false, 'include_last_update_time' => false, 'hierarchical' => 1, 'exclude' => '',
-		'include' => '', 'number' => '', 'pad_counts' => false
+		'child_of' => 0, 
+		'exclude' => '',
+		'hide_empty' => false, 
+		'hierarchical' => 1, 
+		'include' => '', 
+		'include_last_update_time' => false, 
+		'number' => $per_page, 
+		'offset' => $offset,
+		'order' => 'ASC',
+		'orderby' => 'name', 
+		'pad_counts' => false,
 	);
 
+	$num_pages = ceil( wp_count_terms($taxonomy_name) / $per_page );
+
+	$page_links = paginate_links( array(
+		'base' => add_query_arg( 
+			array(
+				$taxonomy_name . '-tab' => 'all',
+				'paged' => '%#%',
+			)
+		),
+		'format' => '', 
+		'prev_text' => __('&laquo;'),
+		'next_text' => __('&raquo;'),
+		'total' => $num_pages,
+		'current' => $pagenum
+	));
+	
+	$walker = new Walker_Nav_Menu_Checklist;
 	// @todo transient caching of these results with proper invalidation on updating of a tax of this type
-	$terms = get_terms( $taxonomy['args']->name, $args );
+	$terms = get_terms( $taxonomy_name, $args );
 
-	if ( !$terms || is_wp_error($terms) )
+	if ( ! $terms || is_wp_error($terms) )
 		$error = '<li id="error">'. sprintf( __( 'No %s exists' ), $taxonomy['args']->label ) .'</li>';
 
-	$term_names = '';
-	if ( is_array($terms) ) {
-		foreach ( $terms as $term ) {
-			if ( $term->name ) {
-				$term_names .= htmlentities( $term->name ) .'|';
-			}
-		}
+	$current_tab = 'most-used';
+	if ( isset( $_REQUEST[$taxonomy_name . '-tab'] ) && in_array( $_REQUEST[$taxonomy_name . '-tab'], array('all', 'most-used', 'search') ) ) {
+		$current_tab = $_REQUEST[$taxonomy_name . '-tab'];
 	}
 
-	$id = $taxonomy['args']->name;
+	if ( ! empty( $_REQUEST['quick-search-taxonomy-' . $taxonomy_name] ) ) {
+		$current_tab = 'search';
+	}
+
+	$removed_args = array(
+		'action', 
+		'customlink-tab',
+		'edit-menu-item',
+		'menu-item',
+		'page-tab',
+		'_wpnonce',
+	);
+
 	?>
-	<p class="quick-search-wrap">
-		<input type="text" class="quick-search regular-text" value="" />
-		<a class="quick-search-submit button-secondary"><?php _e('Search'); ?></a>
-	</p>
+	<div id="taxonomy-<?php echo $taxonomy_name; ?>" class="taxonomydiv">
+		<ul id="taxonomy-<?php echo $taxonomy_name; ?>-tabs" class="taxonomy-tabs add-menu-item-tabs">
+			<li <?php echo ( 'most-used' == $current_tab ? ' class="tabs"' : '' ); ?>><a class="menu-tab-link" href="<?php echo add_query_arg($taxonomy_name . '-tab', 'most-used', remove_query_arg($removed_args)); ?>#tabs-panel-<?php echo $taxonomy_name; ?>-pop"><?php _e('Most Used'); ?></a></li>
+			<li <?php echo ( 'search' == $current_tab ? ' class="tabs"' : '' ); ?>><a class="menu-tab-link" href="<?php echo add_query_arg($taxonomy_name . '-tab', 'search', remove_query_arg($removed_args)); ?>#tabs-panel-search-taxonomy-<?php echo $taxonomy_name; ?>"><?php _e('Search'); ?></a></li>
+			<li <?php echo ( 'all' == $current_tab ? ' class="tabs"' : '' ); ?>><a class="menu-tab-link" href="<?php echo add_query_arg($taxonomy_name . '-tab', 'all', remove_query_arg($removed_args)); ?>#tabs-panel-<?php echo $taxonomy_name; ?>-all"><?php _e('View All'); ?></a></li>
+		</ul>
 
-	<p class="button-controls">
-		<span class="lists-controls">
-			<a class="show-all"><?php _e('View All'); ?></a>
-			<a class="hide-all"><?php _e('Hide All'); ?></a>
-		</span>
+		<div id="tabs-panel-<?php echo $taxonomy_name; ?>-pop" class="tabs-panel <?php
+			echo ( 'most-used' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' );
+		?>">
+			<ul id="<?php echo $taxonomy_name; ?>checklist-pop" class="categorychecklist form-no-clear" >
+				<?php
+				$popular_terms = get_terms( $taxonomy_name, array( 'orderby' => 'count', 'order' => 'DESC', 'number' => 10, 'hierarchical' => false ) );
+				$args['walker'] = $walker;
+				echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $popular_terms), 0, (object) $args );
+				?>
+				<?php 
+				?>
+			</ul>
+		</div><!-- /.tabs-panel -->
 
-		<span class="add-to-menu">
-			<a class="button"><?php _e('Add to Menu'); ?></a>
-		</span>
-	</p>
+		<div class="tabs-panel <?php 
+			echo ( 'search' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' );
+		?>" id="tabs-panel-search-taxonomy-<?php echo $taxonomy_name; ?>">
+			<?php 
+			if ( isset( $_REQUEST['quick-search-taxonomy-' . $taxonomy_name] ) ) {
+				$searched = esc_attr( $_REQUEST['quick-search-taxonomy-' . $taxonomy_name] );
+				$search_results = get_terms( $taxonomy_name, array( 'name__like' => $searched, 'fields' => 'all', 'orderby' => 'count', 'order' => 'DESC', 'hierarchical' => false ) );
+			} else {
+				$searched = '';
+				$search_results = array();
+			}
+			?>
+			<p class="quick-search-wrap">
+				<input type="text" class="quick-search regular-text" value="<?php echo $searched; ?>" name="quick-search-taxonomy-<?php echo $taxonomy_name; ?>" />
+				<input type="submit" class="quick-search-submit button-secondary" value="<?php esc_attr_e('Search'); ?>" />
+			</p>
+		
+			<ul id="<?php echo $taxonomy_name; ?>-search-checklist" class="list:<?php echo $taxonomy_name?> categorychecklist form-no-clear">
+			<?php if ( ! empty( $search_results ) && ! is_wp_error( $search_results ) ) : ?>
+				<?php
+				$args['walker'] = $walker;
+				echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $search_results), 0, (object) $args );
+				?>
+			<?php endif; ?>
+			</ul>
+		</div><!-- /.tabs-panel -->
 
-	<div id="existing-<?php echo esc_attr( $id ); ?>" class="list-wrap">
-		<div class="list-container">
-			<ul class="list">
-				<?php echo isset( $error ) ? $error : wp_nav_menu_get_items( $terms, 'taxonomy', $id ); ?>
+		<div id="tabs-panel-<?php echo $taxonomy_name; ?>-all" class="tabs-panel <?php
+			echo ( 'all' == $current_tab ? 'tabs-panel-active' : 'tabs-panel-inactive' );
+		?>">
+			<div class="add-menu-item-pagelinks">
+				<?php echo $page_links; ?>
+			</div>
+			<ul id="<?php echo $taxonomy_name; ?>checklist" class="list:<?php echo $taxonomy_name?> categorychecklist form-no-clear">
+				<?php
+				$args['walker'] = $walker;
+				echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $terms), 0, (object) $args );
+				?>
 			</ul>
-		</div><!-- /.list-container-->
-	</div><!-- /#existing-categories-->
-	<input type="hidden" class="autocomplete" name="autocomplete-<?php echo esc_attr($id); ?>-names" value="<?php echo esc_js( $term_names ); ?>" />
-	<br class="clear" />
-	<script type="text/javascript" charset="utf-8">
-		// <![CDATA[
-		jQuery(document).ready(function(){
-			wpNavMenu.autocomplete('<?php echo esc_attr($id); ?>');
-		});
-		// ]]>
-	</script>
+			<div class="add-menu-item-pagelinks">
+				<?php echo $page_links; ?>
+			</div>
+		</div><!-- /.tabs-panel -->
+
+		<p class="button-controls">
+			<span class="lists-controls">
+				<a href="<?php 
+					echo add_query_arg(
+						array(
+							$taxonomy_name . '-tab' => 'all',
+							'selectall' => 1,
+						),
+						remove_query_arg($removed_args)
+					);
+				?>#taxonomy-<?php echo $taxonomy_name; ?>" class="select-all"><?php _e('Select All'); ?></a>
+			</span>
+
+			<span class="add-to-menu">
+				<input type="submit" class="button-secondary" value="<?php esc_attr_e('Add to Menu'); ?>" name="add-taxonomy-menu-item" />
+			</span>
+		</p>
+
+		<br class="clear" />
+	</div><!-- /.taxonomydiv -->
 	<?php
 }
 
 /**
- * Abstract function for returning all menu items of a menu item type.
+ * Save posted nav menu item data.
  *
  * @since 3.0.0
  *
- * @param string $menu_items Array of objects containing all menu items to be displayed.
- * @param string $object_type Menu item type.
- * @param string $object Optional. Menu item type name.
- * @param string $context Optional. The context for how the menu items should be formatted.
- * @return string $ouput Menu items.
+ * @param int $menu_id The menu ID for which to save this item.
+ * @param array $menu_data The unsanitized posted menu item data.
+ * @return array The database IDs of the items saved.
  */
-function wp_nav_menu_get_items( $menu_items, $object_type, $object = null, $context = 'frontend' ) {
-	if ( !$menu_items )
-		return __( 'Not Found' );
+function wp_save_nav_menu_item( $menu_id = 0, $menu_data = array() ) {
+	$menu_id = (int) $menu_id;
+	$items_saved = array();
 
-	$output = '';
-	$i = 1;
-	foreach ( $menu_items as $menu_item ) {
-		// convert the 'parent' taxonomy property to 'post_parent'
-		// so we don't have to duplicate this entire function.
-		if ( !isset($menu_item->post_parent) )
-			$menu_item->post_parent = $menu_item->parent;
+	if ( is_nav_menu( $menu_id ) ) {
 
-		// Get all attachements and links
-		if ( in_array($object, array( 'attachment', 'custom' )) )
-			$menu_item->post_parent = 0;
+		// Loop through all the menu items' POST values
+		foreach( (array) $menu_data as $_possible_db_id => $_item_object_data ) {
+			if ( 
+				empty( $_item_object_data['menu-item-object-id'] ) && // checkbox is not checked
+				( 
+					! isset( $_item_object_data['menu-item-type'] ) || // and item type either isn't set 
+					in_array( $_item_object_data['menu-item-url'], array( 'http://', '' ) ) || // or URL is the default
+					'custom' != $_item_object_data['menu-item-type'] ||  // or it's not a custom menu item	
+					! empty( $_item_object_data['menu-item-db-id'] ) // or it *is* a custom menu item that already exists
+				)
+			) {
+				continue; // then this potential menu item is not getting added to this menu
+			}
 
-		if ( 0 == $menu_item->post_parent ) {
-			// Set up the menu item
-			$menu_item = wp_setup_nav_menu_item( $menu_item, $object_type, $object );
+			// if this possible menu item doesn't actually have a menu database ID yet
+			if ( 
+				empty( $_item_object_data['menu-item-db-id'] ) ||
+				( 0 > $_possible_db_id ) ||
+				$_possible_db_id != $_item_object_data['menu-item-db-id']
+			) {
+				$_actual_db_id = 0;
+			} else {
+				$_actual_db_id = (int) $_item_object_data['menu-item-db-id'];
+			}
+			
+			$args = array(
+				'menu-item-db-id' => ( isset( $_item_object_data['menu-item-db-id'] ) ? $_item_object_data['menu-item-db-id'] : '' ),
+				'menu-item-object-id' => ( isset( $_item_object_data['menu-item-object-id'] ) ? $_item_object_data['menu-item-object-id'] : '' ),
+				'menu-item-object' => ( isset( $_item_object_data['menu-item-object'] ) ? $_item_object_data['menu-item-object'] : '' ),
+				'menu-item-parent-id' => ( isset( $_item_object_data['menu-item-parent-id'] ) ? $_item_object_data['menu-item-parent-id'] : '' ),
+				'menu-item-position' => ( isset( $_item_object_data['menu-item-position'] ) ? $_item_object_data['menu-item-position'] : '' ),
+				'menu-item-type' => ( isset( $_item_object_data['menu-item-type'] ) ? $_item_object_data['menu-item-type'] : '' ),
+				'menu-item-append' => ( isset( $_item_object_data['menu-item-append'] ) ? $_item_object_data['menu-item-append'] : '' ),
+				'menu-item-title' => ( isset( $_item_object_data['menu-item-title'] ) ? $_item_object_data['menu-item-title'] : '' ),
+				'menu-item-url' => ( isset( $_item_object_data['menu-item-url'] ) ? $_item_object_data['menu-item-url'] : '' ),
+				'menu-item-description' => ( isset( $_item_object_data['menu-item-description'] ) ? $_item_object_data['menu-item-description'] : '' ),
+				'menu-item-attr-title' => ( isset( $_item_object_data['menu-item-attr-title'] ) ? $_item_object_data['menu-item-attr-title'] : '' ),
+				'menu-item-target' => ( isset( $_item_object_data['menu-item-target'] ) ? $_item_object_data['menu-item-target'] : '' ),
+				'menu-item-classes' => ( isset( $_item_object_data['menu-item-classes'] ) ? $_item_object_data['menu-item-classes'] : '' ),
+				'menu-item-xfn' => ( isset( $_item_object_data['menu-item-xfn'] ) ? $_item_object_data['menu-item-xfn'] : '' ),
+			);
 
-			// No blank titles
-			if ( empty($menu_item->title) )
-				continue;
+			$items_saved[] = wp_update_nav_menu_item( $menu_id, $_actual_db_id, $args );
 
-			$attributes = ( 'backend' == $context ) ? ' id="menu-item-'. $i .'" value="'. $i .'"' : '';
-
-			$output .= '<li'. $attributes .'>';
-			$output .= wp_get_nav_menu_item( $menu_item, $object_type, $object );
-			$output .= wp_get_nav_menu_sub_items( $menu_item->ID, $object_type, $object, $context );
-			$output .= '</li>';
-
-			++$i;
 		}
 	}
-
-	return $output;
+	return $items_saved;
 }
 
 /**
- * Recursive function to retrieve sub menu items.
+ * Returns the menu item formatted to edit.
  *
  * @since 3.0.0
  *
- * @param string $childof The Parent ID.
- * @param string $object_type The object type.
- * @param string $object The object name.
- * @return string $output sub menu items.
+ * @param string $menu_item_id The ID of the menu item to format.
+ * @return string|WP_Error $output The menu formatted to edit or error object on failure.
  */
-function wp_get_nav_menu_sub_items( $childof, $object_type, $object = null, $context = 'frontend' ) {
-	$args = array( 'child_of' => $childof, 'parent' => $childof, 'hide_empty' => false, );
+function wp_get_nav_menu_to_edit( $menu_item_id = 0 ) {
+	static $_placeholder;
+	
+	$menu = wp_get_nav_menu_object( $menu_item_id );
+	
+	// If the menu exists, get its items.
+	if ( is_nav_menu( $menu ) ) {
+		$menu_items = wp_get_nav_menu_items( $menu->term_id );
 
-	switch ( $object_type ) {
-		case 'post_type':
-			$hierarchical_post_types = get_post_types( array( 'hierarchical' => true ) );
-			if ( in_array( $object, $hierarchical_post_types ) ) {
-				$args['post_type'] = $object;
-				$sub_menu_items = get_pages( $args );
-			} else {
-				$sub_menu_items = array();
-			}
-			break;
+		$walker = new Walker_Nav_Menu_Edit; 
 
-		case 'taxonomy':
-			if ( is_taxonomy_hierarchical( $object ) ) {
-				$sub_menu_items = get_terms( $object, $args );
-			} else {
-				$sub_menu_items = array();
-			}
-			break;
-
-		default:
-			$sub_menu_items = array();
-			break;
+		return walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $menu_items), 0, (object) array('walker' => $walker ) );
+	} elseif ( is_wp_error( $menu ) ) {
+		return $menu;	
 	}
 
-	$output = '';
-	$i = 1;
-	if ( !empty($sub_menu_items) && !is_wp_error($sub_menu_items) ) {
-		$output .= '<ul class="sub-menu menu-item-type-'. $object_type .'">';
-		foreach ( $sub_menu_items as $menu_item ) {
-			// Set up the menu item
-			$menu_item = wp_setup_nav_menu_item( $menu_item, $object_type, $object );
-			$attributes = ( 'backend' == $context ) ? ' id="menu-item-'. $i .'" value="'. $i .'"' : '';
 
-			$output .= '<li'. $attributes .'>';
-			$output .= wp_get_nav_menu_item( $menu_item, $object_type, $object );
-			$output .= wp_get_nav_menu_sub_items( $menu_item->ID, $object_type, $object );
-			$output .= '</li>';
+}
 
-			++$i;
-		}
-		$output .= '</ul>';
-	}
-	return $output;
-}
-?>
\ No newline at end of file
+?>
Index: wp-admin/js/nav-menu.dev.js
===================================================================
--- wp-admin/js/nav-menu.dev.js	(revision 14247)
+++ wp-admin/js/nav-menu.dev.js	(working copy)
@@ -8,494 +8,647 @@
  * @subpackage Administration
  */
 
-var wpNavMenu;
+var WPNavMenuHandler = function () {
+	var $ = jQuery,
+	activeHovering = false,
+	currentDropzone = null,
+	
+	customLinkNameInput,
+	customLinkURLInput,
+	customLinkNameDefault,
+	customLinkURLDefault,
 
-(function($) {
+	autoCompleteData = {},
+
+	formatAutocompleteResponse = function( resultRow, pos, total, queryTerm ) {
+		if ( resultRow && resultRow[0] ) {
+			var data = $.parseJSON(resultRow[0]);
+			if ( data.post_title ) {
+				if ( data.ID && data.post_type )
+					autoCompleteData[data.post_title] = {ID: data.ID, object_type: data.post_type};
+				return data.post_title;
+			}
+		}
+	},
+
+	formatAutocompleteResult = function( resultRow, pos, total, queryTerm ) {
+		if ( resultRow && resultRow[0] ) {
+			var data = $.parseJSON(resultRow[0]);
+			if ( data.post_title )
+				return data.post_title;
+		}
+	},
 	
-	wpNavMenu = {
+	getListDataFromID = function(menuItemID, parentEl) {
+		if ( ! menuItemID ) 
+			return false;
+		parentEl = parentEl || document;
+		var fields = [
+			'menu-item-db-id',
+			'menu-item-object-id',
+			'menu-item-object',
+			'menu-item-parent-id',
+			'menu-item-position',
+			'menu-item-type',
+			'menu-item-append',
+			'menu-item-title',
+			'menu-item-url',
+			'menu-item-description',
+			'menu-item-attr-title',
+			'menu-item-target',
+			'menu-item-classes',
+			'menu-item-xfn'
+		],
+		itemData = {},
+		inputs = parentEl.getElementsByTagName('input'),
+		i = inputs.length,
+		j,
+		menuID = document.getElementById('nav-menu-meta-object-id').value;
+
+		while ( i-- ) {
+			j = fields.length;
+			while ( j-- ) {
+				if ( 
+					inputs[i] &&
+					inputs[i].name &&
+					'menu-item[' + menuItemID + '][' + fields[j] + ']' == inputs[i].name 
+				) {
+					itemData[fields[j]] = inputs[i].value;
+				}
+			}
+		}
+
+		return itemData;
+	},
+
+	getParentMenuItemDBId = function() {
+		var allInputs = this.getElementsByTagName('input'),
+		i = allInputs.length,
+		j,
+		parentEl,
+		parentInputs;
+
+		while( i-- ) {
+			if ( -1 != allInputs[i].name.indexOf('menu-item-parent-id[' + parseInt(this.id.replace('menu-item-', ''), 10) + ']') ) {
+				/*  This LI element is not in a submenu */
+				if ( ! this.parentNode.className || -1 == this.parentNode.className.indexOf('sub-menu') ) {
+					allInputs[i].value = 0;
+
+				/* This LI is in a submenu, so need to get the parent's object ID (which is different from the parent's DB ID, the ID in its attributes) */
+				} else if ( 'LI' == this.parentNode.parentNode.nodeName && -1 != this.parentNode.parentNode.id.indexOf('menu-item-') )  {
+					 parentEl = this.parentNode.parentNode;
+					 parentInputs = parentEl.getElementsByTagName('input');
+					 j = parentInputs.length;
+					 while ( j-- ) {
+						if ( parentInputs[j].name && -1 != parentInputs[j].name.indexOf('menu-item-object-id[' + parseInt(parentEl.id.replace('menu-item-', ''), 10) + ']') ) {
+							allInputs[i].value = parseInt(parentInputs[j].value, 10);
+							break;
+						}
+					 }
+				}
+				break;
+			}
+		}
+	},
+
+	makeDroppable = function(el) {
+		var that = this;
+
+		$(el).droppable({
+			accept: '.menu li',
+			tolerance: 'pointer',
+			drop: function(e, ui) {
+				that.eventOnDrop(ui.draggable[0], this, ui, e);
+			},
+
+			over: function(e,ui) {
+				that.eventOnDragOver(ui.draggable[0], this, ui, e);
+			},
+
+			out: function(e, ui) {
+				that.eventOnDragOut(ui.draggable[0], this, ui, e);
+			}
+		});
+	},
+
+	menuList,
+
+	setupListItemsDragAndDrop = function(list) {
+		if ( ! list )
+			return;
+
+		var menuListItems = list.getElementsByTagName('li'),
+		i = menuListItems.length;
 		
+		while ( i-- )
+			this.setupListItemDragAndDrop(menuListItems[i]);
+	};
+
+	return {
+		
 		// Functions that run on init.
 		init : function() {
+			menuList = document.getElementById('menu-to-edit');
 			
-			wpNavMenu.initial_meta_boxes();
+			this.attachMenuEditListeners();
+
+			this.attachMenuMetaListeners(document.getElementById('nav-menu-meta'));
 			
-			wpNavMenu.drag_and_drop();
+			this.attachTabsPanelListeners();
 			
-			// Delete AYS
-			$('#update-nav-menu .deletion').click(function(){
-				if ( confirm( navMenuL10n.warnDelete ) ) {
-					return true;
-				} else {
-					return false;
-				};
-			});
+			// init drag and drop
+			setupListItemsDragAndDrop.call(this, menuList); 
 
-			// Handle Save Button Clicks
-			$('#update-nav-menu').submit(function(){
-				wpNavMenu.update_post_data();
-			});
-
-			// Handle some return keypresses
-			$('#create-menu-name').keypress(function(e){
-				if ( 13 == e.keyCode ) {
-					$('#create-menu-button').click();
-					return false;
+			postboxes.add_postbox_toggles('nav-menus');
+		},
+		
+		attachMenuEditListeners : function() {
+			var that = this;
+			$('#update-nav-menu').bind('click', function(e) {
+				if ( e.target && e.target.className ) {
+					if ( -1 != e.target.className.indexOf('item-edit') ) {
+						return that.eventOnClickEditLink(e.target);
+					} else if ( -1 != e.target.className.indexOf('menu-delete') ) {
+						return that.eventOnClickMenuDelete(e.target);
+					} else if ( -1 != e.target.className.indexOf('item-delete') ) {
+						return that.eventOnClickMenuItemDelete(e.target);
+					}
 				}
 			});
+		},
 
-			$('#custom-menu-item-url, #custom-menu-item-name').keypress(function(e){
-				if ( 13 == e.keyCode ) {
-					$('#add-custom-links a.button').click();
-					return false;
-				}
-			}).focus(function(){
-				if ( $(this).val() == $(this).attr('defaultValue') && $(this).attr('id') != 'custom-menu-item-url' ) {
-					$(this).val('');
-				}
-			}).blur(function(){
-				if ( $(this).val() == '' ) {
-					$(this).val($(this).attr('defaultValue'));
-				}
-			});
+		attachMenuMetaListeners : function(formEL) {
+			if ( ! formEL )
+				return;
 
-			$('#create-menu-name').focus(function(){
-				if ( $(this).val() == $(this).attr('defaultValue') ) {
-					$(this).val('');
-				}
-			}).blur(function(){
-				if ( $(this).val() == '' ) {
-					$(this).val($(this).attr('defaultValue'));
-				}
-			});
+			var that = this;
 
-			// close postboxes that should be closed
-			$('.if-js-closed').removeClass('if-js-closed').addClass('closed');
+			// set default value for custom link name
+			customLinkNameInput = document.getElementById('custom-menu-item-name');
+			customLinkURLInput = document.getElementById('custom-menu-item-url');
 
-			// postboxes setup
-			postboxes.add_postbox_toggles('nav-menus');
+			if ( customLinkNameInput ) {
+				customLinkNameDefault = 'undefined' != typeof customLinkNameInput.defaultValue ? customLinkNameInput.defaultValue : customLinkNameInput.getAttribute('value');
+				customLinkURLDefault = 'undefined' != typeof customLinkURLInput.defaultValue ? customLinkURLInput.defaultValue : customLinkURLInput.getAttribute('value');
+				$(customLinkNameInput).bind('focus', function(e) {
+					this.value = customLinkNameDefault == this.value ? '' : this.value;
+				});
+				
+				$(customLinkNameInput).bind('blur', function(e) {
+					this.value = '' == this.value ? customLinkNameDefault : this.value;
+				});
+			}
 
-			// Clear the quick search textbox
-			$('.quick-search').click(function(){
-				$(this).attr( 'value', '' );
+			// auto-suggest for the quick-search boxes
+			$('input.quick-search').each(function(i, el) {
+				that.setupQuickSearchEventListeners(el); 
 			});
-
-			// Quick Search submit
-			$('.quick-search-submit').click(function(){
-				$(this).siblings('.quick-search').search();
+			
+			$(formEL).bind('submit', function(e) {
+				return that.eventSubmitMetaForm.call(that, this, e);
 			});
+		},
 
-			// Edit menu item
-			$('#menu-container .item-edit').click(function(){
-				wpNavMenu.edit_menu_item( $(this).attr('value') );
-			});
+		attachTabsPanelListeners : function() {
+			$('#menu-settings-column').bind('click', function(e) {
+				if ( e.target && e.target.className && -1 != e.target.className.indexOf('menu-tab-link') ) {
+					var i = e.target.parentNode,
+					activePanel,
+					panelIdMatch = /#(.*)$/.exec(e.target.href),
+					tabPanels;
+					while ( ! i.className || -1 == i.className.indexOf('inside') ) {
+						i = i.parentNode;
+					}
+					$('.tabs-panel', i).each(function() {
+						if ( this.className )
+							this.className = this.className.replace('tabs-panel-active', 'tabs-panel-inactive');
+					});
 
-			// Delete menu item
-			$('#menu-container .item-delete').click(function(){
-				wpNavMenu.remove_menu_item( $(this).attr('value') );
-			});
+					$('.tabs', i).each(function() {
+						this.className = this.className.replace('tabs', '');
+					});
 
-			// Update menu item settings (thickbox)
-			$('#update-menu-item').click(function(){
-				wpNavMenu.update_menu_item();
-				tb_remove();
-			});
+					e.target.parentNode.className += ' tabs';
 
-			// Close thickbox
-			$('#cancel-save').click(function(){
-				tb_remove();
+					if ( panelIdMatch && panelIdMatch[1] ) {
+						activePanel = document.getElementById(panelIdMatch[1]);
+						if ( activePanel ) {
+							activePanel.className = activePanel.className.replace('tabs-panel-inactive', 'tabs-panel-active');
+						}
+					}
+					
+					return false;
+				} else if ( e.target && e.target.className && -1 != e.target.className.indexOf('select-all') ) {
+					var selectAreaMatch = /#(.*)$/.exec(e.target.href);
+					if ( selectAreaMatch && selectAreaMatch[1] ) {
+						$('#' + selectAreaMatch[1] + ' .tabs-panel-active input[type=checkbox]').attr('checked', 'checked');
+						return false;
+					}
+				}
 			});
+		},
 
-			// Show All Button
-			$('.show-all').click(function(e){
-				$(e.currentTarget).parent().parent().siblings('.list-wrap').css( 'display', 'block' );
-				$(e.currentTarget).parent().parent().siblings('.list-wrap').find('li').css( 'display', 'block' );
-				$(e.currentTarget).hide();
-				$(e.currentTarget).siblings('.hide-all').show();
-			});
+		setupListItemDragAndDrop : function(el) {
+			var defLists = el.getElementsByTagName('dl'),
+			dropZone = this.makeListItemDropzone(el),
+			i = defLists.length;
 
-			// Hide All Button
-			$('.hide-all').click(function(e){
-				$(e.currentTarget).parent().parent().siblings('.list-wrap').css( 'display', 'none' );
-				$(e.currentTarget).parent().parent().siblings('.list-wrap').find('li').css( 'display', 'none' );
-				$(e.currentTarget).hide();
-				$(e.currentTarget).siblings('.show-all').show();
-			});
+			makeDroppable.call(this, dropZone);
+			this.makeListItemDraggable(el);
 
-			// Add menu items into the menu
-			$('.add-to-menu').click(function(e){
-				wpNavMenu.add_checked_items_to_menu(e.currentTarget);
-			});
+			while( i-- ) {
+				makeDroppable.call(this, defLists[i]);
+			}
+		},
 
-			// Create a new link then add it to the menu
-			$('#add-custom-links .add-to-menu a').click(function(e){
-				// Add link to menu
-				if ( $('#custom-menu-item-url').val() == $('#custom-menu-item-url').attr('defaultValue') )
-					return; // Do not allow "http://" submissions to go through
-
-				wpNavMenu.add_custom_link( $('#custom-menu-item-name').val(), $('#custom-menu-item-url').val() );
-				
-				// Reset the fields back to their defaults
-				$('#custom-menu-item-name').val($('#custom-menu-item-name').attr('defaultValue'));
-				$('#custom-menu-item-url' ).val($('#custom-menu-item-url' ).attr('defaultValue')).focus();
+		/**
+		 * Set up quick-search input fields' events.
+		 *
+		 * @param object el The input element.
+		 */
+		setupQuickSearchEventListeners : function(el) {
+			var that = this;
+			$(el).autocomplete( ajaxurl + '?action=menu-quick-search&type=' + el.name, 
+				{ 
+					delay: 500, 
+					formatItem: formatAutocompleteResponse,
+					formatResult: formatAutocompleteResult,
+					minchars: 2, 
+					multiple: false 
+				}
+			).bind('blur', function(e) {
+				var changedData = autoCompleteData[this.value],
+				inputEl = this;
+				if ( changedData ) {
+					$.post( 
+						ajaxurl + '?action=menu-quick-search&type=get-post-item&response-format=markup',
+						changedData,
+						function(r) {
+							that.processQuickSearchQueryResponse.call(that, r, changedData); 
+							autoCompleteData[inputEl.value] = false;
+						}
+					);
+				}
 			});
 		},
+
+		eventOnClickEditLink : function(clickedEl) {
+			var activeEdit,
+			matchedSection = /#(.*)$/.exec(clickedEl.href);
+			if ( matchedSection && matchedSection[1] ) {
+				activeEdit = document.getElementById(matchedSection[1]);
+				if ( activeEdit ) {
+					if ( -1 != activeEdit.className.indexOf('menu-item-edit-inactive') ) {
+						activeEdit.className = activeEdit.className.replace('menu-item-edit-inactive', 'menu-item-edit-active');
+					} else { 
+						activeEdit.className = activeEdit.className.replace('menu-item-edit-active', 'menu-item-edit-inactive');
+					}
+					return false;
+				}
+			}
+		},
 		
-		add_custom_link : function( link_name, link_url ) {
-			var params = {
-				action: 'save-custom-link',
-				link_name: link_name,
-				link_url: link_url
+		eventOnClickMenuDelete : function(clickedEl) {
+			// Delete warning AYS
+			if ( confirm( navMenuL10n.warnDeleteMenu ) ) {
+				return true;
+			} else {
+				return false;
 			}
-			
-			$.post( ajaxurl, params, function(link_id) {
-				if ( '-1' == link_id )
-					return;
+		},
 
-				wpNavMenu.add_to_menu( link_id, link_id, 'custom', 'custom', navMenuL10n.custom, 0, link_name, link_url, '', '', '', '', '' );
-			}, 'json');
+		eventOnClickMenuItemDelete : function(clickedEl) {
+			var itemID,
+			matchedSection,
+			that = this;
+
+			// Delete warning AYS
+			if ( confirm( navMenuL10n.warnDeleteMenuItem ) ) {
+				matchedSection = /_wpnonce=([a-zA-Z0-9]*)$/.exec(clickedEl.href);
+				if ( matchedSection && matchedSection[1] ) {
+					itemID = parseInt(clickedEl.id.replace('delete-', ''), 10);	
+					$.post(
+						ajaxurl,
+						{
+							action:'delete-menu-item',
+							'menu-item':itemID,
+							'_wpnonce':matchedSection[1]
+						},
+						function (resp) {
+							if ( '1' == resp )
+								that.removeMenuItem(document.getElementById('menu-item-' + itemID));
+						}
+					);
+					return false;	
+				}
+				return true;
+			} else {
+				return false;
+			}
 		},
-		
+
 		/**
-		 * In combination with the php function wp_initial_nav_menu_meta_boxes(),
-		 * this function limits the metaboxes for first time users to just links, pages and cats.
+		 * Callback for the drag over action when dragging a list item.
+		 *
+		 * @param object draggedEl The DOM element being dragged
+		 * @param object dropEl The DOM element on top of which we're dropping.
 		 */
-		initial_meta_boxes : function() {
-			var hidden = $('#hidden-metaboxes').val().split( ',' );
+		eventOnDragOver : function(draggedEl, dropEl) {
+			activeHovering = true;
+			currentDropzone = dropEl;
+			dropEl.className += ' sortable-placeholder';
+		},
 
-			if ( '' != hidden ) {
-				for ( var i = 0; i < hidden.length; i++ ) {
-					$( '#' + hidden[i] ).attr( 'style', 'display: none;' );
-					$( '#' + hidden[i] + '-hide' ).attr( 'checked', false );
-				};
-			};
+		/**
+		 * Callback for the drag out action when dragging a list item.
+		 *
+		 * @param object draggedEl The DOM element being dragged
+		 * @param object dropEl The DOM element on top of which we're dropping.
+		 */
+		eventOnDragOut : function(draggedEl, dropEl) {
+			activeHovering = false;
+
+			/* delay the disappearance of the droppable area so it doesn't flicker in and out */
+			(function(that) {
+				setTimeout(function() {
+					if ( that != currentDropzone || ( ! activeHovering && that.className && -1 != that.className.indexOf('sortable-placeholder') ) ) {
+						that.className = that.className.replace(/sortable-placeholder/g, '');
+					}
+				}, 500);
+			})(dropEl);
 		},
-		
-		// Makes the menu items drag and droppable.
-		drag_and_drop : function() {
-			// Make sure all li's have dropzones
-			$('.menu li').each(function(){
-				if ( !$(this).children('.dropzone').attr('class') ) {
-					$(this).prepend('<div class="dropzone"></div>');
-				};
-			});
 
-			// make menu item draggable
-			$('.menu li').draggable({
-				handle: ' > dl',
-				opacity: .8,
-				addClasses: false,
-				helper: 'clone',
-				zIndex: 100
-			});
+		/**
+		 * Callback for the drop action when dragging and dropping a list item.
+		 *
+		 * @param object draggedEl The DOM element being dragged (and now dropped)
+		 * @param object dropEl The DOM element on top of which we're dropping.
+		 */
+		eventOnDrop : function(draggedEl, dropEl) {
+			var dropIntoSublist = !! ( -1 == dropEl.className.indexOf('dropzone') ),
+			subLists = dropEl.parentNode.getElementsByTagName('ul'),
+			hasSublist = false,
+			i = subLists.length,
+			subList;
 
-			// make menu item droppable
-			$('.menu li dl, .menu li .dropzone').droppable({
-				accept: '.menu li',
-				tolerance: 'pointer',
-				drop: function(e, ui) {
-					var li = $(this).parent();
-					var child = !$(this).hasClass('dropzone');
+			activeHovering = false;
+			
+			dropEl.className = dropEl.className.replace(/sortable-placeholder/g, '');
 
-					var parent_id = li.children('input[name=menu-item-object-id[]]').val(); 
-					var child_id = ui.draggable.children('input[name=menu-item-object-id[]]').val(); 
- 
-					// An item cannot be a child of itself. Use a custom link for the effect.
-					if ( parent_id == child_id ) {
-						ui.draggable.find('dt').animate( { backgroundColor: '#FF3333' }, { duration: 'normal', complete: function() { $(this).css( 'backgroundColor', '' ) } } );
-						$(this).parent().find('dt').removeAttr('style');
-						return;
-					};
- 
-					// Append UL to first child
-					if ( child && li.children('ul').length == 0 ) {
-						li.append( '<ul class="sub-menu" />' );
+			if ( dropIntoSublist ) {
+				while ( i-- ) {
+					if ( subLists[i] && 1 != subLists[i].className.indexOf('sub-menu') ) {
+						hasSublist = true;
+						subList = subLists[i];
 					}
-					// Make it draggable
-					if ( child ) {
-						li.children('ul').append( ui.draggable );
-					} else {
-						li.before( ui.draggable );
-					}
+				}
 
-					li.find('dl,.dropzone').css({ backgroundColor: '', borderColor: '' });
+				if ( ! hasSublist ) {
+					subList = document.createElement('ul');
+					subList.className = 'sub-menu';
+					dropEl.parentNode.appendChild(subList);
+				}
 
-					var draggablevalue = ui.draggable.attr('value');
-					var droppablevalue = li.attr('value');
+				subList.appendChild(draggedEl);
+			} else {
+				dropEl.parentNode.parentNode.insertBefore(draggedEl, dropEl.parentNode);
+			}
 
-					li.find('#menu-' + draggablevalue).find('#parent' + draggablevalue).val(droppablevalue);
-					$(this).parent().find('dt').removeAttr('style');
-					$(this).parent().find('div:first').removeAttr('style');
+			this.recalculateSortOrder(menuList);
 
-				},
-				over: function(e) {
-			    	// Add child
-					if ( $(this).attr('class') == 'dropzone ui-droppable' ) {
-		    			$(this).parent().find('div:first').css({ background: '#f5f5f5', border: '1px dashed #bbb', margin: '10px 0px', height: '40px' });
-		    		}
-					// Add above
-		    		else if ( $(this).attr('class') == 'ui-droppable' ) {
-						$(this).parent().find('dt:first').css('background', '#d8d8d8');
-		    		} else {
-						// Do nothing
-		    		}
-		       	},
-			    out: function() {
-		        	$(this).parent().find('dt').removeAttr('style');
-		        	$(this).parent().find('div:first').removeAttr('style');
-		        	$(this).filter('.dropzone').css({ borderColor: '' });
-		    	}
-			});
+			getParentMenuItemDBId.call(draggedEl); 
 		},
-	
-		// Prepares menu items for POST.
-		update_post_data : function() {
-			var i = 0; // counter
 
-			$('.menu li').each(function(){
-				i = i + 1; // the menu order for each item
+		/**
+		 * Callback for the meta form submit action listener.
+		 *
+		 * @param object thisForm The submitted form.
+		 * @param object e The event object.
+		 */
+		eventSubmitMetaForm : function(thisForm, e) {
+			var inputs = thisForm.getElementsByTagName('input'),
+			i = inputs.length,
+			j,
+			listItemData,
+			listItemDBID,
+			listItemDBIDMatch,
+			params = {},
+			processMethod = function(){},
+			re = new RegExp('menu-item\\[(\[^\\]\]*)');
 
-				var j = $(this).attr('value'); // reference to the current menu item (e.g. li#menu-item + j)
+			thisForm.className = thisForm.className + ' processing',
+			that = this;
 
-				// Grab the menu item id
-				var id = $(this).children('input[name=menu-item-db-id[]]').val();
+			params['action'] = '';
 
-				// Update the li value to equal the menu order
-				$(this).attr('value', i);
+			while ( i-- ) {
+				if ( 	// we're submitting a checked item
+					inputs[i].name &&
+					-1 != inputs[i].name.indexOf('menu-item-object-id') &&
+					inputs[i].checked ||
+					( // or we're dealing with a custom link
+						'undefined' != typeof inputs[i].id &&
+						'custom-menu-item-url' == inputs[i].id &&
+						'' != inputs[i].value &&
+						'http://' != inputs[i].value
+					)
+				) {
+					params['action'] = 'add-menu-item';
+					processMethod = that.processAddMenuItemResponse;
 
-				// Update the position
-				$(this).children('input[name=menu-item-position[]]').attr( 'value', i );
+					listItemDBIDMatch = re.exec(inputs[i].name);
+					listItemDBID = 'undefined' == typeof listItemDBIDMatch[1] ? 0 : parseInt(listItemDBIDMatch[1], 10);
+					listItemData = getListDataFromID(listItemDBID);
+					
+					for ( j in listItemData ) {
+						params['menu-item[' + listItemDBID + '][' + j + ']'] = listItemData[j];
+					}
 
-				// Update the parent id
-				var pid = $(this).parent('.sub-menu').siblings('input[name=menu-item-object-id[]]').val();
-				
-				if ( undefined == pid ) {
-					pid = 0;
-				};
+					inputs[i].checked = false;
 
-				$(this).children('input[name=menu-item-parent-id[]]').attr( 'value', pid );
+				// we're submitting a search term
+				} else if (
+					'' == params['action'] && // give precedence to adding items
+					'' != inputs[i].value &&
+					inputs[i].className &&
+					-1 != inputs[i].className.search(/quick-search\b[^-]/)
+				) {
+					params['action'] = 'menu-quick-search';
+					params['q'] = inputs[i].value;
+					params['response-format'] = 'markup';
+					params['type'] = inputs[i].name;
+					processMethod = that.processQuickSearchQueryResponse;
+				}
+			}
+			params['menu'] = thisForm.elements['menu'].value;
+			params['menu-settings-column-nonce'] = thisForm.elements['menu-settings-column-nonce'].value;
 
-				// Update the menu item count
-				$('#li-count').attr( 'value', i );
+			$.post( ajaxurl, params, function(menuMarkup) {
+				processMethod.call(that, menuMarkup, params);	
+				thisForm.className = thisForm.className.replace(/processing/g, '');
 			});
+
+			return false;
 		},
-		
-		/**
-		 * Enables autocomplete for nav menu types.
-		 *
-		 * @param int id - the id of the menu item type.
-		 */
-		autocomplete : function( id ) {
-			$('#add-'+ id +' .quick-search').autocomplete( $( '#add-'+ id +' .autocomplete' ).val().split('|') );
 
-			$('#add-'+ id +' .quick-search').result(function( event, data, formatted ) {
-				$('#add-'+ id +' .list-wrap').css( 'display', 'block' );
-				$("#add-"+ id +" .list-wrap li:contains('" + data + "')").css( 'display', 'block' );
-				$('#add-'+ id +' .show-all').hide();
-				$('#add-'+ id +' .hide-all').show();
+		makeListItemDraggable : function(el) {
+			// make menu item draggable
+			$(el).draggable({
+				handle: ' > dl',
+				opacity: .8,
+				addClasses: false,
+				helper: 'clone',
+				zIndex: 100
 			});
 		},
-		
+
 		/**
-		 * Populate the thickbox window with the selected menu items
-		 *
-		 * @param int id - the id of the menu item to edit.
+		 * Add the child element that acts as the dropzone for drag-n-drop.
+		 * 
+		 * @param object el The parent object to which we'll prepend the dropzone.
+		 * @return object The dropzone DOM element.
 		 */
-		edit_menu_item : function( id ) {
-			var item_type = $('#menu-item-' + id).children('input[name=menu-item-type[]]').val();
-			var item_title = $('#menu-item-' + id).children('input[name=menu-item-title[]]').val();
-			var item_link = $('#menu-item-' + id).children('input[name=menu-item-url[]]').val();
-			var item_attr_title = $('#menu-item-' + id).children('input[name=menu-item-attr-title[]]').val();
-			var item_target = $('#menu-item-' + id).children('input[name=menu-item-target[]]').val();
-			var item_description = $('#menu-item-' + id).children('input[name=menu-item-description[]]').val();
-			var item_classes = $('#menu-item-' + id).children('input[name=menu-item-classes[]]').val();
-			var item_xfn = $('#menu-item-' + id).children('input[name=menu-item-xfn[]]').val();
+		makeListItemDropzone : function(el) {
+			if ( ! el )
+				return false;
+			var divs = el.getElementsByTagName('div'),
+			i = divs.length,
+			dropZone = document.createElement('div');
 
-			// Only allow custom links to be editable.
-			if ( 'custom' != item_type )
-				$( '#edit-menu-item-url' ).attr('disabled', 'disabled' );
+			while( i-- ) {
+				if ( divs[i].className && -1 != divs[i].className.indexOf('dropzone') && ( el == divs[i].parentNode ) ) 
+					return divs[i];
+			}
 
-			// Populate the fields for thickbox
-			$( '#edit-menu-item-id' ).val(id);
-			$( '#edit-menu-item-title' ).val(item_title);
-			$( '#edit-menu-item-url' ).val(item_link);
-			$( '#edit-menu-item-attr-title' ).val(item_attr_title);
-			$( '#edit-menu-item-target' ).val(item_target);
-			$( "#edit-menu-item-target option[value='" + item_target  + "']" ).attr('selected', 'selected');
-			$( '#edit-menu-item-description' ).val(item_description);
-			$( '#edit-menu-item-classes' ).val(item_classes);
-			$( '#edit-menu-item-xfn' ).val(item_xfn);
+			dropZone.className = 'dropzone';
+			el.insertBefore(dropZone, el.firstChild);
+			return dropZone;
+		},
 
-			// @todo: focus on #edit-menu-item-title
-		},
-		
 		/**
-		 * Update the values for the menu item being editing
+		 * Process the add menu item request response into menu list item.
+		 *
+		 * @param string menuMarkup The text server response of menu item markup.
+		 * @param object req The request arguments.
 		 */
-		update_menu_item : function() {
-			var id = $('#edit-menu-item-id').val();
-			var item_title = $('#edit-menu-item-title').val();
-			var item_link = $('#edit-menu-item-url').val();
-			var item_attr_title = $('#edit-menu-item-attr-title').val();
-			var item_target = $('#edit-menu-item-target').val();
-			var item_description = $('#edit-menu-item-description').val();
-			var item_classes = $('#edit-menu-item-classes').val();
-			var item_xfn = $('#edit-menu-item-xfn').val();
+		processAddMenuItemResponse : function( menuMarkup, req ) {
+			if ( ! req )
+				req = {};
+			var dropZone,
+			i,
+			listElements,
+			wrap = document.createElement('ul');
 
-			// update menu item settings
-			$('.menu #menu-item-' + id).find('span.item-title:first').html(item_title);
+			wrap.innerHTML = menuMarkup;
+			listElements = wrap.getElementsByTagName('li');
+			i = listElements.length;
+			while ( i-- ) {
+				this.setupListItemDragAndDrop(listElements[i]);
+				menuList.appendChild(listElements[i]);
+			}
 
-			$('#menu-item-' + id).children('input[name=menu-item-title[]]').val(item_title);
-			$('#menu-item-' + id).children('input[name=menu-item-url[]]').val(item_link);
-			$('#menu-item-' + id).children('input[name=menu-item-attr-title[]]').val(item_attr_title);
-			$('#menu-item-' + id).children('input[name=menu-item-target[]]').val(item_target);
-			$('#menu-item-' + id).children('input[name=menu-item-description[]]').val(item_description);
-			$('#menu-item-' + id).children('input[name=menu-item-classes[]]').val(item_classes);
-			$('#menu-item-' + id).children('input[name=menu-item-xfn[]]').val(item_xfn);
+			/* set custom link form back to defaults */
+			if ( customLinkNameInput && customLinkURLInput ) { 
+				customLinkNameInput.value = customLinkNameDefault;
+				customLinkURLInput.value = customLinkURLDefault; 
+			}
+		},
 
-			$('.menu #menu-item-' + id + ' dt:first').animate( { backgroundColor: '#FFFF33' }, { duration: 'normal', complete: function() { $(this).css( 'backgroundColor', '' ); }});
-		},
-		
 		/**
-		 * Removes a menu item from current menu
-		 *
-		 * @param int id - the id of the menu item to remove.
+		 * Process the quick search response into a search result
+		 * 
+		 * @param string resp The server response to the query.
+		 * @param object req The request arguments.
 		 */
-		remove_menu_item : function( id ) {
-			var todelete = $('#menu-item-' + id);
+		processQuickSearchQueryResponse : function(resp, req) {
+			if ( ! req )
+				req = {};
+			var wrap = document.createElement('ul'),
+			form = document.getElementById('nav-menu-meta'),
+			i,
+			items,
+			matched,
+			newID,
+			pattern = new RegExp('menu-item\\[(\[^\\]\]*)'),
+			resultList;
 
-			if ( todelete ) {
-				// Give some feedback to the user
-				$( todelete ).find('dt').each(function(){
-					$(this).animate( { backgroundColor: '#FF3333' }, { duration: 'normal', complete: function() { $(this).parent().parent().remove() } } );
-				});
+			// make a unique DB ID number
+			matched = pattern.exec(resp);
+			if ( matched && matched[1] ) {
+				newID = matched[1];
+				while( form.elements['menu-item[' + newID + '][menu-item-type]'] ) {
+					newID--;
+				}
+
+				if ( newID != matched[1] ) {
+					resp = resp.replace(new RegExp('menu-item\\[' + matched[1] + '\\]', 'g'), 'menu-item[' + newID + ']');
+				}
 			}
-		},
-		
-		/**
-		 * Adds the item to the menu
-		 *
-		 * @param string item_db_id - The menu item's db id.
-		 * @param string item_object_id - The menu item's object id.
-		 * @param string item_object - The menu item's object name.
-		 * @param string item_type - The menu item's object type.
-		 * @param string item_append - The menu item's nice name.
-		 * @param string item_parent_id - The menu item's parent id.
-		 * @param string item_title - The menu item title.
-		 * @param string item_url - The menu item url
-		 * @param string item_description - The menu item description.
-		 * @param string item_attr_title - The title attribute.
-		 * @param string item_target - The target attribute.
-		 * @param string item_classes - Optional. Additional CSS classes for the menu item
-		 * @param string item_xfn - Optional. The rel attribute.
-		 */
-		add_to_menu : function( item_db_id, item_object_id, item_object, item_type, item_append, item_parent_id, item_title, item_url, item_description, item_attr_title, item_target, item_classes, item_xfn ) {
-			var randomnumber = $('.menu li').length + 1;
-			var hidden = wpNavMenu.get_hidden_inputs( randomnumber, item_db_id, item_object_id, item_object, item_type, item_parent_id, item_title, item_url, item_description, item_attr_title, item_target, item_classes, item_xfn );
+
+			wrap.innerHTML = resp;
 			
-			// Adds the item to the menu
-			$('.menu').append('<li id="menu-item-' + randomnumber + '" value="' + randomnumber + '"><div class="dropzone ui-droppable"></div><dl class="ui-droppable"><dt><span class="item-title">' + item_title + '</span><span class="item-controls"><span class="item-type">' + item_append + '</span><a class="item-edit thickbox" id="edit' + randomnumber + '" value="' + randomnumber +'" onclick="wpNavMenu.edit_menu_item('+ randomnumber +');" title="' + navMenuL10n.thickbox + '" href="#TB_inline?height=540&width=300&inlineId=menu-item-settings">' + navMenuL10n.edit + '</a> | <a class="item-delete" id="delete' + randomnumber + '" value="' + randomnumber +'" onclick="wpNavMenu.remove_menu_item('+ randomnumber +');">Delete</a></span></dt></dl>' + hidden + '</li>');
+			items = wrap.getElementsByTagName('li');
 
-			// Give some feedback to the user
-			$( '.menu #menu-item-' + randomnumber + ' dt:first' ).animate( { backgroundColor: '#FFFF33' }, { duration: 'normal', complete: function() { $(this).css( 'backgroundColor', '' ); }});
+			if ( items[0] && req.object_type ) {
+				resultList = document.getElementById(req.object_type + '-search-checklist');
+				if ( resultList ) {
+					resultList.appendChild(items[0]);
+				}
+			} else if ( req.type ) {
+				matched = /quick-search-posttype-([a-zA-Z_-]*)/.exec(req.type);
+				if ( matched && matched[1] ) {
+					resultList = document.getElementById(matched[1] + '-search-checklist');
+					if ( resultList ) {
+						i = items.length;
+						while( i-- ) {
+							resultList.appendChild(items[i]);
+						}
+					}
+				}
+			}
+		},
 
-			// Enable drag-n-drop
-			wpNavMenu.drag_and_drop();
+		recalculateSortOrder : function(parentEl) {
+			var allInputs = parentEl.getElementsByTagName('input'),
+			i,
+			j = 0;
 
-			// Reload thickbox
-			tb_init('a.thickbox, area.thickbox, input.thickbox');
+			for( i = 0; i < allInputs.length; i++ ) {
+				if ( allInputs[i].name && -1 != allInputs[i].name.indexOf('menu-item-position') ) {
+					allInputs[i].value = ++j;
+				}
+			}
 		},
-		
-		/**
-		 * Grabs items from the queue and adds them to the menu.
-		 *
-		 * @param string button - a reference to the button that was clicked
-		 */
-		add_checked_items_to_menu : function( button ) {
-			// Grab checked items
-			var items = $(button).parent().siblings('.list-wrap').find(':checked');
 
-			// If nothing was checked, cancel
-			if ( 0 == items.length )
+		removeMenuItem : function(el) {
+			if ( ! el ) 
 				return false;
 
-			// Loop through each item, grab it's hidden data and add it to the menu.
-			$(items).each(function(){
-				var item_type = $(this).parent().siblings('.menu-item-type').val();
+			var subMenus = el.getElementsByTagName('ul'),
+			subs,
+			i;
 
-				if ( 'custom' == item_type ) {
-					var item_attr_title = $(this).parent().siblings('.menu-item-attr-title').val();
-					var item_target = $(this).parent().siblings('.menu-item-target').val();
-					var item_classes = $(this).parent().siblings('.menu-item-classes').val();
-					var item_xfn = $(this).parent().siblings('.menu-item-xfn').val();
-				} else {
-					var item_attr_title = '';
-					var item_target = '';
-					var item_classes = '';
-					var item_xfn = '';
-				};
+			if ( subMenus[0] ) {
+				subs = subMenus[0].getElementsByTagName('li');
+				for ( i = 0; i < subs.length; i++ ) {
+					if ( subs[i].id && -1 != subs[i].id.indexOf('menu-item-') && subs[i].parentNode == subMenus[0] ) {
+						el.parentNode.insertBefore(subs[i], el);
+					}
+				}
+			}
 
-				var item_db_id = $(this).parent().siblings('.menu-item-db-id').val();
-				var item_object_id = $(this).parent().siblings('.menu-item-object-id').val();
-				var item_object = $(this).parent().siblings('.menu-item-object').val();
-				var item_append = $(this).parent().siblings('.menu-item-append').val();
-				var item_parent_id = $(this).parent().siblings('.menu-item-parent-id').val();
-				var item_title = $(this).parent().siblings('.menu-item-title').val();
-				var item_url = $(this).parent().siblings('.menu-item-url').val();
-				var item_description = $(this).parent().siblings('.menu-item-description').val();
-
-				if ( undefined == item_description ) {
-					item_description = '';
-				};
-
-				if ( undefined == item_attr_title ) {
-					item_attr_title = '';
-				};
-
-				// Add the menu item to the menu
-				wpNavMenu.add_to_menu( item_db_id, item_object_id, item_object, item_type, item_append, item_parent_id, item_title, item_url, item_description, item_attr_title, item_target, item_classes, item_xfn );
-
-				// uncheck the menu item in the list
-				$(this).attr( 'checked', false );
+			el.className += ' deleting';
+			$(el).fadeOut( 350 , function() {
+				this.parentNode.removeChild(this);	
 			});
-		},
-		
-		/**
-		 * Returns all the nessecary hidden inputs for each menu item.
-		 *
-		 * @param string item_db_id - The menu item's db id.
-		 * @param string item_object_id - The menu item's object id.
-		 * @param string item_object - The menu item's object name.
-		 * @param string item_type - The menu item's object type.
-		 * @param string item_append - The menu item's nice name.
-		 * @param string item_parent_id - The menu item's parent id.
-		 * @param string item_title - The menu item title.
-		 * @param string item_url - The menu item url
-		 * @param string item_description - The menu item description.
-		 * @param string item_attr_title - The title attribute.
-		 * @param string item_target - The target attribute.
-		 * @param string item_classes - Optional. Additional CSS classes for the menu item
-		 * @param string item_xfn - Optional. The rel attribute.
-		 */
-		get_hidden_inputs : function( randomnumber, item_db_id, item_object_id, item_object, item_type, item_parent_id, item_title, item_url, item_description, item_attr_title, item_target, item_classes, item_xfn ) {
-			var hidden = '';
+			
+			this.recalculateSortOrder(menuList);
+		}
+	}
+}
 
-			hidden += '<input type="hidden" name="menu-item-db-id[]" value="' + item_db_id + '" />';
-			hidden += '<input type="hidden" name="menu-item-object-id[]" value="' + item_object_id + '" />';
-			hidden += '<input type="hidden" name="menu-item-object[]" value="' + item_object + '" />';
-			hidden += '<input type="hidden" name="menu-item-type[]" value="' + item_type + '" />';
-			hidden += '<input type="hidden" name="menu-item-parent-id[]" value="' + item_parent_id + '" />';
-			hidden += '<input type="hidden" name="menu-item-position[]" value="' + randomnumber + '" />';
-			hidden += '<input type="hidden" name="menu-item-title[]" value="' + item_title + '" />';
-			hidden += '<input type="hidden" name="menu-item-attr-title[]" value="' + item_attr_title + '" />';
-			hidden += '<input type="hidden" name="menu-item-url[]" value="' + item_url + '" />';
-			hidden += '<input type="hidden" name="menu-item-target[]" value="' + item_target + '" />';
-			hidden += '<input type="hidden" name="menu-item-description[]" value="' + item_description + '" />';
-			hidden += '<input type="hidden" name="menu-item-classes[]" value="' + item_classes + '" />';
-			hidden += '<input type="hidden" name="menu-item-xfn[]" value="' + item_xfn + '" />';
+var wpNavMenu = new WPNavMenuHandler();
 
-			return hidden;
-		}
-	}
-	
-	$(document).ready(function($){ wpNavMenu.init(); });
-})(jQuery);
\ No newline at end of file
+jQuery(function() {
+	wpNavMenu.init();
+});
Index: wp-admin/nav-menus.php
===================================================================
--- wp-admin/nav-menus.php	(revision 14247)
+++ wp-admin/nav-menus.php	(working copy)
@@ -10,7 +10,7 @@
  */
 
 /** Load WordPress Administration Bootstrap */
-require_once( './admin.php' );
+require_once( 'admin.php' );
 
 // Load all the nav menu interface functions
 require_once( ABSPATH . 'wp-admin/includes/nav-menu.php' );
@@ -37,9 +37,6 @@
 wp_enqueue_script( 'wp-lists' );
 wp_enqueue_script( 'postbox' );
 
-// Thickbox
-add_thickbox();
-
 // Container for any messages displayed to the user
 $messages_div = '';
 
@@ -53,10 +50,133 @@
 $action = isset( $_REQUEST['action'] ) ? $_REQUEST['action'] : 'edit';
 
 switch ( $action ) {
+	case 'add-menu-item':
+		if ( current_user_can( 'switch_themes' ) ) {
+			check_admin_referer( 'add-menu_item', 'menu-settings-column-nonce' );
+			if ( isset( $_REQUEST['menu-item'] ) ) {
+				wp_save_nav_menu_item( $nav_menu_selected_id, $_REQUEST['menu-item'] );
+			}
+		}
+		break;
+	case 'move-down-menu-item' :
+		// moving down a menu item is the same as moving up the next in order
+		check_admin_referer( 'move-menu_item' );
+		$menu_item_id = (int) $_REQUEST['menu-item'];
+		$next_item_id = 0;
+		if ( 'nav_menu_item' == get_post_type( $menu_item_id ) ) {
+			$menus = isset( $_REQUEST['menu'] ) ? array( (int) $_REQUEST['menu'] ) : wp_get_object_terms( $menu_item_id, 'nav_menu', array( 'fields' => 'ids' ) );
+			if ( ! is_wp_error( $menus ) ) {
+				foreach( (array) $menus as $menu_id ) {
+					$move_down_ordered_menu_items = (array) wp_get_nav_menu_items( $menu_id );
+					while ( $next = array_shift( $move_down_ordered_menu_items ) ) {
+						if ( isset( $next->ID ) && $next->ID == $menu_item_id ) {
+							break;
+						}
+					}
+
+					if ( $following = array_shift( $move_down_ordered_menu_items ) ) {
+						$next_item_id = (int) $following->ID;
+					}
+				}
+			}
+		}
+		// fall through to next case
+	case 'move-up-menu-item' :
+		check_admin_referer( 'move-menu_item' );
+		$menu_item_id = empty( $next_item_id ) ? (int) $_REQUEST['menu-item'] : $next_item_id;
+		if ( 'nav_menu_item' == get_post_type( $menu_item_id ) ) {
+			$menus = isset( $_REQUEST['menu'] ) ? array( (int) $_REQUEST['menu'] ) : wp_get_object_terms( $menu_item_id, 'nav_menu', array( 'fields' => 'ids' ) );
+			if ( ! is_wp_error( $menus ) ) {
+				foreach( (array) $menus as $menu_id ) {
+					$ordered_menu_items = wp_get_nav_menu_items( $menu_id );
+					$menu_item_data = get_post( $menu_item_id , ARRAY_A );
+
+					// setup the data we need in one pass through the array of menu items
+					$dbids_to_orders = array();
+					$orders_to_dbids = array();
+					$objectids_to_dbids = array();
+					$dbids_to_objectids = array();
+					foreach( (array) $ordered_menu_items as $ordered_menu_item_object ) {
+						if ( isset( $ordered_menu_item_object->ID ) ) {
+							if ( isset( $ordered_menu_item_object->menu_order ) ) {
+								$dbids_to_orders[$ordered_menu_item_object->ID] = $ordered_menu_item_object->menu_order;
+								$orders_to_dbids[$ordered_menu_item_object->menu_order] = $ordered_menu_item_object->ID;
+							}
+
+							$possible_object_id = (int) get_post_meta( $ordered_menu_item_object->ID, '_menu_item_object_id', true );
+							if ( ! empty( $possible_object_id ) ) {
+								$dbids_to_objectids[$ordered_menu_item_object->ID] = $possible_object_id;
+								$objectids_to_dbids[$possible_object_id] = $ordered_menu_item_object->ID;
+							} 
+						}
+					}
+
+
+					// if this menu item is not first
+					if ( ! empty( $dbids_to_orders[$menu_item_id] ) && ! empty( $orders_to_dbids[$dbids_to_orders[$menu_item_id] - 1] ) ) {
+						
+						// if this menu item is a child of the previous
+						if ( 
+							! empty( $menu_item_data['post_parent'] ) && 
+							isset( $objectids_to_dbids[$menu_item_data['post_parent']] ) &&
+							isset( $orders_to_dbids[$dbids_to_orders[$menu_item_id] - 1] ) &&
+							( $objectids_to_dbids[$menu_item_data['post_parent']] == $orders_to_dbids[$dbids_to_orders[$menu_item_id] - 1] )
+						) {
+
+							$parent_db_id = $objectids_to_dbids[$menu_item_data['post_parent']];
+							$parent_data = get_post( $parent_db_id, ARRAY_A );
+
+							if ( ! is_wp_error( $parent_data ) ) {
+								
+								// if there is something before the parent, make menu item a child of the parent's parent
+								if ( ! empty( $dbids_to_orders[$parent_db_id] ) && ! empty( $orders_to_dbids[$dbids_to_orders[$parent_db_id] - 1] ) ) {
+									$menu_item_data['post_parent'] = $parent_data['post_parent'];
+
+								// else there isn't something before the parent
+								} else {
+									$menu_item_data['post_parent'] = 0;
+								}
+								
+								// set former parent's [menu_order] to that of menu-item's
+								$parent_data['menu_order'] = $parent_data['menu_order'] + 1;
+
+								// set menu-item's [menu_order] to that of former parent
+								$menu_item_data['menu_order'] = $menu_item_data['menu_order'] - 1;
+								
+								// save changes
+								wp_update_post($menu_item_data);
+								wp_update_post($parent_data);
+							}
+
+						// else this menu item is not a child of the previous
+						} elseif ( isset($dbids_to_objectids[$orders_to_dbids[$dbids_to_orders[$menu_item_id] - 1]] ) ) {
+							// just make it a child of the previous; keep the order
+							$menu_item_data['post_parent'] = (int) $dbids_to_objectids[$orders_to_dbids[$dbids_to_orders[$menu_item_id] - 1]];
+							wp_update_post($menu_item_data);
+						}
+					}
+				}
+			}
+		}
+		break;
+
+	case 'delete-menu-item':
+		$menu_item_id = (int) $_REQUEST['menu-item'];
+
+		check_admin_referer( 'delete-menu_item_' . $menu_item_id );
+
+
+		if ( 'nav_menu_item' == get_post_type( $menu_item_id ) ) {
+			if ( wp_delete_post( $menu_item_id, true ) ) {
+				
+				$messages_div = '<div id="message" class="updated"><p>' . __('The menu item has been successfully deleted.') . '</p></div>';
+			}
+		}
+		break;
 	case 'delete':
 		check_admin_referer( 'delete-nav_menu-' . $nav_menu_selected_id );
 
-		if ( is_nav_menu($nav_menu_selected_id) ) {
+		if ( is_nav_menu( $nav_menu_selected_id ) ) {
 			$delete_nav_menu = wp_delete_nav_menu( $nav_menu_selected_id );
 
 			if ( is_wp_error($delete_nav_menu) ) {
@@ -70,98 +190,73 @@
 		break;
 
 	case 'update':
-		check_admin_referer( 'update-nav_menu' );
+		check_admin_referer( 'update-nav_menu', 'update-nav-menu-nonce' );
 
 		// Add Menu
-		if ( isset($_POST['create-menu-button']) ) {
+		if ( 0 == $nav_menu_selected_id ) {
 			if ( current_theme_supports('nav-menus') || current_theme_supports('widgets') ) {
-				$add_nav_menu = esc_html( $_POST['create-menu-name'] );
+				$new_menu_title = esc_html( $_POST['menu-name'] );
 
-				if ( $add_nav_menu ) {
-					$add_nav_menu = wp_create_nav_menu( $add_nav_menu );
+				if ( $new_menu_title ) {
+					$_nav_menu_selected_id = wp_update_nav_menu_object( 0, array('menu-name' => $new_menu_title) );
 
-					if ( is_wp_error( $add_nav_menu ) ) {
-						$messages_div = '<div id="message" class="error"><p>' . $add_nav_menu->get_error_message() . '</p></div>';
+					if ( is_wp_error( $_nav_menu_selected_id ) ) {
+						$messages_div = '<div id="message" class="error"><p>' . $_nav_menu_selected_id->get_error_message() . '</p></div>';
 					} else {
-						$nav_menu_selected_id = $add_nav_menu->term_id;
-						$nav_menu_selected_title = $add_nav_menu->name;
-						$messages_div = '<div id="message" class="updated"><p>' . sprintf( __('The <strong>%s</strong> menu has been successfully created.'), $add_nav_menu->name ) . '</p></div>';
+						$_menu_object = wp_get_nav_menu_object( $_nav_menu_selected_id );
+						$nav_menu_selected_id = $_nav_menu_selected_id;
+						$nav_menu_selected_title = $_menu_object->name;
+						$messages_div = '<div id="message" class="updated"><p>' . sprintf( __('The <strong>%s</strong> menu has been successfully created.'), $nav_menu_selected_title ) . '</p></div>';
 					}
 				} else {
 					$messages_div = '<div id="message" class="error"><p>' . __('Please enter a valid menu name.') . '</p></div>';
 				}
-				unset( $add_nav_menu );
 			}
+
+		// update existing menu
 		} else {
 
-			// @todo wrap this into wp_update_nav_menu_object();
-			if ( isset($_POST['menu-name']) ) {
-				$old_nav_menu = get_term( $nav_menu_selected_id, 'nav_menu', ARRAY_A );
-				$args = array( 'name' => $_POST['menu-name'], 'slug' => null, 'description' => $old_nav_menu['description'], 'parent' => $old_nav_menu['parent'], );
-				$new_nav_menu = wp_update_term( $nav_menu_selected_id, 'nav_menu', $args );
+			$_menu_object = wp_get_nav_menu_object( $nav_menu_selected_id );
+
+			if ( ! is_wp_error( $_menu_object ) ) {
+				wp_update_nav_menu_object( $nav_menu_selected_id, array( 'menu-name' => $_POST['menu-name'] ) );
+				$nav_menu_selected_title = $_menu_object->name;
 			}
 
 			// Update menu items
 
-			// @todo: wrap update logic into wp_update_nav_menu();
-			$update_count = isset( $_POST['li-count'] ) ? (int) $_POST['li-count'] : 0;
-			$update_nav_menu = is_nav_menu( $nav_menu_selected_id );
-
-			if ( !is_wp_error($update_nav_menu) ) {
+			if ( ! is_wp_error( $_menu_object ) ) {
 				$menu_items = wp_get_nav_menu_items( $nav_menu_selected_id, array('orderby' => 'ID', 'output' => ARRAY_A, 'output_key' => 'ID') );
 
-				// Loop through all POST variables
-				for ( $k = 0; $k < $update_count; $k++ ) {
+				// Loop through all the menu items' POST variables
+				foreach( (array) $_POST['menu-item-db-id'] as $_key => $k ) {
 
 					// Menu item title can't be blank
-					if ( '' == $_POST['menu-item-title'][$k] )
+					if ( '' == $_POST['menu-item-title'][$_key] )
 						continue;
-
-					$menu_item_db_id       = isset( $_POST['menu-item-db-id'][$k] )       ? $_POST['menu-item-db-id'][$k]       : 0;
-					$menu_item_object_id   = isset( $_POST['menu-item-object-id'][$k] )   ? $_POST['menu-item-object-id'][$k]   : 0;
-					$menu_item_object      = isset( $_POST['menu-item-object'][$k] )      ? $_POST['menu-item-object'][$k]      : '';
-					$menu_item_parent_id   = isset( $_POST['menu-item-parent-id'][$k] )   ? $_POST['menu-item-parent-id'][$k]   : 0;
-					$menu_item_position    = isset( $_POST['menu-item-position'][$k] )    ? $_POST['menu-item-position'][$k]    : 0;
-					$menu_item_type        = isset( $_POST['menu-item-type'][$k] )        ? $_POST['menu-item-type'][$k]        : 'custom';
-					$menu_item_append      = isset( $_POST['menu-item-append'][$k] )      ? $_POST['menu-item-append'][$k]      : 'custom';
-					$menu_item_title       = isset( $_POST['menu-item-title'][$k] )       ? $_POST['menu-item-title'][$k]       : '';
-					$menu_item_url         = isset( $_POST['menu-item-url'][$k] )         ? $_POST['menu-item-url'][$k]         : '';
-					$menu_item_description = isset( $_POST['menu-item-description'][$k] ) ? $_POST['menu-item-description'][$k] : '';
-					$menu_item_attr_title  = isset( $_POST['menu-item-attr-title'][$k] )  ? $_POST['menu-item-attr-title'][$k]  : '';
-					$menu_item_target      = isset( $_POST['menu-item-target'][$k] )      ? $_POST['menu-item-target'][$k]      : '';
-					$menu_item_classes     = isset( $_POST['menu-item-classes'][$k] )     ? $_POST['menu-item-classes'][$k]     : '';
-					$menu_item_xfn         = isset( $_POST['menu-item-xfn'][$k] )         ? $_POST['menu-item-xfn'][$k]         : '';
-
-					// Populate the menu item object
-					$post = array(
-						'post_status' => 'publish', 'post_type' => 'nav_menu_item', 'ping_status' => 0,
-						'post_author' => $user_ID, 'tax_input' => array( 'nav_menu' => $update_nav_menu->name ),
-						'post_title' => $menu_item_title, 'post_excerpt' => $menu_item_attr_title,
-						'post_parent' => $menu_item_parent_id, 'menu_order' => $menu_item_position,
-						'post_content' => $menu_item_description,
+	
+					$args = array(
+						'menu-item-db-id' => $_POST['menu-item-db-id'][$_key],
+						'menu-item-object-id' => $_POST['menu-item-object-id'][$_key],
+						'menu-item-object' => $_POST['menu-item-object'][$_key],
+						'menu-item-parent-id' => $_POST['menu-item-parent-id'][$_key],
+						'menu-item-position' => $_POST['menu-item-position'][$_key],
+						'menu-item-type' => $_POST['menu-item-type'][$_key],
+						'menu-item-append' => $_POST['menu-item-append'][$_key],
+						'menu-item-title' => $_POST['menu-item-title'][$_key],
+						'menu-item-url' => $_POST['menu-item-url'][$_key],
+						'menu-item-description' => $_POST['menu-item-description'][$_key],
+						'menu-item-attr-title' => $_POST['menu-item-attr-title'][$_key],
+						'menu-item-target' => $_POST['menu-item-target'][$_key],
+						'menu-item-classes' => $_POST['menu-item-classes'][$_key],
+						'menu-item-xfn' => $_POST['menu-item-xfn'][$_key],
 					);
 
-					// New menu item
-					if ( $menu_item_db_id == 0 ) {
-						$menu_item_db_id = wp_insert_post( $post );
+					$menu_item_db_id = wp_update_nav_menu_item( $nav_menu_selected_id, ( $_POST['menu-item-db-id'][$_key] != $_key ? 0 : $_key ), $args );
 
-					// Update existing menu item
-					} elseif ( isset($menu_items[$menu_item_db_id]) || ( 'custom' == $menu_item_type && 0 != $menu_item_db_id ) ) {
-						$post['ID'] = $menu_item_db_id;
-						wp_update_post( $post );
+					if ( ! is_wp_error( $menu_item_db_id ) && isset( $menu_items[$menu_item_db_id] ) ) {
 						unset( $menu_items[$menu_item_db_id] );
 					}
-
-					update_post_meta( $menu_item_db_id, '_menu_item_type', sanitize_key($menu_item_type) );
-					update_post_meta( $menu_item_db_id, '_menu_item_object_id', (int) $menu_item_object_id );
-					update_post_meta( $menu_item_db_id, '_menu_item_object', sanitize_key($menu_item_object) );
-					update_post_meta( $menu_item_db_id, '_menu_item_target', sanitize_key($menu_item_target) );
-					// @todo handle sanitizing multiple classes separated by whitespace.
-					update_post_meta( $menu_item_db_id, '_menu_item_classes', sanitize_html_class($menu_item_classes) );
-					update_post_meta( $menu_item_db_id, '_menu_item_xfn', sanitize_html_class($menu_item_xfn) );
-
-					// @todo: only save custom link urls.
-					update_post_meta( $menu_item_db_id, '_menu_item_url', esc_url_raw($menu_item_url) );
 				}
 
 				// Remove menu items from the menu that weren't in $_POST
@@ -173,8 +268,8 @@
 
 				do_action( 'wp_update_nav_menu', $nav_menu_selected_id );
 
-				$messages_div = '<div id="message" class="updated"><p>' . sprintf( __('The <strong>%s</strong> menu has been updated.'), $update_nav_menu->name ) . '</p></div>';
-				unset( $update_nav_menu, $update_count, $menu_items );
+				$messages_div = '<div id="message" class="updated"><p>' . sprintf( __('The <strong>%s</strong> menu has been updated.'), $nav_menu_selected_title ) . '</p></div>';
+				unset( $menu_items );
 			}
 		}
 		break;
@@ -184,48 +279,40 @@
 $nav_menus = wp_get_nav_menus();
 
 // Get recently edited nav menu
-$recently_edited = get_user_option( 'nav_menu_recently_edited' );
+$recently_edited = (int) get_user_option( 'nav_menu_recently_edited' );
 
 // If there was no recently edited menu, and $nav_menu_selected_id is a nav menu, update recently edited menu.
-if ( !$recently_edited && is_nav_menu($nav_menu_selected_id) ) {
+if ( !$recently_edited && is_nav_menu( $nav_menu_selected_id ) ) {
 	$recently_edited = $nav_menu_selected_id;
 
-// Else if $nav_menu_selected_id is not a menu, but $recently_edited is, grab that one.
-} elseif ( 0 == $nav_menu_selected_id && is_nav_menu($recently_edited) ) {
+// Else if $nav_menu_selected_id is not a menu and not requesting that we create a new menu, but $recently_edited is a menu, grab that one.
+} elseif ( 0 == $nav_menu_selected_id && ! isset( $_REQUEST['menu'] ) && is_nav_menu( $recently_edited ) ) {
 	$nav_menu_selected_id = $recently_edited;
 
 // Else try to grab the first menu from the menus list
-} elseif ( 0 == $nav_menu_selected_id && ! empty($nav_menus) ) {
+} elseif ( 0 == $nav_menu_selected_id && ! isset( $_REQUEST['menu'] ) && ! empty($nav_menus) ) {
 	$nav_menu_selected_id = $nav_menus[0]->term_id;
 }
 
 // Update the user's setting
-if ( $nav_menu_selected_id != $recently_edited && is_nav_menu($nav_menu_selected_id) )
+if ( $nav_menu_selected_id != $recently_edited && is_nav_menu( $nav_menu_selected_id ) )
 	update_user_meta( $current_user->ID, 'nav_menu_recently_edited', $nav_menu_selected_id );
 
-// If there's a menu, get it's name.
-if ( !$nav_menu_selected_title && $nav_menu_selected_title = is_nav_menu( $nav_menu_selected_id ) ) {
-	$nav_menu_selected_title = $nav_menu_selected_title->name;
+// If there's a menu, get its name.
+if ( ! $nav_menu_selected_title && is_nav_menu( $nav_menu_selected_id ) ) {
+	$_menu_object = wp_get_nav_menu_object( $nav_menu_selected_id );
+	$nav_menu_selected_title = ! is_wp_error( $_menu_object ) ? $_menu_object->name : '';
 }
 
-// Create Menu Metabox
-add_meta_box( 'create-menu', __('Create Menu'), 'wp_nav_menu_create_metabox', 'nav-menus', 'side', 'core' );
-
-// The user has no menus.
-if ( !is_nav_menu( $nav_menu_selected_id ) ) {
-	$messages_div = '<div id="message" class="updated"><p>' . __('You do not have any menus. Create a new menu.') . '</p></div>';
-
 // The theme supports menus
-} elseif ( current_theme_supports('nav-menus') ) {
+if ( current_theme_supports('nav-menus') ) {
 	// Register nav menu metaboxes
-	add_meta_box( 'manage-menu', __( 'Menu Settings' ), 'wp_nav_menu_manage_menu_metabox', 'nav-menus', 'side', 'high', array( $nav_menu_selected_id, $nav_menu_selected_title ) );
-	wp_nav_menu_metaboxes_setup();
+	wp_nav_menu_meta_boxes_setup();
 
 // The theme does not support menus but supports widgets
 } elseif ( current_theme_supports('widgets') ) {
 	// Register nav menu metaboxes
-	add_meta_box( 'manage-menu', __( 'Menu Settings' ), 'wp_nav_menu_manage_menu_metabox', 'nav-menus', 'side', 'high', array( $nav_menu_selected_id, $nav_menu_selected_title ) );
-	wp_nav_menu_metaboxes_setup();
+	wp_nav_menu_meta_boxes_setup();
 	$messages_div = '<div id="message" class="error"><p>' . __('The current theme does not natively support menus, but you can use the &#8220;Navigation Menu&#8221; widget to add any menus you create here to the theme&#8217;s sidebar.') . '</p></div>';
 
 // The theme supports neither menus nor widgets.
@@ -235,114 +322,113 @@
 }
 
 // Get the admin header
-require_once( './admin-header.php' );
+require_once( 'admin-header.php' );
 ?>
-<div class="wrap">
+<div class="wrap nav-edit-wrap">
 	<?php screen_icon(); ?>
 	<h2><?php esc_html_e('Menus'); ?></h2>
-	<?php /* OMGWTFBBQ */ ?><div class="error"><p><strong><?php _e('Beta Testers:') ?></strong> <?php _e('This feature is still under construction. You can try it out, but expect it to change in layout and functionality in the second beta release.'); ?></p></div>
 	<?php echo $messages_div; ?>
-	<div class="hide-if-js error"><p><?php _e('You do not have JavaScript enabled in your browser. Please enable it to access the Menus functionality.'); ?></p></div>
+	
+	<?php if ( current_theme_supports('nav-menus') || current_theme_supports('widgets') ) : ?>
+	<div id="menu-settings-column" class="metabox-holder">
 
-	<?php if ( !empty($nav_menus) && count($nav_menus) > 1 && ( current_theme_supports('nav-menus') || current_theme_supports('widgets') ) ) : ?>
-	<ul class="subsubsub">
-		<?php
-			foreach ( $nav_menus as $_nav_menu ) {
-				$sep = end( $nav_menus ) == $_nav_menu ? '' : ' | ';
+		<form id="nav-menu-meta" action="<?php echo admin_url( 'nav-menus.php' ); ?>" class="nav-menu-meta" method="post" enctype="multipart/form-data">
+			<input type="hidden" name="menu" id="nav-menu-meta-object-id" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" />
+			<input type="hidden" name="action" value="add-menu-item" />
+			<?php wp_nonce_field( 'add-menu_item', 'menu-settings-column-nonce' ); ?>
+			<?php do_meta_boxes( 'nav-menus', 'side', null ); ?>
+		</form>
 
-				if ( $nav_menu_selected_id == $_nav_menu->term_id )
-					echo '<li><a href="'. admin_url( 'nav-menus.php?action=edit&amp;menu=' . esc_attr($_nav_menu->term_id) ) .'" class="current">'. esc_html( $_nav_menu->name ) .'</a>'. $sep .'</li>';
-				else
-					echo '<li><a href="'. admin_url( 'nav-menus.php?action=edit&amp;menu=' . esc_attr($_nav_menu->term_id) ) .'">'. esc_html( $_nav_menu->name ) .'</a>'. $sep .'</li>';
-			}
-		?>
-	</ul>
-	<?php endif; ?>
+	</div><!-- /#menu-settings-column -->
+	
+	<div id="menu-management" class="">
+		<h2>
+			<?php 
+			foreach( (array) $nav_menus as $_nav_menu ) :
+				
+				?>
+				<a href="<?php 
+					echo add_query_arg(
+						array(
+							'action' => 'edit',
+							'menu' => $_nav_menu->term_id,
+						),
+						admin_url( 'nav-menus.php' )
+					);
+				?>" class="menu-tabs<?php 
+					if ( $nav_menu_selected_id != $_nav_menu->term_id ) 
+						echo ' menu-tab-inactive';
+				?>"><?php echo esc_html( $_nav_menu->name ); ?></a>
 
-	<div id="menu-management" class="metabox-holder has-right-sidebar">
-		<form id="update-nav-menu" action="<?php echo admin_url( 'nav-menus.php' ); ?>" method="post" enctype="multipart/form-data">
-			<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
-			<?php wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
-			<?php wp_nonce_field( 'update-nav_menu' ); ?>
-			<input type="hidden" name="action" value="update" />
-			<input type="hidden" name="li-count" id="li-count" value="-1" />
-			<input type="hidden" name="menu" id="menu" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" />
-			<input type="hidden" id="hidden-metaboxes" value="<?php echo wp_initial_nav_menu_meta_boxes(); ?>" />
-			<div id="post-body">
-				<div id="post-body-content">
-					<?php if ( is_nav_menu($nav_menu_selected_id) && ( current_theme_supports('nav-menus') || current_theme_supports('widgets') ) ) : ?>
-						<div id="menu-container" class="postbox">
-							<h3 class="hndle"><?php echo esc_html( $nav_menu_selected_title ); ?></h3>
-							<div class="inside">
-								<?php wp_nav_menu( array( 'menu' => $nav_menu_selected_id, 'context' => 'backend' ) ); ?>
-							</div><!-- /.inside -->
-						<!-- /#nav-menu-canvas .postbox-->
-						</div>
-					<?php endif; ?>
-				</div><!-- /#post-body-content-->
-			</div><!--- /#post-body -->
-			<div id="menu-settings-column" class="inner-sidebar">
+				<?php
+			endforeach;
+			?>
+			<a href="<?php 
+				echo add_query_arg(
+					array(
+						'action' => 'edit',
+						'menu' => 0,
+					),
+					admin_url( 'nav-menus.php' )
+				);
+			?>" class="menu-tabs menu-add-new<?php 
+				if ( 0 != $nav_menu_selected_id ) 
+					echo ' menu-tab-inactive';
+			?>"><?php printf( '<abbr title="%s">+</abbr>', esc_html__( 'Add menu' ) ); ?></a>
+		</h2>
+		<div class="menu-edit">
+			<form id="update-nav-menu" action="<?php echo admin_url( 'nav-menus.php' ); ?>" method="post" enctype="multipart/form-data">
+				<div id="submitpost" class="submitbox">
+					<div id="minor-publishing">
+						<div class="misc-pub-section misc-pub-section-last">
+							<label class="howto" for="menu-name">
+								<span><?php _e('Name'); ?></span>
+								<input id="menu-name" name="menu-name" type="text" class="regular-text menu-item-textbox" value="<?php echo esc_attr( $nav_menu_selected_title  ); ?>" />
+								<br class="clear" />
+							</label>
+						</div><!--END .misc-pub-section misc-pub-section-last-->
+						<br class="clear" />
+					</div><!--END #misc-publishing-actions-->
+					<div id="major-publishing-actions">
 
-				<?php do_meta_boxes( 'nav-menus', 'side', null ); ?>
+						<?php if ( ! empty( $nav_menu_selected_id ) ) : ?>
+						<div id="delete-action">
+							<a class="submitdelete deletion menu-delete" href="<?php echo wp_nonce_url( admin_url('nav-menus.php?action=delete&amp;menu=' . $nav_menu_selected_id), 'delete-nav_menu-' . $nav_menu_selected_id ); ?>"><?php _e('Delete Menu'); ?></a>
+						</div><!--END #delete-action-->
+						<?php endif; ?>
 
-			</div><!-- /#menu-settings-column -->
-		</form><!--/#update-nav-menu-->
-		<br class="clear" />
-	</div><!-- /.metabox-holder has-right-sidebar-->
+						<div id="publishing-action">
+							<input class="button-primary" name="save_menu" type="submit" value="<?php esc_attr_e('Save Menu'); ?>" />
+						</div><!--END #publishing-action-->
+						<br class="clear" />
+					</div><!--END #major-publishing-actions-->
+				</div><!--END #submitpost .submitbox-->
+				<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
+				<?php wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?>
+				<?php wp_nonce_field( 'update-nav_menu', 'update-nav-menu-nonce' ); ?>
+				<input type="hidden" name="action" value="update" />
+				<input type="hidden" name="menu" id="menu" value="<?php echo esc_attr( $nav_menu_selected_id ); ?>" />
+				<input type="hidden" id="hidden-metaboxes" value="<?php echo wp_initial_nav_menu_meta_boxes(); ?>" />
+				<div id="post-body">
+					<div id="post-body-content">
+						<?php if ( is_nav_menu( $nav_menu_selected_id ) && ( current_theme_supports('nav-menus') || current_theme_supports('widgets') ) ) : ?>
+							<ul class="menu" id="menu-to-edit">
+							<?php 
+							$edit_markup = wp_get_nav_menu_to_edit( $nav_menu_selected_id  ); 
+							if ( ! is_wp_error( $edit_markup ) ) {
+								echo $edit_markup;
+							}
+							?>
+							</ul>
+						<?php endif; ?>
+						<br class="clear" />
+					</div><!-- /#post-body-content-->
+				</div><!--- /#post-body -->
+			</form><!--/#update-nav-menu-->
+		</div><!-- /.menu-edit -->
+	</div><!-- /#menu-management -->
+	<?php endif; // if menus supported in current theme ?>
 </div><!-- /.wrap-->
 
-<div id="menu-item-settings">
-	<p class="description">
-		<label for="edit-menu-item-title">
-			<?php _e( 'Menu Title' ); ?><br />
-			<input type="text" id="edit-menu-item-title" class="widefat" name="edit-menu-item-title" value="" tabindex="1" />
-		</label>
-	</p>
-	<p class="description">
-		<label for="edit-menu-item-url">
-			<?php _e( 'URL' ); ?><br />
-			<input type="text" id="edit-menu-item-url" class="widefat code" name="edit-menu-item-url" value="" tabindex="2" />
-		</label>
-	</p>
-	<p class="description">
-		<label for="edit-menu-item-attr-title">
-			<?php _e( 'Title Attribute' ); ?><br />
-			<input type="text" id="edit-menu-item-attr-title" class="widefat" name="edit-menu-item-attr-title" value="" tabindex="3" />
-		</label>
-	</p>
-	<p class="description">
-		<label for="edit-menu-item-target">
-			<?php _e( 'Link Target' ); ?><br />
-			<select id="edit-menu-item-target" class="widefat" name="edit-menu-item-target" tabindex="4">
-				<option value=""><?php _e('Same window or tab'); ?></option>
-				<option value="_blank"><?php _e('New window or tab'); ?></option>
-			</select>
-		</label>
-	</p>
-	<p class="description">
-		<label for="edit-menu-item-classes">
-			<?php _e( 'CSS Classes (optional)' ); ?><br />
-			<input type="text" id="edit-menu-item-classes" class="widefat code" name="edit-menu-item-classes" value="" tabindex="5" />
-		</label>
-	</p>
-	<p class="description">
-		<label for="edit-menu-item-xfn">
-			<?php _e( 'Link Relationship (XFN) (optional)' ); ?><br />
-			<input type="text" id="edit-menu-item-xfn" class="widefat code" name="edit-menu-item-xfn" value="" tabindex="6" />
-		</label>
-	</p>
-	<p class="description">
-		<label for="edit-menu-item-description">
-			<?php _e( 'Description (optional)' ); ?><br />
-			<textarea id="edit-menu-item-description" class="widefat" rows="3" name="edit-menu-item-description" tabindex="7" /></textarea>
-			<span class="description"><?php _e('The description will be displayed in the menu if the current theme supports it.'); ?></span>
-		</label>
-	</p>
-	<p>
-		<a id="update-menu-item" class="save button-primary" tabindex="8"><?php _e('Save Changes'); ?></a>
-		<a id="cancel-save" class="submitdelete deletion" tabindex="9"><?php _e('Cancel'); ?></a>
-	</p>
-	<input type="hidden" id="edit-menu-item-id" name="edit-item-id" value="" />
-</div><!-- /#menu-item-settings-->
 
-<?php include( './admin-footer.php' ); ?>
\ No newline at end of file
+<?php include( 'admin-footer.php' ); ?>
Index: wp-admin/css/wp-admin-rtl.dev.css
===================================================================
--- wp-admin/css/wp-admin-rtl.dev.css	(revision 14247)
+++ wp-admin/css/wp-admin-rtl.dev.css	(working copy)
@@ -298,7 +298,8 @@
 	margin-left: 0;
 	margin-right: 120px;
 }
-#post-body ul.category-tabs li.tabs {
+#post-body ul.category-tabs li.tabs,
+#post-body ul.add-menu-item-tabs li.tabs {
 	-moz-border-radius: 0 3px 3px 0;
 	-webkit-border-top-left-radius: 0;
 	-webkit-border-top-right-radius: 3px;
@@ -309,21 +310,25 @@
 	border-bottom-left-radius: 0;
 	border-bottom-right-radius: 3px;
 }
-#post-body ul.category-tabs {
+#post-body ul.category-tabs,
+#post-body ul.add-menu-item-tabs {
 	float: right;
 	text-align: left;
 	margin: 0 0 0 -120px;
 }
 #post-body .categorydiv div.tabs-panel,
+#post-body .taxonomy div.tabs-panel,
 #post-body #linkcategorydiv div.tabs-panel {
 	margin: 0 120px 0 5px;
 }
 /* 1800 - 2000
 =================================== */
-#side-sortables .category-tabs li {
+#side-sortables .category-tabs li,
+#side-sortables .add-menu-item-tabs li {
 	padding-left: 8px;
 }
 .categorydiv ul.categorychecklist ul,
+.taxonomydiv ul.categorychecklist ul,
 #linkcategorydiv ul.categorychecklist ul {
 	margin-left: 0;
 	margin-right: 18px;
Index: wp-admin/css/colors-classic.dev.css
===================================================================
--- wp-admin/css/colors-classic.dev.css	(revision 14247)
+++ wp-admin/css/colors-classic.dev.css	(working copy)
@@ -110,11 +110,13 @@
 }
 
 div.tabs-panel,
-ul.category-tabs li.tabs {
+ul.category-tabs li.tabs,
+ul.add-menu-item-tabs li.tabs {
 	border-color: #dfdfdf;
 }
 
-ul.category-tabs li.tabs {
+ul.category-tabs li.tabs,
+ul.add-menu-item-tabs li.tabs {
 	background-color: #f1f1f1;
 }
 
@@ -380,7 +382,8 @@
 	border-color: #dfdfdf;
 }
 
-#side-sortables .category-tabs .tabs a {
+#side-sortables .category-tabs .tabs a,
+#side-sortables .add-menu-item-tabs .tabs a {
 	color: #333;
 }
 
@@ -1467,7 +1470,8 @@
 	background-color: #f5f5f5;
 }
 
-#post-body ul.category-tabs li.tabs a {
+#post-body ul.category-tabs li.tabs a,
+#post-body ul.add-menu-item-tabs li.tabs a {
 	color: #333;
 }
 
Index: wp-admin/css/colors-fresh.dev.css
===================================================================
--- wp-admin/css/colors-fresh.dev.css	(revision 14247)
+++ wp-admin/css/colors-fresh.dev.css	(working copy)
@@ -110,11 +110,13 @@
 }
 
 div.tabs-panel,
-ul.category-tabs li.tabs {
+ul.category-tabs li.tabs,
+ul.add-menu-item-tabs li.tabs {
 	border-color: #dfdfdf;
 }
 
-ul.category-tabs li.tabs {
+ul.category-tabs li.tabs,
+ul.add-menu-item-tabs li.tabs {
 	background-color: #f1f1f1;
 }
 
@@ -379,7 +381,8 @@
 	border-color: #dfdfdf;
 }
 
-#side-sortables .category-tabs .tabs a {
+#side-sortables .category-tabs .tabs a,
+#side-sortables .add-menu-item-tabs .tabs a {
 	color: #333;
 }
 
@@ -490,7 +493,9 @@
 }
 
 /* Because we don't want visited on these links */
+body.press-this .tabs a,
 body.press-this .tabs a:hover {
+	background-color: #fff;
 	border-color: #c6d9e9;
 	border-bottom-color: #fff;
 	color: #d54e21;
@@ -1460,7 +1465,8 @@
 	background-color: #f5f5f5;
 }
 
-#post-body ul.category-tabs li.tabs a {
+#post-body ul.category-tabs li.tabs a,
+#post-body ul.add-menu-item-tabs li.tabs a {
 	color: #333;
 }
 
Index: wp-admin/css/wp-admin.dev.css
===================================================================
--- wp-admin/css/wp-admin.dev.css	(revision 14247)
+++ wp-admin/css/wp-admin.dev.css	(working copy)
@@ -1959,7 +1959,8 @@
 	width: auto;
 }
 
-#post-body ul.category-tabs {
+#post-body ul.category-tabs,
+#post-body ul.add-menu-item-tabs {
 	float: left;
 	width: 120px;
 	text-align: right;
@@ -1968,11 +1969,13 @@
 	padding: 0;
 }
 
-#post-body ul.category-tabs li {
+#post-body ul.category-tabs li,
+#post-body ul.add-menu-item-tabs li {
 	padding: 8px;
 }
 
-#post-body ul.category-tabs li.tabs {
+#post-body ul.category-tabs li.tabs,
+#post-body ul.add-menu-item-tabs li.tabs {
 	-moz-border-radius: 3px 0 0 3px;
 	-webkit-border-top-left-radius: 3px;
 	-webkit-border-bottom-left-radius: 3px;
@@ -1982,12 +1985,16 @@
 	border-bottom-left-radius: 3px;
 }
 
-#post-body ul.category-tabs li.tabs a {
+#post-body ul.category-tabs li.tabs a,
+#post-body ul.add-menu-item-tabs li.tabs a {
 	font-weight: bold;
 	text-decoration: none;
 }
 
 .categorydiv div.tabs-panel,
+.customlinkdiv div.tabs-panel,
+.posttypediv div.tabs-panel,
+.taxonomydiv div.tabs-panel,
 #linkcategorydiv div.tabs-panel {
 	height: 200px;
 	overflow: auto;
@@ -1996,25 +2003,40 @@
 	border-width: 1px;
 }
 
+div.tabs-panel-active {
+	display:block;	
+}
+
+div.tabs-panel-inactive {
+	display:none;	
+}
+
 #post-body .categorydiv div.tabs-panel,
+.taxonomy div.tabs-panel,
 #post-body #linkcategorydiv div.tabs-panel {
 	margin: 0 5px 0 125px;
 }
 
-#side-sortables .category-tabs li {
+#side-sortables .category-tabs li,
+#side-sortables .add-menu-item-tabs li {
 	display: inline;
 	padding-right: 8px;
 }
 
-#side-sortables .category-tabs a {
+#side-sortables .category-tabs a,
+#side-sortables .add-menu-item-tabs a {
 	text-decoration: none;
 }
 
-#side-sortables .category-tabs {
+#side-sortables .category-tabs,
+#side-sortables .add-menu-item-tabs {
 	margin-bottom: 3px;
 }
 
 .categorydiv ul,
+.customlinkdiv ul,
+.posttypediv ul,
+.taxonomydiv ul,
 #linkcategorydiv ul {
 	list-style: none;
 	padding: 0;
@@ -2025,6 +2047,9 @@
 #front-static-pages ul,
 .inline-editor ul.cat-checklist ul,
 .categorydiv ul.categorychecklist ul,
+.customlinkdiv ul.categorychecklist ul,
+.posttypediv ul.categorychecklist ul,
+.taxonomydiv ul.categorychecklist ul,
 #linkcategorydiv ul.categorychecklist ul {
 	margin-left: 18px;
 }
@@ -2040,27 +2065,34 @@
 	margin-bottom: 0px;
 }
 
-.categorydiv .tabs-panel {
+.categorydiv .tabs-panel,
+.customlinkdiv .tabs-panel,
+.posttypediv .tabs-panel,
+.taxonomydiv .tabs-panel {
 	border-width: 3px;
 	border-style: solid;
 }
 
-ul.category-tabs {
+ul.category-tabs,
+ul.add-menu-item-tabs {
 	margin-top: 12px;
 }
 
-ul.category-tabs li.tabs {
+ul.category-tabs li.tabs,
+ul.add-menu-item-tabs li.tabs {
 	border-style: solid solid none;
 	border-width: 1px 1px 0;
 }
 
-#post-body .category-tabs li.tabs {
+#post-body .category-tabs li.tabs,
+#post-body .add-menu-item-tabs li.tabs {
 	border-style: solid none solid solid;
 	border-width: 1px 0 1px 1px;
 	margin-right: -1px;
 }
 
-ul.category-tabs li {
+ul.category-tabs li,
+ul.add-menu-item-tabs li {
 	padding: 5px 8px;
 	-moz-border-radius: 3px 3px 0 0;
 	-webkit-border-top-left-radius: 3px;
@@ -3705,4 +3737,4 @@
 	border-width: 1px 1px 0;
 	background-color: #fafafa;
 	color: #c1c1c1;
-}
\ No newline at end of file
+}
Index: wp-admin/css/nav-menu.dev.css
===================================================================
--- wp-admin/css/nav-menu.dev.css	(revision 14247)
+++ wp-admin/css/nav-menu.dev.css	(working copy)
@@ -8,8 +8,61 @@
  * @subpackage Administration
  */
 
+.nav-edit-wrap {
+	clear:both;
+}
+
+#menu-settings-column {
+	display:block;
+	float:left;
+	width:281px;
+}
+
+#menu-settings-column .inside {
+	padding:0 10px;
+}
+
 /* Menu Container */
-#menu-management { clear: both; }
+#menu-management { 
+	float:left;
+	margin-left:15px;
+}
+	#menu-management .menu-edit {
+		background-color:#fff;
+		border-color: #dfdfdf;
+		border-width: 1px;
+		border-style: solid;
+		margin-bottom: 20px;
+		padding:0 10px 10px;
+		-moz-border-radius-bottomleft: 6px;
+		-webkit-border-bottom-left-radius: 6px;
+		-khtml-border-bottom-left-radius: 6px;
+		border-bottom-left-radius: 6px;
+		-moz-border-radius-bottomright: 6px;
+		-webkit-border-bottom-right-radius: 6px;
+		-khtml-border-bottom-right-radius: 6px;
+		border-bottom-right-radius: 6px;
+		-moz-border-radius-topright: 6px;
+		-webkit-border-top-right-radius: 6px;
+		-khtml-border-top-right-radius: 6px;
+		border-top-right-radius: 6px;
+	}
+
+	#menu-management .menu-add-new abbr {
+		font-weight:bold;
+	}
+
+	#menu-management .menu-tabs {
+		background-color:#fff;
+		border-color:#dfdfdf;
+		border-bottom-color:#fff;
+	}
+	
+	#menu-management .menu-tab-inactive {
+		background-color:#fafafa;
+		border-bottom-color:#fafafa;
+	}
+
 #menu-management .inside { padding: 0 10px; }
 
 /* Button Primary Actions */
@@ -21,7 +74,20 @@
 
 /* Button Secondary Actions */
 .list-controls { float: left; }
-.add-to-menu { float: right; }
+.add-to-menu { 
+	float: right;
+}
+
+form.processing .add-to-menu {
+	background: url("../images/wpspin_light.gif") no-repeat top center;
+	display:block;
+	height:20px;
+	overflow:hidden;
+	text-align:left;
+	text-indent:-999em;
+	width:20px;
+}
+
 .button-controls { margin: 10px 0; }
 .show-all, .hide-all { cursor: pointer; }
 .hide-all { display: none; }
@@ -61,12 +127,58 @@
 /* Nav Menu */
 #menu-container .inside { padding-bottom: 10px; }
 
+.menu {
+	padding-top:1em;
+}
+
 .menu ul { width: 100%; }
-.menu li { margin: 0; }
-.menu li dl dt { -webkit-border-radius: 6px; border-radius: 6px; -moz-border-radius: 6px; border: 1px solid #E6E6E6; position: relative; padding-left: 10px; background-color: #f1f1f1; height: 35px; line-height: 35px; }
-.menu li dl dt:hover { cursor: move; }
+.menu ul.sub-menu {
+}
+.menu li { 
+	margin: 0;
+}
+.menu li dl {
+	clear:both;
+	line-height:1.5em;
+	position:relative;
+}
+.menu li dl dt {
+	-webkit-border-radius: 6px; 
+	border-radius: 6px; 
+	-moz-border-radius: 6px; 
+	border: 1px solid #E6E6E6; 
+	clear:both;
+	cursor: move;
+	position: relative; 
+	padding-left: 10px; 
+	background-color: #f1f1f1; 
+	height: 35px; 
+	line-height: 35px;
+}
+.menu li dl dt:hover {
+}
+.menu li.deleting dl dt {
+	background-color:#faa;
+}
 
-.menu li .item-title { }
+.menu li .item-title { 
+	display:block;
+	height:1em;
+	margin-right:18em;
+}
+
+.menu li div.sortable-placeholder {
+	background: #f5f5f5;
+	border: 1px dashed #bbb;
+	margin: 10px 0px;
+	padding-top:40px;
+}
+
+.menu li dl.sortable-placeholder {
+	background: #f5f5f5;
+	padding-bottom:40px;
+}
+
 .menu li ul li { margin-left: 20px; opacity: .7; }
 .menu li ul li ul li { opacity: .9; }
 .menu li ul li ul li ul li { opacity: .9; }
@@ -81,10 +193,30 @@
 .item-controls { font-size: 11px; position: absolute; right: 15px; top: -1px; }
 .item-controls a { text-decoration: none; }
 .item-controls a:hover { cursor: pointer; }
+.item-controls .item-order a {
+	font-weight:bold;
+}
+
+body.js .item-order {
+	display:none;
+}
+
 .item-controls .menu-item-delete:hover { color: #ff0000; }
 
-/* Thickbox */
-#menu-item-settings { display: none; }
+/* Menu editing */
+.menu-item-edit-active {
+	display:block;
+}
+
+.menu-item-edit-inactive {
+	display:none;
+}
+
+.add-menu-item-pagelinks {
+	margin:.5em auto;
+	text-align:center;
+}
+
 #cancel-save { cursor: pointer; }
 #cancel-save:hover { color: #fff !important; }
 #update-menu-item { color: #fff !important; }
@@ -94,4 +226,4 @@
 
 /* Clearfix */
 .button-controls:after, #menu-item-url-wrap:after, #menu-item-name-wrap:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
-.button-controls, #menu-item-url-wrap, #menu-item-name-wrap { display: block; }
\ No newline at end of file
+.button-controls, #menu-item-url-wrap, #menu-item-name-wrap { display: block; }
