$(function(){
	var sets = [], temp = [];
	$('ul.image-list > li').each(function(i) {
		temp.push(this);
		if (i % 5 == 4) {
			sets.push(temp);
			temp = [];
		}
	});
	if (temp.length) sets.push(temp);
	$.each(sets, function() {
	    $(this).flatHeights();
	});
});
