It would be really nice to incorporate these CSS "state" changes into the CSS file too. That way, you only have to add a class (or similar) to handle all of the appropriate state changes.