/*
 * jQuery 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
 */
jQuery.fn.zebra = function(options){
    
	var options = jQuery.extend({
		onMouseMove: 'class-hover', 
        onMouseOut:  'class-default',
        onSelected:  'class-selected'
	}, options);
	
	return this.each(function() {
		jQuery(this).find('tr')
		            .addClass(options.onMouseOut)
		            .hover(
		                function () {		
		                    if (!jQuery(this).hasClass(options.onSelected)) {
                                jQuery(this).removeClass(options.onMouseOut)
                                jQuery(this).addClass(options.onMouseMove)
		                    }                		                   
		                }, 
                        function () {
                            if (!jQuery(this).hasClass(options.onSelected)) {
                                jQuery(this).removeClass(options.onMouseMove)
                                jQuery(this).addClass(options.onMouseOut)
                            }
                        }
		            );		        
	});

};