Update language variables
Improve syntax for update_toc() - use jQuery whenever possible - refs #398

(cherry picked from commit 7642f07e71d4c26cf3af94c43b8ecae00fe9ccd9)