/**
 * @author Jay
 */
// 栏目属性“展开/收起”效果
function CompanyListCate(){
	$('#sb-co-list-columns').find('table tr').each(function(){
		var _p=$(this).find('p'),
			_td=$(this).find('td:first'),
			_btn=$(this).find('td.btnMore');
			//alert(_td.height());
		if(_td.height()>30){
			_p.height('30px').css({
				'overflow': 'hidden',
				'height':'30px'
			});
			_btn.html('<a href="javascript:void(0)">展开 +</a>');
		}else{
			_btn.html('');
		}
		
	});
	$('#sb-co-list-columns').find('table tr td.btnMore').find('a').click(function(){
		//alert($(this).parent().prev('td').height());
		var _p=$(this).parent().prev('td').find('p');
		if(_p.height()==30){
			_p.css({'height':'auto','overflow':''});
			$(this).text('收起 -');
		}else{
			_p.css({'height':'30px','overflow':'hidden'});
			$(this).text('展开 +');
		}
		//_par.find();
	});
}
// 产品属性“展开/收起”效果
function ProductListCate(){
	$('#proListCate').find('tr').each(function(){
		var _p=$(this).find('ul'),
			_td=$(this).find('td:first'),
			_btn=$(this).find('td.btnMore');
			//alert(_td.height());
		if(_p.height()>30){
			_p.height('30px').css({
				'overflow': 'hidden',
				'height':'30px'
			});
			_btn.html('<a href="javascript:void(0)">展开 +</a>');
		}else{
			_btn.html('');
		}
		
	});
	$('#proListCate').find('tr td.btnMore').find('a').click(function(){
		//alert($(this).parent().prev('td').height());
		var _p=$(this).parent().prev('td').find('ul');
		if(_p.height()==30){
			_p.css({'height':'auto','overflow':''});
			$(this).text('收起 -');
		}else{
			_p.css({'height':'30px','overflow':'hidden'});
			$(this).text('展开 +');
		}
		//_par.find();
	});
}
