An easy function to handle the "shake" event in morden browser.