Index: /trunk/wp-admin/custom-navigation.php
===================================================================
--- /trunk/wp-admin/custom-navigation.php	(revision 13265)
+++ /trunk/wp-admin/custom-navigation.php	(revision 13266)
@@ -46,5 +46,5 @@
 
 	<div class="wrap">
-	<div id="no-js"><h3>You do not have JavaScript enabled in your browser. Please enabled it to access the Custom Menu functionality.</h3></div>
+	<div id="no-js"><h3>You do not have JavaScript enabled in your browser. Please enable it to access the Custom Menu functionality.</h3></div>
 			
 	<?php
@@ -52,8 +52,8 @@
 	$menu_id_in_edit = 0;
 	    
-	//Get the theme name
+	// Get the theme name
 	$themename =  get_current_theme();
 	    
-	//CHECK which menu is selected and if menu is in edit already
+	// Check which menu is selected and if menu is in edit already
 	if ( isset( $_POST['switch_menu'] ) )
 		$menu_selected_id = $_POST['menu_select'];
@@ -61,5 +61,5 @@
 		$menu_selected_id = $_POST['menu_id_in_edit'];
 	    
-	//Default Menu to show
+	// Default Menu to show
 	$custom_menus = get_terms( 'menu', array( 'hide_empty' => false ) );
  	if ( !empty( $custom_menus ) )
@@ -85,5 +85,6 @@
 	else
 	    	$postCounter = 0;
-		
+
+	// Create a new menu. Menus are stored as terms in the 'menu' taxonomy.
 	if ( isset( $_POST['add_menu'] ) ) {
 	 	$insert_menu_name = $_POST['add_menu_name'];
@@ -107,19 +108,17 @@
 	 		$messagesdiv = '<div id="message" class="error fade below-h2"><p>Please enter a valid Menu name</p></div>';
 	 	}
-	 		
-			
 	}
 		
