use (x===0)

Triple-= (===) is more specific than double-= (==) and is generally preferable when comparing certain values like `null`, `false`, or `0`.
Normalized spacing

Switching between tabs and spaces for indentation isn't ideal. Also, trailing whitespace can get confusing. Some languages assign that meaning, like Jade (a javascript templating language), or Markdown.

http://evadeflow.com/wp-content/uploads/2011/03/TabsSpacesBoth.png
handle mouse and touch events

You can bind to mouseover/mouseout instead of hover(in,out), as well as bind to the associated touch events at the same time.
whitespace and === change
touch functionality added