Removed dependency to jquery and added comments to allow globals for jslint