More complex logic for the JQM multi-page