Calling a jQuery function in a link printed by jQuery

Calling a jQuery function in a link printed by jQuery

Hello everyone!
I've searching a lot since then I started programming in jQuery. To now I got stucked and I didn't found anything.
I developed a login code that works like a charm, but the trouble is:
If the user mistype his login or password he got a message and a Try Again link, that looks like:
  1. <div class="logout">Try Again</div>

Then it should be interpreted by jQuery in this "fuction":
  1. $(".logout").click(function() {
  2.       $.post('bin/logout.php',{ }, function(logout){
  3.             $('#logincases').html("Here goes the html of the login form").hide().fadeIn(1000);
  4.     })                                      
  5. });

But, somehow, when I click in "Try Again" it do a very weird act. It actualy shows the form, but don't hide the errors messages how it shoult (see next code) and when I submit it the page reloads and the form is empty and working.
  1.   $(".Submit").click(function() {
  2.     $('.error').hide();
  3. ...continue with the login.

Can some good soul help me?
Thanks!