Try to play with this example:
var checked = [],
$check = $('.check').change(function() {
if (this.value == -1 && this.checked) {
$check.not(this).prop('disabled', true).prop('checked', false);
checked = [];
}
else {
$check.prop('disabled', false);
checked.push(this);
checked = $(checked)
checked.prop('checked', false).slice(-2).prop('checked', true);
}
});
http://jsfiddle.net/q7Dve/