
if(typeof OBA !== 'undefined' && typeof OBA.Config !== 'undefined') {
	OBA.Config.staleTimeout=120;
	OBA.Config.googleAnalyticsSiteId="UA-48443813-1";
	OBA.Config.bingMapsKey="";
	OBA.Config.obaApiKey="OBANYC";
	OBA.Config.mapBounds={ swLat: -40.387761, swLon: 175.584946, neLat: -40.32530100000001, neLon: 175.653256 };
	OBA.Config.mapCenterLat=-40.36;
	OBA.Config.mapCenterLon=175.61;
	OBA.Config.mapZoom=13;
	OBA.Config.mapInstance="google";
	OBA.Config.showVehicleNumbers=true;
	OBA.Config.keyWord='HOR';
	OBA.Config.shortCode='400';
	OBA.Config.smsChargesApply='false';
	OBA.Config.signDefaultAgencyId='Horizons';

	OBA.Config.siriSMUrl = "api/siri/stop-monitoring.json?key=" + OBA.Config.obaApiKey;
	OBA.Config.siriVMUrl = "api/siri/vehicle-monitoring.json?key=" + OBA.Config.obaApiKey;
	
	OBA.Config.infoBubbleFooterFunction = function(type, query) {
			var html = '';

			if(type === "stop")	{
				html += '<div class="footer">';
				html += '<span class="header">While at the bus stop...</span>';
				html += '<br/>';

				html += 'Send <strong>' + OBA.Config.keyWord + ' ' + query + '</strong> as a text to <strong>' + OBA.Config.shortCode + '</strong>';
                if (OBA.Config.smsChargesApply != 'false') {
                    html += ' (<a href="wiki/Help/Index">' + OBA.Config.smsChargesApply + '</a>)';
                }
				html += '<br/>';
				html += 'or check <a href="m/?q=&#039; + query + &#039;">this stop</a> on your smartphone.';

				html += '</div>';

			} else if(type === "route") {
				html += '<div class="footer">';
				html += '<span class="header">While at the bus stop...</span>';
				html += '<br/>';
				
				html += 'Check <a href="m/?q=&#039; + query + &#039;">this route</a> on your smartphone.';

				html += '</div>';				

			} else if(type === "sign") {
				html += 'Text <strong> ' + query + '</strong> to <strong>' + OBA.Config.shortCode + '</strong> ';
				html += 'or check this stop on your smartphone at <strong>http://' + window.location.hostname + ((window.location.port !== '') ? ':' + window.location.port : '') + '/m/?q=' + query + '</strong>';

			} else if(type === "route") {
				html += '<div class="footer">';
				html += '<span class="header">While at the bus stop...</span>';
				html += '<br/>';

				html += 'Check this route on your smartphone.';

				html += '</div>';

			} else if(type === "maponlystop") {
				html += '<div class="footer">';
				html += '<span class="header">While at the bus stop...</span>';
				html += '<br/>';

				html += 'Send <strong>' + OBA.Config.keyWord + ' ' + query + '</strong> as a text to <strong>' + OBA.Config.shortCode + '</strong>';
				if (OBA.Config.smsChargesApply != 'sms.chargesapply') {
					html += ' (' + OBA.Config.smsChargesApply + ')';
				}
				html += '<br/>';
				html += 'or check this stop on your smartphone.';

				html += '</div>';
			}

			return html;
		};

	OBA.Config.configurationHasLoaded();
}
