modifications to play nice with Jquery Mobile DOM structure