changed function to attach markup

removed drupal_add_js from init to diff function and changed it to attached