(function($) {
    $.fn.jQhighlight = function(options) {
		var defaults = {
			classRow: "",
			classHover: "",
			classSelected: ""
		};
		var opts = $.extend(defaults, options);
		$(this).find('tr').mouseover(function() {
			if($(this).hasClass(''+opts.classRow+'')) $(this).addClass(''+opts.classHover+'');  
		}).mouseout(function() {
			$(this).removeClass(''+opts.classHover+'');  
		}).click(function() {
			if($(this).hasClass(''+opts.classSelected+'')) {
				$(this).removeClass(''+opts.classSelected+'');  
			}
			else {
				$(this).addClass(''+opts.classSelected+'');  
			}
		});
	};
})(jQuery); 
