validate if all YES/NO radio button groups are checked and validate if all are YES 
<p>I'd like to have a form with 3 questions each having a pair of YES/NO radio buttons. Upon form submission, first I need to validate if all questions are answered with <code>"yes"</code> or <code>"no"</code> then I need to validate if the answer of all 3 questions are <code>YES</code>. If <code>YES</code> on all then it can proceed to next page if not an error should popup saying "Not qualified" and offer a link or a button to get the user back to home page.
Thank you</p>

<p>This is checking if all are answered:</p>

<pre><code>$(":radio").change(function() {
var names = {};
$(':radio').each(function() {
    names[$(this).attr('name')] = true;
});
var count = 0;
$.each(names, function() { 
    count++;
});
if ($(':radio:checked').length === count) {
    alert("all answered");
}
}).change();
</code></pre>
