changed to use jquerypack global variable