Q: How do I assign a default value to a radio button if the group is unchecked after a click event elsewhere? How do I assign a default value with Jquery to a radio group that has been unchecked by another script due to a user action on another radio group?
Only one image on the page can be assigned the value "primary" or "secondary". But the bottom two values("keep" or "delete") are not exclusive and can be applied to any image on the page. The column is controlled by normal radio button group behavior.
There is 2-way exclusivity via jQuery. ( http://css-tricks.com/radio-buttons-with-2-way-exclusivity/ )
<div class="dlab-image-blocks text-center"><img width="150" height="150" src="http://mrtwebdesign.local/ddd/wp-content/uploads/2013/02/Desert1-150x150.jpg" class="attachment-thumbnail" alt="Desert">
  <div class="dlab-ctrl btn-group btn-group-vertical padtop20">
    <label class="btn btn-primary">
      <input type="radio" id="primary871" name="col-871 " class="rbtn" data-row="1" value="primary">Primary
    </label>
    <label class="btn">
      <input type="radio" id="secondary871" name="col-871 " data-row="2" class="rbtn" value="secondary">Secondary
    </label>
    <label class="btn keep">
      <input type="radio" id="keep871" name="col-871 " class="rbtn keep" value="keep" checked="checked">Unused, but keep
    </label>
    <label class="btn">
      <input type="radio" id="delete871" name="col-871 " class="rbtn" value="delete">Delete image
    </label>
  </div> <!-- dlab-ctrl btn-group btn-group-vertical padtop20 -->
</div>

The default value I'd like to assign is for the input with the value of "keep". I have a few different ways of selecting it.. but any action on the page that would trigger the script would be in another radio group.
<script>
    $('label').click(function() {
        if ($('input:radio[name|="col"]').length == 0){
           $(this).filter(".keep").attr('checked',true);
        }
    });
</script>

I think this would only work within the radio button group that is clicked on. But the click will always be on another group. 
+++++++++++++++++++++++++++++++++++++++
an update. example in JSFIDDLE: http://jsfiddle.net/mrtwebdesign/fQUX3/
+++++++++++++++++++++++++++++++++++++++
my latest attempt. I tried to adapt the other working script on the page. Still not sure what I'm doing.
I updated the jsfiddle link above
setTimeout(function() {
    var attached, elm;
    $("input[type=radio]").click(function () {
        elm = $(this);
        attached = elm.data("attached");
        if ($("input[data-attached=" + attached + "]").length == 0){
        elm.filter('.keep').prop("checked", true);
        }
    });
},500);


A: I finally figured it out, after a few more hours of experimentation.
I've rebased the jsfiddle to the working version.
http://jsfiddle.net/mrtwebdesign/fQUX3/
so.. I was able to roll it into a single script. It enforces two-way exclusivity on set of radio buttons with 'data-row=' set on matching values. If a group ends up getting unchecked. The radio button in that group with a class of 'keep' will be checked(i.e., the default value)
var row, el, groupName;

$("input[type=radio]").click(function() {
    el = $(this);
    row = el.data("row");
    $("input[data-row=" + row + "]").prop("checked", false);
    el.prop("checked", true);
    groupName = $(this).attr("name");
    $(".rbtn").each(function(idx)
     {
         if($(this).attr("name") != groupName)
         {
         $(this).filter(".keep").prop("checked", true);
         }
     });
});

