

$(document).ready(function() { 
	col1 = $('.column:first')
	col2 = $('.column:eq(1)')

	numcolbreaks=col1.find('hr').length;
	arr=col1.find('hr').addClass('column-break');
	kids=col1.children();
	j=kids.length;
	columnnum=1;
	var column;
	for(i=0;i<j;i++){
		if (columnnum<=2){
			if (column){j--;i--;col1.children().eq(i).appendTo(column);}
			if (col1.children().eq(i).hasClass('column-break')){column=$('.column:eq('+columnnum+')');columnnum++;i++;j++;}
		}
	}
	col1.children().detach('.column-break');

	if (numcolbreaks==0){
		col1.children().last().appendTo(col2);
		h1 = col1.height();
		h2 = col2.height();

		while (h1>h2){
			col1.children().last().insertBefore(col2.children().first());
			h1 = col1.height();
			h2 = col2.height();
		}
		col2.children().first().appendTo(col1);
	}

});