ajax request only the first time works?
Please see http://drupal.org/coding-standards, as it is hard to read.

However that said, I usually find if ajax is only working once then as the element is replaced Drupal gives it a unique id which then breaks a selector. For example #form after the ajax request becomes #form-1 and is no longer targeted. -check for this in firebug