implemented tri-state power model

Implementing visual changes for power state by changing css
class would require adding and removing class descriptor from
element divs. This is a pain in raw javascript, but trivial in
jquery. Should import jquery and make integrate it.