Added jquery.
changed $ to global in preparation for jQuery.