<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<input type="radio" name="rg1" checked>
<input type="radio" name="rg1">
<input type="radio" name="rg1">
<br>
<input type="radio" name="rg2" checked>
<input type="radio" name="rg2">
<input type="radio" name="rg2">
<script>
jQuery(function ($) {
$(':radio[name^="rg"]').bind('change', function () {
var rg1 = $(':radio[name="rg1"]');
var rg2 = $(':radio[name="rg2"]');
if ($(this).attr('name') == 'rg1') {
rg2.eq(rg1.index(this)).attr('checked', 'checked');
} else {
rg1.eq(rg2.index(this)).attr('checked', 'checked');
}
});
});
</script>