Fix hidden states to better match the behavior of visible states

Also add jQuery UI for kicks.