/* 调用方法
    <script>
        $(function () {
            $(document).HighLight({ key: "达奇", color: "#ff0000" });
        });
    </script>
*/(function ($) {
    $.fn.extend({
        HighLight: function (options) {
            var defaults = {
                key: "达奇",
                color: "#ff0000"
            };
            var options = $.extend(defaults, options);
            var key;
            var pattern;
            pattern = new RegExp(options.key, "g");
            document.body.innerHTML = document.body.innerHTML.replace(pattern, options.key.fontcolor(options.color));
            return this;
        }
    });
})(jQuery);