$(document).ready(function() { 
	var validator = $("#theform").validate({ // validate form on keyup and submit
		rules: { 'id[2]': 'required' },
		messages: { 'id[2]': 'You have to choose a color.' },
		errorPlacement: function(error, element) { // the errorPlacement takes layout into account
			if ( element.is(":radio") )
				error.appendTo( element.parent().next().next().next().next() );
			else
				error.appendTo( element.parent().next() );
		},
//		success: function(label) { // set this class to error-labels to indicate valid fields
//			label.html("&nbsp;").addClass("checked"); // set &nbsp; as text for IE
//		}
		success: function(label) { $('.rerror').hide(); }
	});
});