updated to work with jquery or plain version of hammer.js