add checks for jQuery and shapefile-js
wrap code inside an object