var cmsTruncate = function (obj, limit){
	$("."+obj+" a:not(':has(font,strong)')").each(function(){//无样式的链接
		$(this).text(strLimit($(this).text(),limit));
		});
	$("."+obj+" a font:not(':has(strong)')").each(function(){//加红的链接
		$(this).text(strLimit($(this).text(),limit));
		});
	$("."+obj+" a font strong").each(function(){//加红加粗的链接
		$(this).text(strLimit($(this).text(),limit));
		});
	$("."+obj+" a strong").each(function(){//加粗的链接
		$(this).text(strLimit($(this).text(),limit));
		});	
	};
var strLimit = function (str, limit) {
	var temp, i;
	temp = str.split('');
	if (temp.length > limit) {
		for (i = temp.length - 1; i > -1; --i) {
			if (i > limit) {
				temp.length = i;
			}
			else if (' ' === temp[i]) {
				temp.length = i;
				break;
			}
		}
		temp.push('...');
	}
	return temp.join('');//组合起来，不然被切成一块块的- -!
};
$(function(){
		cmsTruncate("con_high_light",29);
		cmsTruncate("news_list",39);
		cmsTruncate("con_player_story",33);
		
		cmsTruncate("con_feature",33);
		cmsTruncate("info_table",49);
		
		
	
})
