title: if...radio is checked alert
body: <p>I'm trying to write a piece of code which use the user choice in a form. 
  The code should give an alert window with the name of the radio selected but doesn't work, it only show the A alert either A is selector or B is selected.
  This is the form</p>
  
  <pre><code>&lt;FORM&gt;
  &lt;input type="radio" name="search_type" value="A"/&gt;type A&lt;br/&gt;
  &lt;input type="radio" name="search_type" value="B"/&gt;type B&lt;br/&gt;
  &lt;/FORM&gt;
  </code></pre>
  
  <p>and this is the js code</p>
  
  <pre><code>$(document).ready(function(){
      $('input:radio[name="search_type"]').change(function() {
          if ($('input:radio[name="search_type"]').val() == 'A'){
                  alert('type A');
          };
          if ($('input:radio[name="search_type"]').val() == 'B'){
                  alert('type B');
          };
      });
  });
  </code></pre>
  
  <p>Here you can find the running code: <a href="http://jsfiddle.net/ur7cc/" rel="nofollow">http://jsfiddle.net/ur7cc/</a>
  Can anybody please tell me why it isn't working?
  Thanks!</p>