// -----------------------------
// SERVER INFO
// ------------------------------

// TESTING
var testing = {
	url: "file:///",
	assets: "file:///C:/projects/Activision/WWW_GuitarHero_SmashHits_Voting/DEV_Repository/DEV_Deploy/assets/",
	services: "http://ghgh.blitzagency.com/application/services/",
	securityDomain: "false"
};

// QA SERVER
var qa = {
	url: "ghgh.blitzagency.com",
	assets: "http://ghgh.blitzagency.com/assets/",
	services: "http://ghgh.blitzagency.com/application/services/",
	securityDomain: "false"
};

http://cdn.guitarhero.com/ghsmashhits/staging/assets/

// STAGE SERVER
var stage = {
	url: "ghsmash.atvi.2advanced.com",
	assets: "http://cdnorigin.atvi.2advanced.com/ghsmashhits/staging/assets/",
	services: "http://ghsmash.atvi.2advanced.com/application/services/",
	securityDomain: "false"
};

// LIVE SERVERS
var live = {
	url: "smashhits.guitarhero.com",
	assets: "http://cdn.guitarhero.com/ghsmashhits/assets/",
	services: "http://smashhits.guitarhero.com/application/services/",
	securityDomain: "false"
};

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 stage
	if(url.indexOf(stage.url) != -1) {
		serverLocation = stage;
		
	}
	
	// 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();

