/* ***********************************

	相模大野ステーションスクエア
	TOP SHOP NEWS
	2010.06.10
	要　jQuery1.4.2
	
************************************ */

jQuery.noConflict();
var j$ = jQuery;

// スクエアニュースの画像高さが低いときに上下中央揃え
/*
j$(function(){ 
	j$("#eventinfo div.info_img").each(function(){
		var setHeight = j$(this).innerHeight();
		if(setHeight < 55){
			var pHeight = Math.round((55 - setHeight)/2);
			j$(this).css({'padding-top': pHeight + 'px','padding-bottom':pHeight + 'px'});
		}
	});
})


// ショップ最新情報のサムネール画像が低いときに上下中央揃え

j$(function(){ 
	j$("#shopnews .news_img").each(function(){
		var setHeight = j$(this).innerHeight();
		if(setHeight < 41){
			var pHeight = Math.round((41 - setHeight)/2); //alert(pHeight + 'px');
			j$(this).css({'padding-top': pHeight + 'px','padding-bottom':pHeight + 'px'});
		}
	});
})
*/


// 各ニュースの左右ボックスの高さを揃える

j$(function(){
	j$('#shopnews > ul li:odd').each(function(index){
		var oBox = 	j$(this);									  
		var oH = oBox.innerHeight();
		var oI = j$('#shopnews > ul li').index(this);
		var eBox = j$('#shopnews > ul li:eq(' + (oI-1) +')');
		var eH = eBox.innerHeight();
		
		if(oH > eH){
			eBox.css('height',(oH-10) + 'px');
		}else if(eH > oH){
			oBox.css('height',(eH-10) + 'px');
		}
		
		oBox.after('<br class="clr" />');
		
	}); // each end
});



