/**
 * @author Mike Buckley
 * @url http://openhouseconcept.com/
 */
(function($){
    $.fn.cycleFontSize = function(options){    
        var defaults = {
            maxFontSize: "15px",
			originalFontSize: $('html').css('font-size')
        };
        var options = $.extend(defaults, options);
        
        var resetFontSize = function(){
            jQuery('html').css('font-size', options.originalFontSize);
            jQuery(options.increaseEle).css('font-size', options.originalFontSize);
        }
        
        return this.each(function(){
            jQuery(this).click(function(){
                var currentFontSize = jQuery('html').css('font-size');
                if (currentFontSize == options.maxFontSize) {
                    resetFontSize();
                }
                else {
                    var currentFontSizeNum = parseFloat(currentFontSize, 10);
                    var newFontSize = currentFontSizeNum + 2;
                    jQuery('html').css('font-size', newFontSize);
                    jQuery(options.increaseEle).css('font-size', newFontSize);
                }
                return false;
            });
        });
    };
})(jQuery);

