This screencast is a part of the epic learning series "Four weeks of Drupal", chapter "Introduction to theming". You can view the full series at dev.nodeone.se/en/four-weeks-of-drupal.
Please post any comments over there, or we won't see them. Sorry.
The #states property is normally used for showing or hiding form elements, depending on the values of other elements. This screencast shows an implementation of this that may be of use if you're trying to understand this setting yourself.
*Note that themes should only use alter hooks for cosmetic purposes! Other alters should go into module.*