jQuery.fn.designTable = function(_options) {
	var _options = jQuery.extend({
		direction: 'verticaal',
		evenClass: 'tr-even',
		oddClass: 'tr-odd',
		children: 'each'
	}, _options);
	
	return $(this).each(function(){
		if (_options.direction == "verticaal")
		{
			$(this).find("tr").each(function(index){
				if (index % 2)
				{
					if (_options.children == "each")
						$(this).children().addClass(_options.evenClass);
					else
						$(this).children(_options.children).addClass(_options.evenClass);
				}
				else
				{
					if (_options.children == "each")
						$(this).children().addClass(_options.oddClass);
					else
						$(this).children(_options.children).addClass(_options.oddClass);
				}
			});
		}
		else if (_options.direction == "horizontaal")
		{
			$(this).find("tr").each(function(){
				if (_options.children == "each")
				{
					$(this).children().each(function(index){
						if (index % 2)
							$(this).addClass(_options.evenClass);
						else
							$(this).addClass(_options.oddClass);
					});
				}
				else
				{
					$(this).children(_options.children).each(function(index){
						if (index % 2)
							$(this).addClass(_options.evenClass);
						else
							$(this).addClass(_options.oddClass);
					});
				}
			});
		}
	});
}
