Substituted standard javascript for JQuery.