Will Perry's code for jquery mobile