Changed the "global variable" name to avoid conflict with jquery