// written by brandon burkett
// version 2.0

// form structure
var blendInputFX = 
{
	originalBG: '#FFFFFF',
	activeBG: '#2f3706',
	
	originalFont: '#627900',
	activeFont: '#FFFFFF',
	

	highlight: function(jqElem)
	{
		// set inactive elem to org color
		$('input:text').css('backgroundColor', blendInputFX.originalBG).css('color', blendInputFX.originalFont);
		$('input:password').css('backgroundColor', blendInputFX.originalBG).css('color', blendInputFX.originalFont)
		$('textarea').css('backgroundColor', blendInputFX.originalBG).css('color', blendInputFX.originalFont)
		$('select').css('backgroundColor', blendInputFX.originalBG).css('color', blendInputFX.originalFont)

		// set active elem color
		$(jqElem).css('backgroundColor',blendInputFX.activeBG).css('color',blendInputFX.activeFont);
	},
	
	// initalizer function
	init: function()
	{		
		// get all inputs
		$('input:file').bind('focus', function() { blendInputFX.highlight($(this)); });
		$('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(); });

