[jQuery] Help badly in highlight text

[jQuery] Help badly in highlight text

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>Im trying to make a "highlight text from search"
script wich must load the "keyword" saves into a hidden field, but cant
make it work, i found some script in the web but dosnt adjust to what i need if
any1 can helpme what wrong here i apreciate.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I just modify it a little i know now is not working
but is that the idea.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>$(document).ready(function(){<BR>  var matches
= $("input#i_search_keywords").attr("value");</FONT></DIV>
<DIV><FONT face=Arial size=2>  if (!matches) return;</FONT></DIV>
<DIV><FONT face=Arial size=2>  matches = split(",", matches);<BR>  var
terms = unescape(matches[1].replace(/\+/g, ' '));<BR>  var re = new
RegExp().compile('(' + terms + ')', 'i');<BR>  $("body *").each(function()
{<BR>    if ($(this).children().size() > 0)
return;<BR>    if ($(this).is("xmp, pre"))
return;<BR>    var html = $(this).html();<BR>   
var newhtml = html.replace(re, '<span
class="qterm">$1</span>');<BR>   
$(this).html(newhtml);<BR>  });</FONT></DIV>
<DIV><FONT face=Arial size=2>});</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Example of hidden input </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><input type="hidden" value="new awesome game ,
awesome, game" id="i_search_keywords" name="i_search_keywords"/></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Sry for my english</FONT></DIV><!-- SPAMfighter Signature --></FONT></DIV></BODY></HTML>