# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: C:\Users\Gary\Documents\NetBeansProjects\WordPress\trunk\wp-admin\js
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: common.dev.js
--- common.dev.js Base (BASE)
+++ common.dev.js Locally Modified (Based On LOCAL)
@@ -3,9 +3,10 @@
 // sidebar admin menu
 adminMenu = {
 	init : function() {
-		var menu = $('#adminmenu');
+		var menu = $('#adminmenu'),
+          body = $('body');
 
-		$('.wp-menu-toggle', menu).each( function() {
+		menu.find('.wp-menu-toggle').each( function() {
 			var t = $(this), sub = t.siblings('.wp-submenu');
 			if ( sub.length )
 				t.click(function(){ adminMenu.toggle( sub ); });
@@ -15,8 +16,8 @@
 
 		this.favorites();
 
-		$('.separator', menu).click(function(){
-			if ( $('body').hasClass('folded') ) {
+		menu.find('.separator').click(function(){
+			if ( body.hasClass('folded') ) {
 				adminMenu.fold(1);
 				deleteUserSetting( 'mfold' );
 			} else {
@@ -26,14 +27,14 @@
 			return false;
 		});
 
-		if ( $('body').hasClass('folded') )
+		if ( body.hasClass('folded') )
 			this.fold();
 
 		this.restoreMenuState();
 	},
 
 	restoreMenuState : function() {
-		$('li.wp-has-submenu', '#adminmenu').each(function(i, e) {
+		$('#adminmenu').find('li.wp-has-submenu').each(function(i, e) {
 			var v = getUserSetting( 'm'+i );
 			if ( $(e).hasClass('wp-has-current-submenu') )
 				return true; // leave the current parent open
@@ -51,7 +52,7 @@
 		}).parent().toggleClass( 'wp-menu-open' ).attr('id');
 
 		if ( id ) {
-			$('li.wp-has-submenu', '#adminmenu').each(function(i, e) {
+			$('#adminmenu').find('li.wp-has-submenu').each(function(i, e) {
 				if ( id == e.id ) {
 				    var v = $(e).hasClass('wp-menu-open') ? 'o' : 'c';
 				    setUserSetting( 'm'+i, v );
@@ -63,12 +64,13 @@
 	},
 
 	fold : function(off) {
+      var wpHasSubmenu = $('#adminmenu').find('li.wp-has-submenu');
 		if (off) {
 			$('body').removeClass('folded');
-			$('#adminmenu li.wp-has-submenu').unbind();
+			wpHasSubmenu.unbind();
 		} else {
 			$('body').addClass('folded');
-			$('#adminmenu li.wp-has-submenu').hoverIntent({
+			wpHasSubmenu.hoverIntent({
 				over: function(e){
 					var m, b, h, o, f;
 					m = $(this).find('.wp-submenu');
@@ -96,21 +98,24 @@
 	},
 
 	favorites : function() {
-		$('#favorite-inside').width( $('#favorite-actions').width() - 4 );
-		$('#favorite-toggle, #favorite-inside').bind('mouseenter', function() {
-			$('#favorite-inside').removeClass('slideUp').addClass('slideDown');
+      var favoriteFirst = $('#favorite-first'),
+          favoriteInside = $('#favorite-inside');
+          
+		favoriteInside.width( $('#favorite-actions').width() - 4 );
+		$('#favorite-toggle').add(favoriteInside).bind('mouseenter', function() {
+			favoriteInside.removeClass('slideUp').addClass('slideDown');
 			setTimeout(function() {
-				if ( $('#favorite-inside').hasClass('slideDown') ) {
-					$('#favorite-inside').slideDown(100);
-					$('#favorite-first').addClass('slide-down');
+				if ( favoriteInside.hasClass('slideDown') ) {
+					favoriteInside.slideDown(100);
+					favoriteFirst.addClass('slide-down');
 				}
 			}, 200);
 		}).bind('mouseleave', function() {
-			$('#favorite-inside').removeClass('slideDown').addClass('slideUp');
+			favoriteInside.removeClass('slideDown').addClass('slideUp');
 			setTimeout(function() {
-				if ( $('#favorite-inside').hasClass('slideUp') ) {
-					$('#favorite-inside').slideUp(100, function() {
-						$('#favorite-first').removeClass('slide-down');
+				if ( favoriteInside.hasClass('slideUp') ) {
+					favoriteInside.slideUp(100, function() {
+						favoriteFirst.removeClass('slide-down');
 					});
 				}
 			}, 300);
@@ -202,24 +207,30 @@
 };
 
 jQuery(document).ready( function($) {
-	var lastClicked = false, checks, first, last, checked, bgx = ( isRtl ? 'left' : 'right' );
+	var lastClicked = false, checks, first, last, checked, bgx = ( isRtl ? 'left' : 'right' ),
+       helpLink = $('#contextual-help-link'),
+       helpLinkWrap = $('#contextual-help-link-wrap'),
+       helpWrap = $('#contextual-help-wrap'),
+       screenOptionsLinkWrap = $('#screen-options-link-wrap'),
+       screenOptionsWrap = $('#screen-options-wrap'),
+       showSettingsLink = $('#show-settings-link');
 
 	// Move .updated and .error alert boxes. Don't move boxes designed to be inline.
 	$('div.wrap h2:first').nextAll('div.updated, div.error').addClass('below-h2');
 	$('div.updated, div.error').not('.below-h2, .inline').insertAfter( $('div.wrap h2:first') );
 
 	// screen settings tab
-	$('#show-settings-link').click(function () {
-		if ( ! $('#screen-options-wrap').hasClass('screen-options-open') )
-			$('#contextual-help-link-wrap').css('visibility', 'hidden');
+	showSettingsLink.click(function () {
+		if ( ! screenOptionsWrap.hasClass('screen-options-open') )
+			helpLinkWrap.css('visibility', 'hidden');
 
-		$('#screen-options-wrap').slideToggle('fast', function(){
+		screenOptionsWrap.slideToggle('fast', function(){
 			if ( $(this).hasClass('screen-options-open') ) {
-				$('#show-settings-link').css({'backgroundPosition':'top '+bgx});
-				$('#contextual-help-link-wrap').css('visibility', '');
+				showSettingsLink.css({'backgroundPosition':'top '+bgx});
+				helpLinkWrap.css('visibility', '');
 				$(this).removeClass('screen-options-open');
 			} else {
-				$('#show-settings-link').css({'backgroundPosition':'bottom '+bgx});
+				showSettingsLink.css({'backgroundPosition':'bottom '+bgx});
 				$(this).addClass('screen-options-open');
 			}
 		});
@@ -227,17 +238,18 @@
 	});
 
 	// help tab
-	$('#contextual-help-link').click(function () {
-		if ( ! $('#contextual-help-wrap').hasClass('contextual-help-open') )
-			$('#screen-options-link-wrap').css('visibility', 'hidden');
 
-		$('#contextual-help-wrap').slideToggle('fast', function() {
+	helpLink.click(function () {
+		if ( ! helpWrap.hasClass('contextual-help-open') )
+			screenOptionsLinkWrap.css('visibility', 'hidden');
+
+		helpWrap.slideToggle('fast', function() {
 			if ( $(this).hasClass('contextual-help-open') ) {
-				$('#contextual-help-link').css({'backgroundPosition':'top '+bgx});
-				$('#screen-options-link-wrap').css('visibility', '');
+				helpLink.css({'backgroundPosition':'top '+bgx});
+				screenOptionsLinkWrap.css('visibility', '');
 				$(this).removeClass('contextual-help-open');
 			} else {
-				$('#contextual-help-link').css({'backgroundPosition':'bottom '+bgx});
+				helpLink.css({'backgroundPosition':'bottom '+bgx});
 				$(this).addClass('contextual-help-open');
 			}
 		});
@@ -326,9 +338,7 @@
 			e.stopPropagation();
 		if ( e.preventDefault )
 			e.preventDefault();
-	});
-
-	$('#newcontent').blur(function(e) {
+	}).blur(function(e) {
 		if ( this.lastKey && 9 == this.lastKey )
 			this.focus();
 	});
