Changed $ to jQuery to prevent no-conflict issues.