reformatted JS and swapped jQuery for $ variable.