(function($)
{
	$.fn.CreateAutoSelect = function()
	{
		
	//  =============
	//  Global Object
		var global =
		{
			// Input box object
			inputBox: $(this)
		};
		
	//  =================
	//  Initiate Function
		var jQueryAutoSelect = function()
		{
			// Assign the default value of the input box to a variable
			var defaultSearchString = global.inputBox.attr('value');
			
			// When the input box is clicked
			global.inputBox.click(function()
			{
				// If the input box value is the default string
				// The input box is cleared allowing for direct input
				// Otherwise the value of the input box is selected
				(global.inputBox.attr('value') == defaultSearchString) ? global.inputBox.attr('value', '') : global.inputBox.select();
			
			// When the input box loses its focus
			}).blur(function()
			{
				// If the input box value is blank when it loses focus
				// Reset the value to the default string
				if (global.inputBox.attr('value') == '') { global.inputBox.attr('value', defaultSearchString); }
			});
		};
		
		// Initiate the auto selecting/clearing
		jQueryAutoSelect();
	};
})(jQuery);
