Move js to separate file; add a few small adjustments

Namely: use jquery 2 (we don't need legacy support); use Google CDN;
include jquery in body instead of head; use pre-existing classes to
target counters.