Updated to work with JQuery Mobile with custom theme