$(function(){
	
	var fChild = '#footerNav li ul:first';
	var lChild = '#local_nav li:last';
	var crImg = '.current img, .parent img';
	
	$(fChild).addClass('first-child');
	$(lChild).addClass('last-child');
	
	$(crImg).each(function(){
		var imgPath = $(this).attr('src');
		if(imgPath.match(/(.*)(\.jpg|\.gif|\.png)/)){
			var repPath = RegExp.$1+'_cr'+RegExp.$2;
			$(this).attr('src',repPath);
		}
	});
});


window.onload = function(){
	
	var flatSelf = ['#footerNav ul','.column1-1-1 .col'];
	
	$.each(flatSelf,function(i,selector){
		$(selector).flatHeights();
	});
	
	var sets = [], temp = [];
	$('div.column1-1 .col').each(function(i) {
		temp.push(this);
		if (i % 2 == 1) {
			sets.push(temp);
			temp = [];
		}
	});
	if (temp.length) sets.push(temp);

	/* 各組ごとに高さ揃え */
	$.each(sets, function() {
		$(this).flatHeights();
	});

}