/**
 * Friction TV - friction.js
 *
 * friction js
 * 
 * @author						Brent McDowell brent@nuguru.com
 * @version						v0.1
 * @todo						???
 * 
 */

$(document).ready(function() {

	AutoFill($("#username"), "username");
	AutoFill($("#password"), "password");
	AutoFill($("#q"), "Search");

});

/**
 * Friction TV - friction.js - AutoFill()
 * 
 * for those nice pre-filled text fields
 * 
 * @author						Brent McDowell brent@nuguru.com
 * @version						v0.1
 * @todo						???
 * 
 * @param	int					id
 * @param	string				value
 * 
 */

function AutoFill(id, value)
{

	$(id).css({ color: "#b2adad" }).attr({ value: value }).focus(function()
	{
		
		if($(this).val()==value)
		{
		
			$(this).val("").css({ color: "#333" });
		
		}
	
	}).blur(function()
	{
		if($(this).val()=="")
		{
		
			$(this).css({ color: "#b2adad" }).val(value);
		
		}
	
	});

}