This Drupal API tutorial shows you how you can include external javascript files.
If you want to add external javascript libraries through drupal api then this is the way to do this.
Source code viewer
<?php drupal_set_html_head('<script src="http://example.com/javascript.js" type="text/javascript"></script>'); //now you might have to reload the header instance $variables['head'] = drupal_get_html_head(); ?>Programming Language: PHP