Update tpl to integrate with jQuery if its available.