// set the dev config vars
var config = {
	markerLimit: 30,						// Number of markers to show on the page
	mapBuf: 300,							// Map buffer (in map units) for address searches
	searchWait: 1000, 						// Time to wait (in milliseconds) before firing a search
	handlerBase: 							// Handler base URL
		"proxy.ashx?page=http://www.phillyhistory.org/PhotoArchive/",
	handlerUrlEncrypt: true, 				// Should we url-encrypt GETs?
}

// now check and see if we need to change to another config
if (document.location.toString().indexOf('phillyhistory.org') >= 0) {
	config.handlerBase = "/PhotoArchive/";
	config.handlerUrlEncrypt = false;
	
	// if this is on the production server, we also need to redirect to the proper url
	if (window.location !== 'http://www.phillyhistory.org/i/#_home'){
		window.location = 'http://www.phillyhistory.org/i/#_home';
	}
}

if (document.location.toString().indexOf('localhost') >= 0) {
	config.handlerBase = "proxy.ashx?page=http://ph01/PhotoArchive/";
	config.handlerUrlEncrypt = false;
}
if (document.location.toString().indexOf('ph01') >= 0) {
	config.handlerBase = "proxy.ashx?page=http://ph01/PhotoArchive/";
	config.handlerUrlEncrypt = false;
}
