Changed all the JS click() events to on('click'), as it is more stable and supposedly a wee bit faster.