/*
Form Effects Plugin
*/
jQuery.fn.enableEffects = function(){
	return this.each(function(){
		//find form elements
		$(this).find("input, select, textarea, password").focus(function(e){
		  	if ($(e.currentTarget).attr("type") == 'submit'){
			    //ignore
			}else{
			  	if ($(e.currentTarget).attr("type") == 'text' || $(e.currentTarget).attr("type") == 'password')
					$(e.currentTarget).addClass("input_focused");  
				$(e.currentTarget).closest("tr.formrow").find(".formlabel").addClass("formlabel_focused");
				$(e.currentTarget).closest("tr.formrow").find(".formcell").addClass("formcell_focused");
			}
		});
		$(this).find("input, select, textarea, password").blur(function(e){
		  	if ($(e.currentTarget).attr("type") == 'submit'){
			    //ignore
			}else{
			  	if ($(e.currentTarget).attr("type") == 'text' || $(e.currentTarget).attr("type") == 'password')		  
					$(e.currentTarget).removeClass("input_focused");  
				$(e.currentTarget).closest("tr.formrow").find(".formlabel").removeClass("formlabel_focused");
				$(e.currentTarget).closest("tr.formrow").find(".formcell").removeClass("formcell_focused");			
			}
		});
	});  
};
