You could do this mostly with CSS and a small bit of Javascript. I added CSS class RBChoices to my button group and then added the following CSS:
.RBChoices span.choice{
display:inline-block;
border-bottom:3px solid #dddddd;
background-color:#eeeeee;
padding:5px 10px;
text-align:center;
margin:0px 2px;
}
.RBChoices span.choice.selected{
border-bottom:3px solid #009999;
background-color:#009999;
}
.RBChoices .choice label{
display:block;
margin:0px;
font-weight:bold;
color: #009999;
min-width: 20px
}
.RBChoices span.choice.selected label{
color:#eeeeee;
}
.RBChoices input{
display:none;
}
And a small bit of javascript to add a class "selected" to the span when the interior input element is clicked:
$(document).ready(function(){
$('.RBChoices').click(function(){
$(this).find('span.choice').removeClass('selected');
$(this).find('input:checked').closest('span.choice').addClass('selected');
});
});
End result looks pretty close to your initial example: