$(function(){
  h = 0;
  $('.flat').each(function(){
    h = Math.max( $(this).height(), h );
  });
  $('.flat').height(h);
});