#1730538 by andyp22: Refactored code to better handle drupal_add_js method of embedding munchkin function. More specifically, the marketo_post_script hook was modified to differentiate between external and inline javascript when add js to the page footer.