// JavaScript Document

$(function(){
/* タイトル
------------------------------------ */
	//要素を4つずつの組に分ける
	var ttlSets = [], ttlTemp = [];
	$('.columnLayout_04 .itemTtl a').each(function(i) {
		ttlTemp.push(this);
		if (i % 4 == 3) {
			ttlSets.push(ttlTemp);
			ttlTemp = [];
		}
	});
	if (ttlTemp.length) ttlSets.push(ttlTemp);

	//各組ごとに高さ揃え
	$.each(ttlSets, function() {
		$(this).flatHeights();
	});

/* ボックス
------------------------------------ */
	//要素を4つずつの組に分ける
	var boxSets = [], boxTemp = [];
	$('.columnLayout_04 .item').each(function(i) {
		boxTemp.push(this);
		if (i % 4 == 3) {
			boxSets.push(boxTemp);
			boxTemp = [];
		}
	});
	if (boxTemp.length) boxSets.push(boxTemp);

	//各組ごとに高さ揃え
	$.each(boxSets, function() {
		$(this).flatHeights();
	});

});
