// written by brandon burkett
// version 2.0

// form structure
var blendInputFX = 
{
	originalBG: '#FFFFFF',
	activeBG: '#fffcf0',

	highlight: function(jqElem)
	{
		// set inactive elem to org color
		$('input:text').each( function () { $(this).css('backgroundColor', blendInputFX.originalBG); });
		$('input:password').each( function () { $(this).css('backgroundColor', blendInputFX.originalBG); });
		$('textarea').each( function () { $(this).css('backgroundColor', blendInputFX.originalBG); });
		$('select').each( function () { $(this).css('backgroundColor', blendInputFX.originalBG); });

		// set active elem color
		$(jqElem).css('backgroundColor',blendInputFX.activeBG);
	},
	
	// initalizer function
	init: function()
	{		
		// get all inputs
		$('input:text').bind('focus', function() { blendInputFX.highlight($(this)); });
		$('input:password').bind('focus', function() { blendInputFX.highlight($(this)); });
		$('textarea').bind('focus', function() { blendInputFX.highlight($(this)); });
		$('select').bind('focus', function() { blendInputFX.highlight($(this)); });
	}
}

// add to document after dom is loaded
$(document).ready(function() { blendInputFX.init(); });
