
jQuery.fn.dynamicFontSize = function()
{
    return this.each(function()
    {
    	$div = $(this).height();
    	$span = $(this).children.height();
    	
/*
    	alert('div height: '+$div);
    	alert('span height: '+$span);
*/
    	
    	if ($span>$div)
    	{	
    		var currentFontSize = $(this).css('font-size');
/*     		alert(currentFontSize); */
		    var currentFontSizeNum = parseFloat(currentFontSize, 10);
/* 		    alert(currentFontSizeNum); */
		    var newFontSize = currentFontSizeNum-5+'!important';
/* 		    alert(newFontSize); */
		    $(this).css('font-size', newFontSize);
		    $(this).css('line-height', newFontSize);
		    
		    return false;
    	}
    });
};


