Display alert if 2 checkboxes checked

Display alert if 2 checkboxes checked

I need to display an alert if you select two checkboxes, this isn't regarding validation, it pops a special message if you select 2 related products.
HTML
<input type="checkbox" name="News" value="IQBAS" id="IQBAS" />
<input type="checkbox" name="News" value="IQPRE" id="IQPRE" />

jQuery
<script type="text/javascript">
$(document).ready(function() {
     if ($("#IQBAS").is(":checked")) {
         if ($("#IQPRE").is(":checked")) {
                            alert("FOO");
                            }
     }
});
</script>

doesn't work, nor has anything else! thanks in advance, im sure this is a simple solution