Fix jshint violations, minor clean up

* Fix variable leakage ($nav, $prev and $next were not
  declared as local variables and thus auto-created as global
  variables).

* Fix indentation.

* Chain mutually exclusive condition in an 'else if'.

* Use jQuery with local $ alias.

bookmanager.js: line 2, col 1, '$' is not defined.
bookmanager.js: line 3, col 5, '$nav' is not defined.
bookmanager.js: line 3, col 12, '$' is not defined.
bookmanager.js: line 4, col 5, '$prev' is not defined.
bookmanager.js: line 5, col 5, '$next' is not defined.

Change-Id: I48ddcb9bbbc0798f6cb6f61f89024934d16b9cd5