changed $ to jQuery to support jquery and prototype envs