//jFontSizer - written by Jack Franklin (www.jackfranklin.co.uk) (jack [at] jackfranklin.co.uk) March 1st 2009. 
//VERSION 1.1 Released 3rd March 2009, with help from Larry Battle at blarry [at] bateru.com
//Released under the MIT License which you can find out more about here: http://en.wikipedia.org/wiki/MIT_License
//In short it means you may use, change, edit or distribute the code as you please but please leave these comments as they are. 

(function($) {
    $.fn.jFontSizer = function( userOptions ){
        options = $.extend({
			size: 10,
			sizemethod: "val", // /*can be: "+val", "pc",, "-pc", "val", "-val"*/
			type: "px" //can be "px", "em" (ONLY VALID FOR THE VAL METHOD)
		}, userOptions );
        return this.each(function(){
            var cursize = $(this).css($.browser.msie?"fontSize":"font-size");
            var change = options.size;
            var newSize = parseInt(cursize, 10);
            switch (options.sizemethod){
	            case "+val":
	                newSize += change;
	                break;
	            case "-val":
	                newSize -= change;
	                break;
	            case "pc":
	                change = 1 + (change / 100);
	                newSize *= change;
	                break;
	            case "-pc":
	                change = 1 - (change / 100);
	                newSize *= change;
	                break;
	            default:
	            	newSize = change;
            }
            $(this).css($.browser.msie?"fontSize":"font-size", newSize<0?0:newSize + options.type);
        });
    };
})(jQuery);
