Well, that's still not a complete example, since you say it is a multi-page template, and I don't see the other pages. Nor do I see the content of <head>. It is very difficult to diagnose JQM problems from incomplete examples.
When the user clicks on a link where you have this problem, is that link to a page within the multi-page template, or outside of it?
If the user clicks on a link otuside of the multi-page template, then the content of that link will replace everything in the document, including all of your variables.
This is one of the many reasons I recommend against the use of multi-page documents.