ReferenceError: Drupal is not defined
Sounds like an issue with the ordering of the javascript files. Drupal is defined in 

/misc/Drupal.js

var Drupal = Drupal || { 'settings': {}, 'behaviors': {}, 'locale': {} };


Check Drupal.js is added to your HTML source, prior to when that variable is requested.