Fixed jquery.patterns.js event handling