They people in this thread used a jQuery pluging to highlight the search string.
var words = "keyword1,keyword2,keyword3";
var keywords = words.split(',');
for(var i = 0; i < keywords.length; i++) {
$(selector).highlight($.trim(keywords[i]));
}
Is that something you could implement in your code as well?