$(document).ready(function() {
	
$("form").bind("onFail", function(e, errors)  {
 
	// we are only doing stuff when the form is submitted
	if (e.originalEvent.type == 'submit') {
 
		// loop through Error objects and add the border color
		$.each(errors, function()  {
			var input = this.input;
			input.css({borderColor: 'red', backgroundColor:'#FEE0E1'}).focus(function()  {
				input.css({borderColor: '#444'});
			});
		});
	}
});
 
 
// get handle to the info box
$("form").validator();
 
 
});

