Added mobile parameter and updated to jQuery 2