(function ($) {
    $.fn.miniature = function (options) {
        var defaults = {
            color: null,
            float: null,
            fontSize: null
        };

        return this.each(function () {
            var html = $("<div />");

            $.each($(this).get(0).childNodes, function (i, o) {

                if (o.nodeType == 1) { //text node

                    var text = $.trim($(o).text());

                    if (text.length > 0) {
                        var first = "<span class='jquery-miniature jquery-miniature-" + text.charAt(0).toLowerCase() + "'>" + text.charAt(0) + "</span>";
                        html.append(first + text.substr(1));
                    }
                }
                else
                    html.append($(o).clone());
            });
            $(this).html(html.html());
        });
    };
})(jQuery);
