factor out underscore, use jquery