You should not use the $.show() and $.hide() methods from the core jQuery library for page navigation. Page navigation in jQuery Mobile is handled through the Pagecontainer Widget -- specifically using change method.
In your example, you would do the following:
var homePage = $("#HomePage");
$.mobile.pageContainer.pagecontainer("change",homePage,{});