Modify to use jquery-tmpl