$(document).ready(function() {

		// "полосатые" элементы
		$('.jscss-striped').children().each(function() {
				var t = $(this)
					 index = t.index() + 1, // т.к. четность/нечетность 
													// определяется с единицы,
													// а не с нуля
					 mod = index - 2 * Math.floor(index/2);
				
				if (mod == 1)
					t.addClass('odd');
		});
		
		
		// наборы элементов с зависимой друг от друга высотой
		// (строки псевдотаблицы)
		$('.jscss-liquid-height-container').each(function() {
			var root = $(this),
				 subjects = root.find('.jscss-liquid-height-seed'),
				 number = 0,
				 per_line,
				 heights = [],
				 i,
				 j,
				 index, 
				 current,
				 liquid,
				 H,
				 delta;
				 
			if (!subjects.length)
				return false;
			
			per_line = Math.round(root.width() / root.children().eq(0).outerWidth(true) );
			  // странно, что ширина родительского элемента может быть меньше,
			  // чем ширина дочерних плюс их margin'ы, 
			  // но, похоже, так и есть, поэтому вместо floor используется round
			
			subjects.each(function() {
					
				var t = $(this),
					 index = number,
					 line = Math.floor(index/per_line),
					 h;
					 
				h = t.parent().height();
				
				if (!heights[line])
					heights.push(0);
					
				if (h > heights[line]) 
					heights[line] = h;
				
				number++;
			});
			
			for (line = 0; line < heights.length; line++) {
				for(cell = 0; cell < per_line; cell++) {
					index = line * per_line + cell;
					if (! (liquid = subjects.eq(index) ) )
						break;
					
					H = heights[line];
					container = liquid.parent();
					container.children().not(liquid).each(function() {
							H -= $(this).outerHeight(true);
					});
					
					delta = H - liquid.outerHeight(true);
					liquid.height(liquid.height() + delta);
				}
			}
		});
		
});