-	if (isset($_POST['reset_wp_menu'])) {	
+	if ( isset($_POST['reset_wp_menu']) ) {	
     		$success = wp_custom_nav_reset();
     		if ($success) {
-	    		//DISPLAY SUCCESS MESSAGE IF Menu Reset Correctly
- 			$messagesdiv = '<div id="message" class="updated fade below-h2"><p>'.$themename.'s Custom Menu has been RESET!</p></div>';
- 			//GET reset menu id
-			$custom_menus = array();
-			$menu_selected_id = 0;
+	    		// DISPLAY SUCCESS MESSAGE IF Menu Reset Correctly
+				$messagesdiv = '<div id="message" class="updated fade below-h2"><p>'.$themename.'s Custom Menu has been RESET!</p></div>';
+				// GET reset menu id
+				$custom_menus = array();
+				$menu_selected_id = 0;
 	    	} else {
-    			//DISPLAY SUCCESS MESSAGE IF Menu Reset Correctly
-			$messagesdiv = '<div id="message" class="error fade below-h2"><p>'.$themename.'s Custom Menu could not be RESET. Please try again.</p></div>';
+    			// DISPLAY SUCCESS MESSAGE IF Menu Reset Correctly
+				$messagesdiv = '<div id="message" class="error fade below-h2"><p>'.$themename.'s Custom Menu could not be RESET. Please try again.</p></div>';
 	    	}
 	} elseif ( $postCounter > 0 && $menu_selected_id > 0 ) {
@@ -286,5 +285,5 @@
 						foreach( $custom_menus as $menu ) {
 							$menu_term = get_term( $menu, 'menu' );
-							if ( ( $menu_id_in_edit == $menu ) || ( $menu_selected_id == $menu ) )
+							if ( ( $menu_id_in_edit == $menu->term_id ) || ( $menu_selected_id == $menu->term_id ) )
 								$selected_option = 'selected="selected"';
 							else
Index: /trunk/wp-admin/js/custom-navigation-default-items.dev.js
===================================================================
--- /trunk/wp-admin/js/custom-navigation-default-items.dev.js	(revision 13265)
+++ /trunk/wp-admin/js/custom-navigation-default-items.dev.js	(revision 13266)
@@ -13,5 +13,5 @@
  * Init Functions
 */
-$(function() 
+jQuery(function($)
 	{
 		//Makes dialog box
Index: /trunk/wp-admin/js/custom-navigation-default-items.js
===================================================================
--- /trunk/wp-admin/js/custom-navigation-default-items.js	(revision 13265)
+++ /trunk/wp-admin/js/custom-navigation-default-items.js	(revision 13266)
@@ -1,1 +1,1 @@
-$(function(){$("#dialog-confirm").dialog({autoOpen:false,resizable:false,height:210,width:400,modal:true,buttons:{Save:function(){titletosave=$("#edittitle").attr("value");linktosave=$("#editlink").attr("value");anchortitletosave=$("#editanchortitle").attr("value");newwindowtosave=$("#editnewwindow").attr("value");desctosave=$("#editdescription").attr("value");$("#title"+$(this).dialog("option","itemID")).attr("value",titletosave);$("#linkurl"+$(this).dialog("option","itemID")).attr("value",linktosave);$("#anchortitle"+$(this).dialog("option","itemID")).attr("value",anchortitletosave);$("#newwindow"+$(this).dialog("option","itemID")).attr("value",newwindowtosave);$("#description"+$(this).dialog("option","itemID")).attr("value",desctosave);$("#menu-"+$(this).dialog("option","itemID")+" > dl > dt > span.title").text(titletosave);$("#view"+ +$(this).dialog("option","itemID")).attr("href",linktosave);$(this).dialog("close")},Cancel:function(){$(this).dialog("close")}}});$("#message").animate({opacity:1},2000).fadeOut(300,function(){$(this).remove()});$("#custom-nav li").prepend('<div class="dropzone"></div>');$("#custom-nav li").draggable({handle:" > dl",opacity:0.8,addClasses:false,helper:"clone",zIndex:100});$("#custom-nav dl, #custom-nav .dropzone").droppable({accept:"#custom-nav li",tolerance:"pointer",drop:function(f,d){var a=$(this).parent();var g=!$(this).hasClass("dropzone");if(g&&a.children("ul").length==0){a.append('<ul id="sub-menu" />')}if(g){a.children("ul").append(d.draggable)}else{a.before(d.draggable)}a.find("dl,.dropzone").css({backgroundColor:"",borderColor:""});var c=d.draggable.attr("value");var b=a.attr("value");a.find("#menu-"+c).find("#parent"+c).val(b);$(this).parent().find("dt").removeAttr("style");$(this).parent().find("div:first").removeAttr("style")},over:function(){if($(this).attr("class")=="dropzone ui-droppable"){$(this).parent().find("div:first").css("background","none").css("height","50px")}else{if($(this).attr("class")=="ui-droppable"){$(this).parent().find("dt:first").css("background","#d8d8d8")}else{}}var a=$(this).parent().attr("id")},out:function(){$(this).parent().find("dt").removeAttr("style");$(this).parent().find("div:first").removeAttr("style");$(this).filter(".dropzone").css({borderColor:""})},deactivate:function(){}});$("#save_top").click(function(){updatepostdata()});$("#save_bottom").click(function(){updatepostdata()})});
+jQuery(function(a){a("#dialog-confirm").dialog({autoOpen:false,resizable:false,height:210,width:400,modal:true,buttons:{Save:function(){titletosave=a("#edittitle").attr("value");linktosave=a("#editlink").attr("value");anchortitletosave=a("#editanchortitle").attr("value");newwindowtosave=a("#editnewwindow").attr("value");desctosave=a("#editdescription").attr("value");a("#title"+a(this).dialog("option","itemID")).attr("value",titletosave);a("#linkurl"+a(this).dialog("option","itemID")).attr("value",linktosave);a("#anchortitle"+a(this).dialog("option","itemID")).attr("value",anchortitletosave);a("#newwindow"+a(this).dialog("option","itemID")).attr("value",newwindowtosave);a("#description"+a(this).dialog("option","itemID")).attr("value",desctosave);a("#menu-"+a(this).dialog("option","itemID")+" > dl > dt > span.title").text(titletosave);a("#view"+ +a(this).dialog("option","itemID")).attr("href",linktosave);a(this).dialog("close")},Cancel:function(){a(this).dialog("close")}}});a("#message").animate({opacity:1},2000).fadeOut(300,function(){a(this).remove()});a("#custom-nav li").prepend('<div class="dropzone"></div>');a("#custom-nav li").draggable({handle:" > dl",opacity:0.8,addClasses:false,helper:"clone",zIndex:100});a("#custom-nav dl, #custom-nav .dropzone").droppable({accept:"#custom-nav li",tolerance:"pointer",drop:function(g,f){var b=a(this).parent();var h=!a(this).hasClass("dropzone");if(h&&b.children("ul").length==0){b.append('<ul id="sub-menu" />')}if(h){b.children("ul").append(f.draggable)}else{b.before(f.draggable)}b.find("dl,.dropzone").css({backgroundColor:"",borderColor:""});var d=f.draggable.attr("value");var c=b.attr("value");b.find("#menu-"+d).find("#parent"+d).val(c);a(this).parent().find("dt").removeAttr("style");a(this).parent().find("div:first").removeAttr("style")},over:function(){if(a(this).attr("class")=="dropzone ui-droppable"){a(this).parent().find("div:first").css("background","none").css("height","50px")}else{if(a(this).attr("class")=="ui-droppable"){a(this).parent().find("dt:first").css("background","#d8d8d8")}else{}}var b=a(this).parent().attr("id")},out:function(){a(this).parent().find("dt").removeAttr("style");a(this).parent().find("div:first").removeAttr("style");a(this).filter(".dropzone").css({borderColor:""})},deactivate:function(){}});a("#save_top").click(function(){updatepostdata()});a("#save_bottom").click(function(){updatepostdata()})});
Index: /trunk/wp-admin/js/custom-navigation-dynamic-functions.dev.js
===================================================================
--- /trunk/wp-admin/js/custom-navigation-dynamic-functions.dev.js	(revision 13265)
+++ /trunk/wp-admin/js/custom-navigation-dynamic-functions.dev.js	(revision 13266)
@@ -35,19 +35,19 @@
 {
 	   		
-		itemTitle = $('#title' + o).attr('value');
-		itemURL = $('#linkurl' + o).attr('value');
-		itemAnchorTitle = $('#anchortitle' + o).attr('value');
-		itemNewWindow = $('#newwindow' + o).attr('value');
-		itemDesc = $('#description' + o).attr('value');
-		
-		$('#dialog-confirm').dialog( 'option' , 'itemID' , o )
+		itemTitle = jQuery('#title' + o).attr('value');
+		itemURL = jQuery('#linkurl' + o).attr('value');
+		itemAnchorTitle = jQuery('#anchortitle' + o).attr('value');
+		itemNewWindow = jQuery('#newwindow' + o).attr('value');
+		itemDesc = jQuery('#description' + o).attr('value');
+		
+		jQuery('#dialog-confirm').dialog( 'option' , 'itemID' , o )
 				
-		$('#dialog-confirm').dialog('open');
-		
-		$('#edittitle').attr('value', itemTitle);
-		$('#editlink').attr('value', itemURL);
-		$('#editanchortitle').attr('value', itemAnchorTitle);
-		$("#editnewwindow option[value='" + itemNewWindow  + "']").attr('selected', 'selected');
-		$('#editdescription').attr('value', itemDesc);
+		jQuery('#dialog-confirm').dialog('open');
+		
+		jQuery('#edittitle').attr('value', itemTitle);
+		jQuery('#editlink').attr('value', itemURL);
+		jQuery('#editanchortitle').attr('value', itemAnchorTitle);
+		jQuery("#editnewwindow option[value='" + itemNewWindow  + "']").attr('selected', 'selected');
+		jQuery('#editdescription').attr('value', itemDesc);
 	
 };
@@ -60,22 +60,22 @@
 	
 	var i = 0;
-	 $("#custom-nav").find("li").each(function(i) {
+	 jQuery("#custom-nav").find("li").each(function(i) {
 		i = i + 1;
-     	var j = $(this).attr('value');
-		
-     	$(this).find('#position' + j).attr('value', i);
-     	$(this).attr('id','menu-' + i);
-     	$(this).attr('value', i);
-     	
-     	$(this).find('#dbid' + j).attr('name','dbid' + i);
-     	$(this).find('#dbid' + j).attr('id','dbid' + i);
-     	
-		$(this).find('#postmenu' + j).attr('name','postmenu' + i);
-     	$(this).find('#postmenu' + j).attr('id','postmenu' + i);
-     	
-     	var p = $(this).find('#parent' + j).parent().parent().parent().attr('value');
-     	
-     	$(this).find('#parent' + j).attr('name','parent' + i);
-     	$(this).find('#parent' + j).attr('id','parent' + i);
+     	var j = jQuery(this).attr('value');
+		
+     	jQuery(this).find('#position' + j).attr('value', i);
+     	jQuery(this).attr('id','menu-' + i);
+     	jQuery(this).attr('value', i);
+     	
+     	jQuery(this).find('#dbid' + j).attr('name','dbid' + i);
+     	jQuery(this).find('#dbid' + j).attr('id','dbid' + i);
+     	
+		jQuery(this).find('#postmenu' + j).attr('name','postmenu' + i);
+     	jQuery(this).find('#postmenu' + j).attr('id','postmenu' + i);
+     	
+     	var p = jQuery(this).find('#parent' + j).parent().parent().parent().attr('value');
+     	
+     	jQuery(this).find('#parent' + j).attr('name','parent' + i);
+     	jQuery(this).find('#parent' + j).attr('id','parent' + i);
      	if (p) {
      		//Do nothing
@@ -86,35 +86,35 @@
      	}
      	     	
-     	$(this).find('#parent' + j).attr('value', p);
+     	jQuery(this).find('#parent' + j).attr('value', p);
      	     	
-     	$(this).find('#title' + j).attr('name','title' + i);
-     	$(this).find('#title' + j).attr('id','title' + i);
-     	
-     	$(this).find('#linkurl' + j).attr('name','linkurl' + i);
-     	$(this).find('#linkurl' + j).attr('id','linkurl' + i);
+     	jQuery(this).find('#title' + j).attr('name','title' + i);
+     	jQuery(this).find('#title' + j).attr('id','title' + i);
+     	
+     	jQuery(this).find('#linkurl' + j).attr('name','linkurl' + i);
+     	jQuery(this).find('#linkurl' + j).attr('id','linkurl' + i);
      		
-     	$(this).find('#description' + j).attr('name','description' + i);
-     	$(this).find('#description' + j).attr('id','description' + i);
-     	
-     	$(this).find('#icon' + j).attr('name','icon' + i);
-     	$(this).find('#icon' + j).attr('id','icon' + i);
-     	
-     	$(this).find('#position' + j).attr('name','position' + i);
-     	$(this).find('#position' + j).attr('id','position' + i);
-     	
-     	$(this).find('#linktype' + j).attr('name','linktype' + i);
-     	$(this).find('#linktype' + j).attr('id','linktype' + i);
-     	
-     	$(this).find('#anchortitle' + j).attr('name','anchortitle' + i);
-     	$(this).find('#anchortitle' + j).attr('id','anchortitle' + i);
-     	
-     	$(this).find('#newwindow' + j).attr('name','newwindow' + i);
-     	$(this).find('#newwindow' + j).attr('id','newwindow' + i);
-     	
-     	$(this).find('dl > dt > span > #remove' + j).attr('value', i);
-     	$(this).find('dl > dt > span > #remove' + j).attr('onClick', 'removeitem(' + i + ')');
-     	$(this).find('dl > dt > span > #remove' + j).attr('id','remove' + i);
-
-     	$('#licount').attr('value',i);
+     	jQuery(this).find('#description' + j).attr('name','description' + i);
+     	jQuery(this).find('#description' + j).attr('id','description' + i);
+     	
+     	jQuery(this).find('#icon' + j).attr('name','icon' + i);
+     	jQuery(this).find('#icon' + j).attr('id','icon' + i);
+     	
+     	jQuery(this).find('#position' + j).attr('name','position' + i);
+     	jQuery(this).find('#position' + j).attr('id','position' + i);
+     	
+     	jQuery(this).find('#linktype' + j).attr('name','linktype' + i);
+     	jQuery(this).find('#linktype' + j).attr('id','linktype' + i);
+     	
+     	jQuery(this).find('#anchortitle' + j).attr('name','anchortitle' + i);
+     	jQuery(this).find('#anchortitle' + j).attr('id','anchortitle' + i);
+     	
+     	jQuery(this).find('#newwindow' + j).attr('name','newwindow' + i);
+     	jQuery(this).find('#newwindow' + j).attr('id','newwindow' + i);
+     	
+     	jQuery(this).find('dl > dt > span > #remove' + j).attr('value', i);
+     	jQuery(this).find('dl > dt > span > #remove' + j).attr('onClick', 'removeitem(' + i + ')');
+     	jQuery(this).find('dl > dt > span > #remove' + j).attr('id','remove' + i);
+
+     	jQuery('#licount').attr('value',i);
 
    });
@@ -211,12 +211,12 @@
 	
 	//Notification Message
-	$('.maintitle').after('<div id="message" class="updated fade below-h2"><p>Menu Item added!</p></div>');
-	$('#message').animate({ opacity: 1.0 },2000).fadeOut(300, function(){ $(this).remove();});
+	jQuery('.maintitle').after('<div id="message" class="updated fade below-h2"><p>Menu Item added!</p></div>');
+	jQuery('#message').animate({ opacity: 1.0 },2000).fadeOut(300, function(){ jQuery(this).remove();});
 	
 	//Appends HTML to the menu
-	$('#custom-nav').append('<li id="menu-' + randomnumber + '" value="' + randomnumber + '"><div class="dropzone ui-droppable"></div><dl class="ui-droppable"><dt><span class="title">' + inputvaluevarname + '</span><span class="controls"><span class="type">' + additemtype + '</span><a id="edit' + randomnumber + '" onclick="edititem(' + randomnumber + ')" value="' + randomnumber +'"><img class="edit" alt="Edit Menu Item" title="Edit Menu Item" src="' + templatedir + '/wp-admin/images/ico-edit.png" /></a> <a id="remove' + randomnumber + '" onclick="removeitem(' + randomnumber + ')" value="' + randomnumber +'"><img class="remove" alt="Remove from Custom Menu" title="Remove from Custom Menu" src="' + templatedir + '/wp-admin/images/ico-close.png" /></a> <a href="' + inputvaluevarurl + '" target="_blank"><img alt="View Custom Link" title="View Custom Link" src="' + templatedir + '/wp-admin/images/ico-viewpage.png" /></a></span></dt></dl><a class="hide" href="' + inputvaluevarurl + '">' + inputvaluevarname + '</a><input type="hidden" name="postmenu' + randomnumber + '" id="postmenu' + randomnumber + '" value="' + inputitemid + '" /><input type="hidden" name="parent' + randomnumber + '" id="parent' + randomnumber + '" value="' + inputparentid + '" /><input type="hidden" name="title' + randomnumber + '" id="title' + randomnumber + '" value="' + inputvaluevarname + '" /><input type="hidden" name="linkurl' + randomnumber + '" id="linkurl' + randomnumber + '" value="' + inputvaluevarurl + '" /><input type="hidden" name="description' + randomnumber + '" id="description' + randomnumber + '" value="' + inputdescription + '" /><input type="hidden" name="icon' + randomnumber + '" id="icon' + randomnumber + '" value="' + inputicon + '" /><input type="hidden" name="position' + randomnumber + '" id="position' + randomnumber + '" value="' + randomnumber + '" /><input type="hidden" name="linktype' + randomnumber + '" id="linktype' + randomnumber + '" value="' + inputlinktype + '" /><input type="hidden" name="anchortitle' + randomnumber + '" id="anchortitle' + randomnumber + '" value="' + inputvaluevarname + '" /><input type="hidden" name="newwindow' + randomnumber + '" id="newwindow' + randomnumber + '" value="0" /></li>');
+	jQuery('#custom-nav').append('<li id="menu-' + randomnumber + '" value="' + randomnumber + '"><div class="dropzone ui-droppable"></div><dl class="ui-droppable"><dt><span class="title">' + inputvaluevarname + '</span><span class="controls"><span class="type">' + additemtype + '</span><a id="edit' + randomnumber + '" onclick="edititem(' + randomnumber + ')" value="' + randomnumber +'"><img class="edit" alt="Edit Menu Item" title="Edit Menu Item" src="' + templatedir + '/wp-admin/images/ico-edit.png" /></a> <a id="remove' + randomnumber + '" onclick="removeitem(' + randomnumber + ')" value="' + randomnumber +'"><img class="remove" alt="Remove from Custom Menu" title="Remove from Custom Menu" src="' + templatedir + '/wp-admin/images/ico-close.png" /></a> <a href="' + inputvaluevarurl + '" target="_blank"><img alt="View Custom Link" title="View Custom Link" src="' + templatedir + '/wp-admin/images/ico-viewpage.png" /></a></span></dt></dl><a class="hide" href="' + inputvaluevarurl + '">' + inputvaluevarname + '</a><input type="hidden" name="postmenu' + randomnumber + '" id="postmenu' + randomnumber + '" value="' + inputitemid + '" /><input type="hidden" name="parent' + randomnumber + '" id="parent' + randomnumber + '" value="' + inputparentid + '" /><input type="hidden" name="title' + randomnumber + '" id="title' + randomnumber + '" value="' + inputvaluevarname + '" /><input type="hidden" name="linkurl' + randomnumber + '" id="linkurl' + randomnumber + '" value="' + inputvaluevarurl + '" /><input type="hidden" name="description' + randomnumber + '" id="description' + randomnumber + '" value="' + inputdescription + '" /><input type="hidden" name="icon' + randomnumber + '" id="icon' + randomnumber + '" value="' + inputicon + '" /><input type="hidden" name="position' + randomnumber + '" id="position' + randomnumber + '" value="' + randomnumber + '" /><input type="hidden" name="linktype' + randomnumber + '" id="linktype' + randomnumber + '" value="' + inputlinktype + '" /><input type="hidden" name="anchortitle' + randomnumber + '" id="anchortitle' + randomnumber + '" value="' + inputvaluevarname + '" /><input type="hidden" name="newwindow' + randomnumber + '" id="newwindow' + randomnumber + '" value="0" /></li>');
 
 	//make menu item draggable
-	$('#menu-' + randomnumber + '').draggable(
+	jQuery('#menu-' + randomnumber + '').draggable(
 	{
 		handle: ' > dl',
@@ -228,11 +228,11 @@
 
 	//make menu item droppable
-	$('#menu-' + randomnumber + ' dl, #menu-' + randomnumber + ' .dropzone').droppable({
+	jQuery('#menu-' + randomnumber + ' dl, #menu-' + randomnumber + ' .dropzone').droppable({
 		accept: '#' + randomnumber + ', #custom-nav li',
 		tolerance: 'pointer',
 		drop: function(e, ui) 
 		{
-			var li = $(this).parent();
-			var child = !$(this).hasClass('dropzone');
+			var li = jQuery(this).parent();
+			var child = !jQuery(this).hasClass('dropzone');
 			//Append UL to first child
 			if (child && li.children('ul').length == 0) 
@@ -255,6 +255,6 @@
 	       	var droppablevalue = li.attr('value');
 	       	li.find('#menu-' + draggablevalue).find('#parent' + draggablevalue).val(droppablevalue); 
-	        $(this).parent().find("dt").removeAttr('style');
-	        $(this).parent().find("div:first").removeAttr('style');
+	        jQuery(this).parent().find("dt").removeAttr('style');
+	        jQuery(this).parent().find("div:first").removeAttr('style');
 	        
 		},
@@ -262,12 +262,12 @@
 	    	{
 	    		//Add child
-	    		if ($(this).attr('class') == 'dropzone ui-droppable') 
+	    		if (jQuery(this).attr('class') == 'dropzone ui-droppable') 
 	    		{
-	    			$(this).parent().find("div:first").css('background', 'none').css('height', '50px');
+	    			jQuery(this).parent().find("div:first").css('background', 'none').css('height', '50px');
 	    		}
 	    		//Add above
-	    		else if ($(this).attr('class') == 'ui-droppable') 
+	    		else if (jQuery(this).attr('class') == 'ui-droppable') 
 	    		{
-	    			$(this).parent().find("dt:first").css('background', '#d8d8d8');
+	    			jQuery(this).parent().find("dt:first").css('background', '#d8d8d8');
 	    		}
 	    		//do nothing
@@ -275,12 +275,12 @@
 	    		
 	    		}
-	    		var parentid = $(this).parent().attr('id');
+	    		var parentid = jQuery(this).parent().attr('id');
 		        
 	       	},
 	    	out: function() 
 	    	{
-	        	$(this).parent().find("dt").removeAttr('style');
-	        	$(this).parent().find("div:first").removeAttr('style');
-	        	$(this).filter('.dropzone').css({ borderColor: '' });
+	        	jQuery(this).parent().find("dt").removeAttr('style');
+	        	jQuery(this).parent().find("div:first").removeAttr('style');
+	        	jQuery(this).filter('.dropzone').css({ borderColor: '' });
 	    	}
 	});
Index: /trunk/wp-admin/js/custom-navigation-dynamic-functions.js
===================================================================
--- /trunk/wp-admin/js/custom-navigation-dynamic-functions.js	(revision 13265)
+++ /trunk/wp-admin/js/custom-navigation-dynamic-functions.js	(revision 13266)
@@ -1,1 +1,1 @@
-function removeitem(c){var b=document.getElementById("menu-"+c);if(b){var a=document.getElementById("menu-"+c).parentNode;throwaway_node=a.removeChild(b)}updatepostdata()}function edititem(a){itemTitle=$("#title"+a).attr("value");itemURL=$("#linkurl"+a).attr("value");itemAnchorTitle=$("#anchortitle"+a).attr("value");itemNewWindow=$("#newwindow"+a).attr("value");itemDesc=$("#description"+a).attr("value");$("#dialog-confirm").dialog("option","itemID",a);$("#dialog-confirm").dialog("open");$("#edittitle").attr("value",itemTitle);$("#editlink").attr("value",itemURL);$("#editanchortitle").attr("value",itemAnchorTitle);$("#editnewwindow option[value='"+itemNewWindow+"']").attr("selected","selected");$("#editdescription").attr("value",itemDesc)}function updatepostdata(){var a=0;$("#custom-nav").find("li").each(function(c){c=c+1;var b=$(this).attr("value");$(this).find("#position"+b).attr("value",c);$(this).attr("id","menu-"+c);$(this).attr("value",c);$(this).find("#dbid"+b).attr("name","dbid"+c);$(this).find("#dbid"+b).attr("id","dbid"+c);$(this).find("#postmenu"+b).attr("name","postmenu"+c);$(this).find("#postmenu"+b).attr("id","postmenu"+c);var d=$(this).find("#parent"+b).parent().parent().parent().attr("value");$(this).find("#parent"+b).attr("name","parent"+c);$(this).find("#parent"+b).attr("id","parent"+c);if(d){}else{d=0}$(this).find("#parent"+b).attr("value",d);$(this).find("#title"+b).attr("name","title"+c);$(this).find("#title"+b).attr("id","title"+c);$(this).find("#linkurl"+b).attr("name","linkurl"+c);$(this).find("#linkurl"+b).attr("id","linkurl"+c);$(this).find("#description"+b).attr("name","description"+c);$(this).find("#description"+b).attr("id","description"+c);$(this).find("#icon"+b).attr("name","icon"+c);$(this).find("#icon"+b).attr("id","icon"+c);$(this).find("#position"+b).attr("name","position"+c);$(this).find("#position"+b).attr("id","position"+c);$(this).find("#linktype"+b).attr("name","linktype"+c);$(this).find("#linktype"+b).attr("id","linktype"+c);$(this).find("#anchortitle"+b).attr("name","anchortitle"+c);$(this).find("#anchortitle"+b).attr("id","anchortitle"+c);$(this).find("#newwindow"+b).attr("name","newwindow"+c);$(this).find("#newwindow"+b).attr("id","newwindow"+c);$(this).find("dl > dt > span > #remove"+b).attr("value",c);$(this).find("dl > dt > span > #remove"+b).attr("onClick","removeitem("+c+")");$(this).find("dl > dt > span > #remove"+b).attr("id","remove"+c);$("#licount").attr("value",c)})}function appendToList(b,s,d,n,h,l,e){var k="";var c="";var r="";var o="";var i="";var a="";if(s=="Custom"){k=document.getElementById("custom_menu_item_name").value;c=document.getElementById("custom_menu_item_url").value;r="";o="";inputlinktype="custom";i=document.getElementById("custom_menu_item_description").value}else{if(s=="Page"){k=htmlentities(d.toString());c=n.toString();r=h.toString();o="0";inputlinktype="page";i=htmlentities(e.toString())}else{if(s=="Category"){k=htmlentities(d.toString());c=n.toString();r=h.toString();o="0";inputlinktype="category";i=htmlentities(e.toString())}else{k="";k="";r="";o="";inputlinktype="custom";i=""}}}var g=document.getElementById("custom-nav").getElementsByTagName("li").length;var p=g;var m=0;try{var q=document.getElementById("menu-"+p.toString()).value}catch(f){m=1}while(m==0){p=p+1;try{var j=document.getElementById("menu-"+p.toString()).value}catch(f){m=1}}$(".maintitle").after('<div id="message" class="updated fade below-h2"><p>Menu Item added!</p></div>');$("#message").animate({opacity:1},2000).fadeOut(300,function(){$(this).remove()});$("#custom-nav").append('<li id="menu-'+p+'" value="'+p+'"><div class="dropzone ui-droppable"></div><dl class="ui-droppable"><dt><span class="title">'+k+'</span><span class="controls"><span class="type">'+s+'</span><a id="edit'+p+'" onclick="edititem('+p+')" value="'+p+'"><img class="edit" alt="Edit Menu Item" title="Edit Menu Item" src="'+b+'/wp-admin/images/ico-edit.png" /></a> <a id="remove'+p+'" onclick="removeitem('+p+')" value="'+p+'"><img class="remove" alt="Remove from Custom Menu" title="Remove from Custom Menu" src="'+b+'/wp-admin/images/ico-close.png" /></a> <a href="'+c+'" target="_blank"><img alt="View Custom Link" title="View Custom Link" src="'+b+'/wp-admin/images/ico-viewpage.png" /></a></span></dt></dl><a class="hide" href="'+c+'">'+k+'</a><input type="hidden" name="postmenu'+p+'" id="postmenu'+p+'" value="'+r+'" /><input type="hidden" name="parent'+p+'" id="parent'+p+'" value="'+o+'" /><input type="hidden" name="title'+p+'" id="title'+p+'" value="'+k+'" /><input type="hidden" name="linkurl'+p+'" id="linkurl'+p+'" value="'+c+'" /><input type="hidden" name="description'+p+'" id="description'+p+'" value="'+i+'" /><input type="hidden" name="icon'+p+'" id="icon'+p+'" value="'+a+'" /><input type="hidden" name="position'+p+'" id="position'+p+'" value="'+p+'" /><input type="hidden" name="linktype'+p+'" id="linktype'+p+'" value="'+inputlinktype+'" /><input type="hidden" name="anchortitle'+p+'" id="anchortitle'+p+'" value="'+k+'" /><input type="hidden" name="newwindow'+p+'" id="newwindow'+p+'" value="0" /></li>');$("#menu-"+p+"").draggable({handle:" > dl",opacity:0.8,addClasses:false,helper:"clone",zIndex:100});$("#menu-"+p+" dl, #menu-"+p+" .dropzone").droppable({accept:"#"+p+", #custom-nav li",tolerance:"pointer",drop:function(x,w){var t=$(this).parent();var y=!$(this).hasClass("dropzone");if(y&&t.children("ul").length==0){t.append("<ul/>")}if(y){t.children("ul").append(w.draggable)}else{t.before(w.draggable)}t.find("dl,.dropzone").css({backgroundColor:"",borderColor:""});var v=w.draggable.attr("value");var u=t.attr("value");t.find("#menu-"+v).find("#parent"+v).val(u);$(this).parent().find("dt").removeAttr("style");$(this).parent().find("div:first").removeAttr("style")},over:function(){if($(this).attr("class")=="dropzone ui-droppable"){$(this).parent().find("div:first").css("background","none").css("height","50px")}else{if($(this).attr("class")=="ui-droppable"){$(this).parent().find("dt:first").css("background","#d8d8d8")}else{}}var t=$(this).parent().attr("id")},out:function(){$(this).parent().find("dt").removeAttr("style");$(this).parent().find("div:first").removeAttr("style");$(this).filter(".dropzone").css({borderColor:""})}});updatepostdata()};
+function removeitem(c){var b=document.getElementById("menu-"+c);if(b){var a=document.getElementById("menu-"+c).parentNode;throwaway_node=a.removeChild(b)}updatepostdata()}function edititem(a){itemTitle=jQuery("#title"+a).attr("value");itemURL=jQuery("#linkurl"+a).attr("value");itemAnchorTitle=jQuery("#anchortitle"+a).attr("value");itemNewWindow=jQuery("#newwindow"+a).attr("value");itemDesc=jQuery("#description"+a).attr("value");jQuery("#dialog-confirm").dialog("option","itemID",a);jQuery("#dialog-confirm").dialog("open");jQuery("#edittitle").attr("value",itemTitle);jQuery("#editlink").attr("value",itemURL);jQuery("#editanchortitle").attr("value",itemAnchorTitle);jQuery("#editnewwindow option[value='"+itemNewWindow+"']").attr("selected","selected");jQuery("#editdescription").attr("value",itemDesc)}function updatepostdata(){var a=0;jQuery("#custom-nav").find("li").each(function(c){c=c+1;var b=jQuery(this).attr("value");jQuery(this).find("#position"+b).attr("value",c);jQuery(this).attr("id","menu-"+c);jQuery(this).attr("value",c);jQuery(this).find("#dbid"+b).attr("name","dbid"+c);jQuery(this).find("#dbid"+b).attr("id","dbid"+c);jQuery(this).find("#postmenu"+b).attr("name","postmenu"+c);jQuery(this).find("#postmenu"+b).attr("id","postmenu"+c);var d=jQuery(this).find("#parent"+b).parent().parent().parent().attr("value");jQuery(this).find("#parent"+b).attr("name","parent"+c);jQuery(this).find("#parent"+b).attr("id","parent"+c);if(d){}else{d=0}jQuery(this).find("#parent"+b).attr("value",d);jQuery(this).find("#title"+b).attr("name","title"+c);jQuery(this).find("#title"+b).attr("id","title"+c);jQuery(this).find("#linkurl"+b).attr("name","linkurl"+c);jQuery(this).find("#linkurl"+b).attr("id","linkurl"+c);jQuery(this).find("#description"+b).attr("name","description"+c);jQuery(this).find("#description"+b).attr("id","description"+c);jQuery(this).find("#icon"+b).attr("name","icon"+c);jQuery(this).find("#icon"+b).attr("id","icon"+c);jQuery(this).find("#position"+b).attr("name","position"+c);jQuery(this).find("#position"+b).attr("id","position"+c);jQuery(this).find("#linktype"+b).attr("name","linktype"+c);jQuery(this).find("#linktype"+b).attr("id","linktype"+c);jQuery(this).find("#anchortitle"+b).attr("name","anchortitle"+c);jQuery(this).find("#anchortitle"+b).attr("id","anchortitle"+c);jQuery(this).find("#newwindow"+b).attr("name","newwindow"+c);jQuery(this).find("#newwindow"+b).attr("id","newwindow"+c);jQuery(this).find("dl > dt > span > #remove"+b).attr("value",c);jQuery(this).find("dl > dt > span > #remove"+b).attr("onClick","removeitem("+c+")");jQuery(this).find("dl > dt > span > #remove"+b).attr("id","remove"+c);jQuery("#licount").attr("value",c)})}function appendToList(b,s,d,n,h,l,e){var k="";var c="";var r="";var o="";var i="";var a="";if(s=="Custom"){k=document.getElementById("custom_menu_item_name").value;c=document.getElementById("custom_menu_item_url").value;r="";o="";inputlinktype="custom";i=document.getElementById("custom_menu_item_description").value}else{if(s=="Page"){k=htmlentities(d.toString());c=n.toString();r=h.toString();o="0";inputlinktype="page";i=htmlentities(e.toString())}else{if(s=="Category"){k=htmlentities(d.toString());c=n.toString();r=h.toString();o="0";inputlinktype="category";i=htmlentities(e.toString())}else{k="";k="";r="";o="";inputlinktype="custom";i=""}}}var g=document.getElementById("custom-nav").getElementsByTagName("li").length;var p=g;var m=0;try{var q=document.getElementById("menu-"+p.toString()).value}catch(f){m=1}while(m==0){p=p+1;try{var j=document.getElementById("menu-"+p.toString()).value}catch(f){m=1}}jQuery(".maintitle").after('<div id="message" class="updated fade below-h2"><p>Menu Item added!</p></div>');jQuery("#message").animate({opacity:1},2000).fadeOut(300,function(){jQuery(this).remove()});jQuery("#custom-nav").append('<li id="menu-'+p+'" value="'+p+'"><div class="dropzone ui-droppable"></div><dl class="ui-droppable"><dt><span class="title">'+k+'</span><span class="controls"><span class="type">'+s+'</span><a id="edit'+p+'" onclick="edititem('+p+')" value="'+p+'"><img class="edit" alt="Edit Menu Item" title="Edit Menu Item" src="'+b+'/wp-admin/images/ico-edit.png" /></a> <a id="remove'+p+'" onclick="removeitem('+p+')" value="'+p+'"><img class="remove" alt="Remove from Custom Menu" title="Remove from Custom Menu" src="'+b+'/wp-admin/images/ico-close.png" /></a> <a href="'+c+'" target="_blank"><img alt="View Custom Link" title="View Custom Link" src="'+b+'/wp-admin/images/ico-viewpage.png" /></a></span></dt></dl><a class="hide" href="'+c+'">'+k+'</a><input type="hidden" name="postmenu'+p+'" id="postmenu'+p+'" value="'+r+'" /><input type="hidden" name="parent'+p+'" id="parent'+p+'" value="'+o+'" /><input type="hidden" name="title'+p+'" id="title'+p+'" value="'+k+'" /><input type="hidden" name="linkurl'+p+'" id="linkurl'+p+'" value="'+c+'" /><input type="hidden" name="description'+p+'" id="description'+p+'" value="'+i+'" /><input type="hidden" name="icon'+p+'" id="icon'+p+'" value="'+a+'" /><input type="hidden" name="position'+p+'" id="position'+p+'" value="'+p+'" /><input type="hidden" name="linktype'+p+'" id="linktype'+p+'" value="'+inputlinktype+'" /><input type="hidden" name="anchortitle'+p+'" id="anchortitle'+p+'" value="'+k+'" /><input type="hidden" name="newwindow'+p+'" id="newwindow'+p+'" value="0" /></li>');jQuery("#menu-"+p+"").draggable({handle:" > dl",opacity:0.8,addClasses:false,helper:"clone",zIndex:100});jQuery("#menu-"+p+" dl, #menu-"+p+" .dropzone").droppable({accept:"#"+p+", #custom-nav li",tolerance:"pointer",drop:function(x,w){var t=jQuery(this).parent();var y=!jQuery(this).hasClass("dropzone");if(y&&t.children("ul").length==0){t.append("<ul/>")}if(y){t.children("ul").append(w.draggable)}else{t.before(w.draggable)}t.find("dl,.dropzone").css({backgroundColor:"",borderColor:""});var v=w.draggable.attr("value");var u=t.attr("value");t.find("#menu-"+v).find("#parent"+v).val(u);jQuery(this).parent().find("dt").removeAttr("style");jQuery(this).parent().find("div:first").removeAttr("style")},over:function(){if(jQuery(this).attr("class")=="dropzone ui-droppable"){jQuery(this).parent().find("div:first").css("background","none").css("height","50px")}else{if(jQuery(this).attr("class")=="ui-droppable"){jQuery(this).parent().find("dt:first").css("background","#d8d8d8")}else{}}var t=jQuery(this).parent().attr("id")},out:function(){jQuery(this).parent().find("dt").removeAttr("style");jQuery(this).parent().find("div:first").removeAttr("style");jQuery(this).filter(".dropzone").css({borderColor:""})}});updatepostdata()};
Index: /trunk/wp-includes/custom-navigation.php
===================================================================
--- /trunk/wp-includes/custom-navigation.php	(revision 13265)
+++ /trunk/wp-includes/custom-navigation.php	(revision 13266)
@@ -14,12 +14,12 @@
 	$menu_items = array();
 	if ( !empty( $menu_objects ) && !empty( $key ) ) {
-		$args = array( 'orderby' => 'menu_order', 'post_type' => 'menu_item', 'post_status' => 'menu-category,menu-page,menu-custom' );
+		$args = array( 'orderby' => 'menu_order', 'post_type' => 'menu_item', 'post_status' => 'publish' );
 		if ( count( $menu_objects ) > 1 )
 			$args['include'] = implode( ',', $menu_objects );
 		else
 			$args['include'] = $menu_objects[0];
-		$posts = new WP_Query( $args );
-		if ( ! empty( $posts->posts ) ) {
-			foreach( $posts->posts as $post ) {
+		$posts = get_posts( $args );
+		if ( ! empty( $posts ) ) {
+			foreach ( $posts as $post ) {
 				$menu_items[ $post->$key ] = $post;
 			}
@@ -30,4 +30,5 @@
 	return $menu_items;
 }
+
 function wp_custom_navigation_setup($override = false) {
 	
Index: /trunk/wp-includes/script-loader.php
===================================================================
--- /trunk/wp-includes/script-loader.php	(revision 13265)
+++ /trunk/wp-includes/script-loader.php	(revision 13266)
@@ -404,7 +404,7 @@
 	$scripts->add_data( 'custom-navigation-ui-custom', 'group', 1 );
 	
-	$scripts->add( 'custom-navigation-default-items', '/wp-admin/js/custom-navigation-default-items.js', false, '1.0.0' );
-	$scripts->add( 'custom-navigation-dynamic-functions', '/wp-admin/js/custom-navigation-dynamic-functions.js', false, '1.0.0' );
-	$scripts->add( 'custom-navigation-php-functions', '/wp-admin/js/custom-navigation-php-functions.js', false, '1.0.0' );
+	$scripts->add( 'custom-navigation-default-items', "/wp-admin/js/custom-navigation-default-items$suffix.js", false, '20100220' );
+	$scripts->add( 'custom-navigation-dynamic-functions', "/wp-admin/js/custom-navigation-dynamic-functions$suffix.js", false, '20100220' );
+	$scripts->add( 'custom-navigation-php-functions', "/wp-admin/js/custom-navigation-php-functions$suffix.js", false, '20100220' );
 	
 }
