Understanding JavaScript behaviors in Drupal