added a couple lines for phonegap cross domain problems