(function($) {
	$.fn.uppercase = function(options) {
		return this.each(function() {
			$element = $(this);
	        $element.keyup(function() {
	            var str = $(this).val();
	            $(this).val(str.toUpperCase());
	        });
	    });
	};
	
	$.fn.lowercase = function(options) {
		return this.each(function() {
			$element = $(this);
	        $element.keyup(function() {
	            var str = $(this).val();
	            $(this).val(str.toLowerCase());
	        });
	    });
	};
	
	$.fn.ucfirst = function(options) {
		return this.each(function() {
			$element = $(this);
	        $element.keyup(function(){
	            var str = $(this).val();
	            var resStr = '';
	            var isUpper = true;
	            var i;
	            for (i in str) {
	            	if (isUpper) {
	            		resStr = resStr+str.charAt(i).toUpperCase(); 
						isUpper = false;           	
	            	} else {
	            		resStr = resStr+str.charAt(i).toLowerCase();           	
	            	}
	            	if (str.charAt(i) == ' ') {
						isUpper = true;           	
	            	}
	            }
	            $(this).val(resStr);
	        });
	    });
	};
})(jQuery);