1 (function(){
  2 	
  3 	//TODO implement other / better mechanism for this:
  4 	//	Cordova 3.x JS-file needs to be loaded before requirejs, but we also need to 
  5 	//  determine if cordova.js should be loaded at all ...
  6 	//
  7 	// this WORKAROUND has several drawbacks:
  8 	//  * additional environment-checking (should be done only in one place/code -> see detectEnv.js)
  9 	//  * the script-element for the cordova-lib is written as-is into the document
 10 	//  * cordova cannot be used as a requirejs-dependency within framework-code (should this be possible?)
 11 	
 12 	var params = window.location.search;
 13 	var isCordovaEnv = /env=(android|ios|cordova)/igm.test(params);
 14 	//create script-element for cordova (only if run on Android):
 15 	if(isCordovaEnv){
 16 		document.write('<script type="text/javascript" src="cordova.js"></script>');
 17 	}
 18 
 19 })();