[.toggleClass](http://api.jquery.com/toggleclass/) will do all that leg work for you