Changed to use JQuery on ready function