Handle the change event on the radio group, not each button. Then look to see which one is checked.
Here’s is some untested code that hopefully shows what I’m talking about :)…
$("input[name="type"]").change(function(e){
if($(this).val() == 'history') {
$year.css({display:'none'});
$datespan.fadeIn('fast');
} else {
$datespan.css({display:'none'});
$year.fadeIn('fast');
}
});