Final jQuery bits for tpl.