I would like to check the first radio button of each group. But there are some radio button that are disabled, so the script should ignore them and go to next non-disabled b
Try this :
$("input:radio:not(:disabled)").attr("checked", true);
To check the first radio button only in a group you can
$("parentelement input:radio:not(:disabled):first-child").attr("checked", true);