AJAX/Same Origin / why does this solution fail?

AJAX/Same Origin / why does this solution fail?

I code on a WAMP server and latest jQuery and jQuery Mobile app works fine when tested via latest Firefox, jquery, jquery mobile and with Apache/MySQL Zend serving content.

I thought I had a bright idea, it does not work and hoped someone might edukate me as to why it does not work like I expected.

My "bright idea": Instead of my jquery mobile app being served from my web server, I called it directly from the filesystem. Afterall, I expect to bundle it and stick it into an app store, and have it talk across the internet to my server. Hence why I separate the two for some testing.

My jQuery Mobile app which works just fine when called from the server, fails when called from the filesystem.  In firefox, I get "NS_ERROR_DOM_BAD_URI: Access to restricted URI denied" which I believe is a security limitation enforcing same origin policy.

So...

If I am to wrap my code into an app (ie PhoneGap) I should expect the same security limitation from occuring, or no?

Has anyone walked this narrow path, and if so, how was it safely/cleanly resolved for you? How does your packaged jquery mobile app log on to a remote server using ajax for example?

All help appreciated...