toggle_box() sanitizes values used in the rendered markup.

Updates inline JavaScript to use jQuery library, and uses
a code format that could be potentially turned in a general
snippet and thrown into the library.

Now gets the initial class visibility from the checkbox's
state, instead of from the cookie. This would avoid values
going to off sync where the interface shows other and
the cookie says different.

git-svn-id: http://textpattern.googlecode.com/svn/development/4.x@5219 2fea6a4d-a838-0410-917b-93a53c48e9d2