Working demo
Try adding this to the end of your document ready function:
function verifyWinningConditions () {
var nonZeroBoxes = 25;
$('input').each(function(){
if($(this).val() == 0) {
nonZeroBoxes--;
}
});
if (nonZeroBoxes == 0) {
alert('WINNER!! All 25 boxes are 0!');
}
if(nonZeroBoxes >= 23) {
alert('LOSER! Only 2 out of 25 boxers were 0!');
}
}
$('input').on('click', verifyWinningConditions);