$(function(){
	$('h5.resize').each(function(){
		var currFontSize = 1.4;
		while ($(this).height() > 17 && currFontSize > 0.9) {
			currFontSize -= 0.1; 
			$(">a", this).css({
				'fontSize': currFontSize+'em'
			});
		}
		if ($(this).height() < 17) {
			$(this).css({
				'height': '17px',
				'lineHeight': '17px'
			});
		}
		else if ($(this).height() > 17) {
			$(this).css({
				'height': '17px',
				'overflow': 'visible',
				'line-height': '8.5px'
			});
		}
	});
	
	$('h5.column_resize').each(function(){
		var currFontSize = 1.4;
		while (($(this).height() > 34 && currFontSize > 0.9) || $(this).height() > 40) {
			currFontSize -= 0.1; 
			$(">a", this).css({
				'fontSize': currFontSize+'em'
			});
		}
		if ($(this).height() > 34) {
			$(this).css({
				'height': '34px',
				'paddingBottom': '2px',
				'line-height': '11px'
			});
		}
	});
});

