caution! ugly code incomming ;)

I'm playing with javascript, ajax and rails. First time with ajax. Tell me if you have any tips, hints, critics or ideas.