// -----------------------------
// SERVER INFO
// ------------------------------

// TESTING
var testing = {
	assets: "file:///C:/projects/Activision/WWW_GuitarHero_Metallica_NCAA_Site/repository/DEV_Deploy/assets/",
	securityDomain: "false"
};

// LOCALHOST
var localhost = {
	url: "localhost",
	assets: "http://10.10.2.108/Activision/WWW_GuitarHero_Metallica_NCAA_Site/repository/DEV_Deploy/assets/",
	securityDomain: "true"
};

// QA SERVER
var qa = {
	url: "http://ghcoaches.atvi.2advanced.com/",
	assets: "http://cdnorigin.atvi.2advanced.com/ghcoaches/staging/assets/",
	securityDomain: "true"
};

// LIVE SERVERS
var live = {
	url: "http://coaches.guitarhero.com/",
	assets: "http://cdn.guitarhero.com/ghcoaches/assets/",
	securityDomain: "true"
};

var url = window.location.href; // current window full URL 
var serverLocation; // object consisting of server properties

/**
  *  Determines if the current window's location is on localhost, staging, or live
  *  
  *  If the server location can be determined the full URL is attached to the 'serverLocation' object
  */
function determineServerLocation() {
	// we are testing
	serverLocation = live;
	
	// we are on localhost
	if(url.indexOf(localhost.url) != -1) {
		serverLocation = localhost;
	}
	
	// we are on qa server
	else if(url.indexOf(qa.url) != -1) {
		serverLocation = qa;
	}
	
	// we are on live servers
	else if(url.indexOf(testing.url) != -1) {
		serverLocation = testing;
	}
	

};

// determin server location, results will be in 'serverLocation' object
determineServerLocation();

