jQuery.fn.highlight = function (str, className)
{
    str = ReplaceAll(str,'%20',' ');
    
    
    
    return this.each(function ()
    {
        this.innerHTML = this.innerHTML.replace(
            new RegExp(str, "g"),
            "<span class=\"" + className + "\">" + str + "</span>"
        );
    });
};

function ReplaceAll(Source,stringToFind,stringToReplace){

  var temp = Source;

    var index = temp.indexOf(stringToFind);

        while(index != -1){

            temp = temp.replace(stringToFind,stringToReplace);

            index = temp.indexOf(stringToFind);

        }

        return temp;

}
