Radio button lists

Radio button lists

I have a form with 40 radio button lists. Each radio button list contains 2 radio buttons = "OK" and "NA".
The radio button lists are given ID's like "page1RB1", "page1RB2" etc.
The radio button lists are assigned a class "rbOK"
I am trying to reset all of the radio buttons to "OK" using the following code:

        function clearChecklist(){
            $('.rbOK').each(function(intIndex){
                var theText = "#" + $(this).attr('id');
                var theDL = theText.replace('RB', 'DL');
                $(theText.replace('RB', 'CP')).css({'color':'maroon'});               
                $(theDL).css({'color':'gray'});               
                $(theDL).val(-1);               
                $(theDL).attr('disabled', 'disabled');              
                $(theText).css({'color':'black'});                           
                $('input[name=' + theText + ']:eq(0)').attr('checked', 'checked');                           
            });
        }

As an aside, I also have a drop down list and label associated with each radio button list using a similar naming/ID convention where RB is replaced with DL for the drop down list or CP for the label. That is, page1RB1 is associated with page1DL1 drop down and page1CP1 label.

In this code, what I am trying to do is step through all radio button lists; read the radio button name/ID; use it to set the color and value of the drop down list and label AND SET THE RADIO BUTTON CHECKED TO THE OK.

It is the last part that is not working. the above code handles the drop down list and label perfectly. But for the life of me, I can not get the radio buttons to reset to OK. When I click on the NA, they stay checked.

What am I doing wrong?

TIA,
John