modified code so it no longer clashes with jQuery which is included with drupal