$(function(){
	$(".form").form();
});

/**
 * Form用plugin.
 *
 * @author sano
 */
(function($){
	$.fn.form = function(options){
		var elements = $(this);

		var highlightInvalidate = function(form) {
			var elm = form.find("tr");
			elm.has(".error").find("th, td").addClass("error");
		}

		elements.each(function(){
			var elm = $(this);
			highlightInvalidate(elm);
		});
	};
})(jQuery);

