jQuery.fn.highlight=function(c,a){if(a==undefined){a=""}function b(g,l,e){var n=0;if(g.nodeType==3){var m=g.data.toUpperCase().search(new RegExp("\\b"+l+"\\b","i"));if(m>=0){var k=document.createElement("span");k.className="highlight "+a;var h=g.splitText(m);var d=h.splitText(l.length);var f=h.cloneNode(true);k.appendChild(f);h.parentNode.replaceChild(k,h);n=1}}else{if(g.nodeType==1&&g.childNodes&&!/(script|style)/i.test(g.tagName)){for(var j=0;j<g.childNodes.length;++j){j+=b(g.childNodes[j],l)}}}return n}return this.each(function(){b(this,c.toUpperCase(),a)})};jQuery.fn.removeHighlight=function(){return this.find("span.highlight").each(function(){this.parentNode.firstChild.nodeName;with(this.parentNode){replaceChild(this.firstChild,this);normalize()}}).end()};
