Adding context to drupal js functions.
adding context checking for js.