change on ready function to use jQuery