(function($){$.fn.extend({highlight:function(h){function findText(a,b){if(a.nodeType==3)return searchText(a,b);else if(a.nodeType==1&&a.childNodes&&!(/(script|style)/i.test(a.tagName))){for(var i=0;i<a.childNodes.length;++i){i+=findText(a.childNodes[i],b)}}return 0}function searchText(a,b){var c=a.data.toUpperCase().indexOf(b);if(c>=0)return highlight(a,c,b);else return 0}function highlight(a,b,c){var d=document.createElement('font');d.className='highlight';var e=a.splitText(b);var f=e.splitText(c.length);var g=e.cloneNode(true);d.appendChild(g);e.parentNode.replaceChild(d,e);return 1}return this.each(function(){if(typeof h=='string')findText(this,h.toUpperCase());else for(var i=0;i<h.length;++i)findText(this,h[i].toUpperCase())})}})})(jQuery);
