/*
 * $ Zebra v1.0.0 - http://www.linkexchanger.su/
 *
 * Copyright (c) 2008 Gennady Samkov
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 */
$.fn.zebra = function(options){

	// настройки по умолчанию
	var options = $.extend({
		bgEven: '#fff', // бэкграунд для четных строк
        bgOdd: '#EAEAEA', // бэкграунд для нечетных строк
        bgHover: '#DFDFFF' // бэкграунд при hover
	},options);

	return this.each(function() {

		$(this).find(':not(.table-border)> tr:even')
		            .css('background-color', options.bgEven)
		            .hover(
		                function () {
		                	$(this).css('background-color', options.bgHover);
		                },
                        function () {
                        	$(this).css('background-color', options.bgEven);
                        }
		            );

        $(this).find(':not(.table-border) > tr:odd')
                    .css('background-color', options.bgOdd)
                    .hover(
                        function () {
                        	$(this).css('background-color', options.bgHover);
                        },
                        function () {
                        	$(this).css('background-color', options.bgOdd);
                        }
                    );

	});

};
