Third Commit

Made compatible with adobe phonegap