/** 
 * jQuery.defaultvalue 
 * @param	string	defaultvalue
*/
$.fn.defaultvalue = function( defVal )
{
	return this.each(function()
	{
		var $input = $(this);
		if($input.val() == "" || $input.val() == defVal)
		{
			$input.addClass("defaultvalue").val(defVal);
		}
		
		$input
			.focus(function() {
				if($input.val() == defVal) 
					$input.val("").removeClass("defaultvalue");
			})
			.blur(function(){
				if($input.val() == "") 
					$input.addClass("defaultvalue").val(defVal);
			});
	});
};

/**
 * jQuery.hoverClick
 */
$.fn.hoverClick = function( noHref )
{
	this.each(function()
	{
		if($("a:first", this).length)
		{
			$(this).hover(
				function() { $(this).addClass("hover").css("cursor", "pointer"); },
				function() { $(this).removeClass("hover").css("cursor", "pointer"); }
			);
			
			if(!noHref)
			{
				$(this).attr("title", $("a:first", this).attr("title"));
				
				$(this).click(function(){
					window.location = $("a:first", this).attr("href");
				});
			}
		}
	});
	
	return this;
};
