title: jquery form with dialog ( issue with the if else loop in jquery)
body: <p>Hi have a form to submit with the help of jquery plugin "openid".now every thing works fine when i click on google_button but when i click on aol it will open dialog and will submit the form (when form.submit with return false is commented out) . when i remove the comments the aol will work fine with only aol dialog getting open and form not getting submitted but google form will also will not be submitted in that case.</p>
  
  <p>Please help me out</p>
  
  <p>================================================================================</p>
  
  <pre><code>&lt;form action="example.php" method="post" &gt;   
  &lt;input type="image" src="images/google_button.png" id='https://www.google.com/accounts/o8/id' class="google"/&gt; 
            &lt;input type="image" src="images/AOL_button.png" id='http://openid.aol.com/' class='aol' /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>================================================================================</p>
  
  <pre><code> &lt;script type="text/javascript"&gt;  
        $(document).ready(function(){
          $('form').openid(); 
        })
      &lt;/script&gt;
  </code></pre>
  
  <p>================================================================================</p>
  
  <pre><code>(function($){
    $.fn.openid = function() {
      $('input').click(function(e){
        var provider = $(this).attr('class');
       if (provider == 'aol') {
          $("#dialog").dialog();
           /*$('form').submit(function(){
               return false;   
      })*/
       }
       else{
        var provider_url = $(this).attr('id');  //get id
        var myinput = $('&lt;input type="hidden" name="provider_url"/&gt;').val(provider_url);
        $('form').append(myinput);
        $('form').submit();
      }  
      })
    }
  })(jQuery);
  </code></pre>
  
  <p>===============================================================================</p>