window.onload = function(){

	//flatHeights設定
	var sets = [], temp = [];
	$('#itemList .itemBoxInner > a').each(function(i) {
		temp.push(this);
		if (i % 5 == 4) {
			sets.push(temp);
			temp = [];
		}
	});
	if (temp.length) sets.push(temp);
	
	$('.picItemInner > p.txt').flatHeights();

	/* 各組ごとに高さ揃え */
	$.each(sets, function() {
		$(this).flatHeights();
	});
	
	
	$('.itemBoxInner').hover(function(){
		$(this).addClass('over')
			.css('cursor','pointer')
			.click(function(){
				window.location.href = $('a',this).attr('href');
			});												   
	},function(){
		$(this).removeClass('over');
	});
	
	$('.picItem').hover(function(){
		$(this).addClass('over')
			.css('cursor','pointer')
			.click(function(){
				window.location.href = $('a',this).attr('href');
			});												   
	},function(){
		$(this).removeClass('over');
	});
}
	
