jQuery.fn.zebra = function(options){
    
	// настройки по умолчанию
	var options = jQuery.extend({
		bgEven: '#eeeeee', // бэкграунд для четных строк
        bgOdd: 'white', // бэкграунд для нечетных строк
        bgHover: '#e4eff7'
	},options);
	
	return this.each(function() {

		jQuery(this).find('tr:even')
		            .css('background-color', options.bgEven)
		            .hover(
		                function () {
		                	jQuery(this).css('background-color', options.bgHover)
		                }, 
                        function () {
                        	jQuery(this).css('background-color', options.bgEven)
                        }
		            );
		
        jQuery(this).find('tr:odd')
                    .css('background-color', options.bgOdd)
                    .hover(
                        function () {
                        	jQuery(this).css('background-color', options.bgHover)
                        }, 
                        function () {
                        	jQuery(this).css('background-color', options.bgOdd)
                        }
                    );
        
	});

};
$(document).ready(function () {
		$("table").zebra();
});
