function equalHeight(group) {
	tallest = 0;
	group.each(function() {
		thisHeight = $(this).height();
		if(thisHeight > tallest){
			tallest = thisHeight;
		}
	});
	group.height(tallest);
}

//TOPページバナーエリア
$(document).ready(function() {
	equalHeight($("#container-a div.item-inner"));
	equalHeight($("#container-a div.item"));
	equalHeight($("#container-b div.item-inner"));
	equalHeight($("#container-b div.item"));

	$('#promo-wrapper').load('/promo.php?promo=1&rnd=' + Math.random(),function() {
		equalHeight($("#promo div.col div.img"));
	});
	$('#promo-wrapper').fadeIn(500);

	$(document).everyTime(12000,'',function(){
		$('#promo-wrapper').fadeOut(1000, function() {
			$('#promo-wrapper').load('/promo.php?rnd=' + Math.random(),function() {
				equalHeight($("#promo div.col div.img"));
			});
			$('#promo-wrapper').fadeIn(1500);
		});
	});
});

