$(document).ready(function() {
	if($.browser.msie)
	if($.browser.version*1 <7){
		$('#feeds').css('width', '470px');
		$('#section #box .list').css('width', '470px');
		$('.news')
		.css('background', '#E4E0DA url(../common/img/box_bg_gray.jpg) bottom left repeat-x')
		.css('width', '470px')
		.css('display', 'block')
		.css('overflow', 'hidden')
		.css('margin', '15px 0px 0px -10px');
		
		$('.main')
		.css('width', '505px')
		.css('marginTop', '-10px');
		
		$('.main #detail #message .firstMsg')
		.css('width', '280px');
	}
	
	matchHeight('.news', '.main');
});


function callBack_matchHeight(){
	matchHeight(".about #section #box.main", ".about #section #box.news");
}

function evenUp(){
	if($(".index #section #box.main #detail").height() < $(".index #section #box.news").height()){
		$(".index #section #box.news").css("height", $(".index #section #box.news").height()-$(".index #section #box.main #header").height()-2);
	}
}

function matchHeight(div1, div2, afterMatch){
	var lft = $(div1);
	var rgh = $(div2);
	
	var lft_mrg_t = returnCSStoNo(lft.css("margin-top"));
	var lft_mrg_b = returnCSStoNo(lft.css("margin-bottom"));
	
	var rgh_mrg_t = returnCSStoNo(rgh.css("margin-top"));
	var rgh_mrg_b = returnCSStoNo(rgh.css("margin-bottom"));
	
	var hRef= Boolean(lft.height() > rgh.height())?lft.height():rgh.height();
	
	lft.css("height", hRef+lft_mrg_t+lft_mrg_b);
	rgh.css("height", hRef+rgh_mrg_t+rgh_mrg_b);
	
	if(Boolean(afterMatch)) afterMatch();
}

function returnCSStoNo(ele){
	var val = ele.substr(0, ele.length-2)*1;
	return val;
}
