OBLat = 40.867671573779496; OBLong = -73.53175163269043; OBHtml = "<b>Oyster Bay, USA (Global HQ)</b><br /><br />249 South Street<br />Oyster Bay, NY 11771 USA<br />Main Tel: +1.516.624.2500<br />Media Relations: +1.516.624.2542<br />Fax: +1.516.624.2501<br /><br /><a href=\"http://www.abiresearch.com/inforequest.jsp\">Contact Sales</a>";
NYLat = 40.752917; NYLong = -73.9892; NYHtml = "<b>New York, USA</b><br /><br />501 Seventh Avenue<br />Suite 205A<br />New York, NY 10018 USA<br /><br /><a href=\"http://www.abiresearch.com/inforequest.jsp\">Contact Sales</a>";
SDLat = 33.616623; SDLong = -111.925086; SDHtml = "<b>Scottsdale, USA</b><br /><br />14555 N Scottsdale Rd.<br />Suite 150<br />Scottsdale, AZ 85254 USA<br /><br /><a href=\"http://www.abiresearch.com/inforequest.jsp\">Contact Sales</a>";
UKLat = 51.5177162373547; UKLong = -0.11095762252807617; UKHtml = "<b>London, United Kingdom</b><br /><br />4-6 Staple Inn<br />3rd Floor, Suite B<br />London WC1<br />United Kingdom<br />Sales &amp; Client Relations:<br />+44.(0).203.326.0140<br />Media Relations:<br />+44.(0).203.326.0142<br />Fax: +44.(0).203.326.0141<br /><br /><a href=\"http://www.abiresearch.com/inforequest.jsp\">Contact Sales</a>";
SGLat = 1.2961474065542895; SGLong = 103.85693550109863; SGHtml = "<b>Singapore</b><br /><br />100 Beach Road<br />#27-08 Shaw Tower<br />Singapore 189702<br />Tel: +65.6592.0290<br />Fax: +65.6294.0991<br /><br /><a href=\"http://www.abiresearch.com/inforequest.jsp\">Contact Sales</a>";
IBLat = 52.323989; IBLong = -0.616695; IBHtml = "<b>Irthlingborough, United Kingdom</b><br /><br />The Old Chapel Business Centre<br />Suite 3, 43B High Street<br />Irthlingborough NN9 5PU<br />United Kingdom<br />Sales &amp; Client Relations:<br />+44.(0).203.326.0140<br />Media Relations:<br />+44.(0).203.326.0142<br />Fax: +44.(0).203.326.0141<br /><br /><a href=\"http://www.abiresearch.com/inforequest.jsp\">Contact Sales</a>";

$(document).ready(function()
{
	$("#map").gMap({
		markers: [	{latitude: OBLat, longitude: OBLong, html: OBHtml},
					{latitude: NYLat, longitude: NYLong, html: NYHtml},
					{latitude: SDLat, longitude: SDLong, html: SDHtml},
					{latitude: UKLat, longitude: UKLong, html: UKHtml},
					{latitude: SGLat, longitude: SGLong, html: SGHtml},
					{latitude: IBLat, longitude: IBLong, html: IBHtml}],
		latitude: 30, longitude: -3, zoom: 2
	});
	
	$("#OB").click(function()
	{
		$("#map").gMap({
			markers: [	{latitude: OBLat, longitude: OBLong, html: OBHtml, popup: true},
						{latitude: NYLat, longitude: NYLong, html: NYHtml},
						{latitude: SDLat, longitude: SDLong, html: SDHtml},
						{latitude: UKLat, longitude: UKLong, html: UKHtml},
						{latitude: SGLat, longitude: SGLong, html: SGHtml},
						{latitude: IBLat, longitude: IBLong, html: IBHtml}],
			latitude: OBLat, longitude: OBLong,
			zoom: 10
		});
		$("p").slideUp();
		$("#OBaddress").slideDown();
	});
	
	$("#NY").click(function()
	{
		$("#map").gMap({
			markers: [	{latitude: OBLat, longitude: OBLong, html: OBHtml},
						{latitude: NYLat, longitude: NYLong, html: NYHtml, popup: true},
						{latitude: SDLat, longitude: SDLong, html: SDHtml},
						{latitude: UKLat, longitude: UKLong, html: UKHtml},
						{latitude: SGLat, longitude: SGLong, html: SGHtml},
						{latitude: IBLat, longitude: IBLong, html: IBHtml}],
			latitude: NYLat, longitude: NYLong,
			zoom: 10
		});
		$("p").slideUp();
		$("#NYaddress").slideDown();
	});
	
	$("#SD").click(function()
	{
		$("#map").gMap({
			markers: [	{latitude: OBLat, longitude: OBLong, html: OBHtml},
						{latitude: NYLat, longitude: NYLong, html: NYHtml},
						{latitude: SDLat, longitude: SDLong, html: SDHtml, popup: true},
						{latitude: UKLat, longitude: UKLong, html: UKHtml},
						{latitude: SGLat, longitude: SGLong, html: SGHtml},
						{latitude: IBLat, longitude: IBLong, html: IBHtml}],
			latitude: SDLat, longitude: SDLong,
			zoom: 10
		});
		$("p").slideUp();
		$("#SDaddress").slideDown();
	});
	
	$("#UK").click(function()
	{
		$("#map").gMap({
			markers: [	{latitude: OBLat, longitude: OBLong, html: OBHtml},
						{latitude: NYLat, longitude: NYLong, html: NYHtml},
						{latitude: SDLat, longitude: SDLong, html: SDHtml},
						{latitude: UKLat, longitude: UKLong, html: UKHtml, popup: true},
						{latitude: SGLat, longitude: SGLong, html: SGHtml},
						{latitude: IBLat, longitude: IBLong, html: IBHtml}],
			latitude: UKLat, longitude: UKLong,
			zoom: 10
		});
		$("p").slideUp();
		$("#UKaddress").slideDown();
	});
	$("#IB").click(function()
	{
		$("#map").gMap({
			markers: [	{latitude: OBLat, longitude: OBLong, html: OBHtml},
						{latitude: NYLat, longitude: NYLong, html: NYHtml},
						{latitude: SDLat, longitude: SDLong, html: SDHtml},
						{latitude: UKLat, longitude: UKLong, html: UKHtml},
						{latitude: SGLat, longitude: SGLong, html: SGHtml},
						{latitude: IBLat, longitude: IBLong, html: IBHtml, popup: true}],
			latitude: IBLat, longitude: IBLong,
			zoom: 10
		});
		$("p").slideUp();
		$("#IBaddress").slideDown();
	});
	
	$("#SG").click(function()
	{
		$("#map").gMap({
			markers: [	{latitude: OBLat, longitude: OBLong, html: OBHtml},
						{latitude: NYLat, longitude: NYLong, html: NYHtml},
						{latitude: SDLat, longitude: SDLong, html: SDHtml},
						{latitude: UKLat, longitude: UKLong, html: UKHtml},
						{latitude: SGLat, longitude: SGLong, html: SGHtml, popup: true},
						{latitude: IBLat, longitude: IBLong, html: IBHtml}],
			latitude: SGLat, longitude: SGLong,
			zoom: 10
		});
		$("p").slideUp();
		$("#SGaddress").slideDown();
	});
	
	$("#America").click(function()
	{
		$("#map").gMap({
			markers: [	{latitude: OBLat, longitude: OBLong, html: OBHtml},
						{latitude: NYLat, longitude: NYLong, html: NYHtml},
						{latitude: SDLat, longitude: SDLong, html: SDHtml},
						{latitude: UKLat, longitude: UKLong, html: UKHtml},
						{latitude: SGLat, longitude: SGLong, html: SGHtml},
						{latitude: IBLat, longitude: IBLong, html: IBHtml}],
			latitude: 37.09024, longitude: -95.712891,
			zoom: 4
		});
	});
	
	$("#Europe").click(function()
	{
		$("#map").gMap({
			markers: [	{latitude: OBLat, longitude: OBLong, html: OBHtml},
						{latitude: NYLat, longitude: NYLong, html: NYHtml},
						{latitude: SDLat, longitude: SDLong, html: SDHtml},
						{latitude: UKLat, longitude: UKLong, html: UKHtml},
						{latitude: SGLat, longitude: SGLong, html: SGHtml},
						{latitude: IBLat, longitude: IBLong, html: IBHtml}],
			latitude: 48.54570549184746, longitude: 5.009765625,
			zoom: 5
		});
	});
	
	$("#Asia").click(function()
	{
		$("#map").gMap({
			markers: [	{latitude: OBLat, longitude: OBLong, html: OBHtml},
						{latitude: NYLat, longitude: NYLong, html: NYHtml},
						{latitude: SDLat, longitude: SDLong, html: SDHtml},
						{latitude: UKLat, longitude: UKLong, html: UKHtml},
						{latitude: SGLat, longitude: SGLong, html: SGHtml},
						{latitude: IBLat, longitude: IBLong, html: IBHtml}],
			latitude: 15.961329081596647, longitude: 116.71875,
			zoom: 4
		});
	});
	
	$("#contactLeftPane h1").click(function()
	{
		$("#map").gMap({
			markers: [	{latitude: OBLat, longitude: OBLong, html: OBHtml},
						{latitude: NYLat, longitude: NYLong, html: NYHtml},
						{latitude: SDLat, longitude: SDLong, html: SDHtml},
						{latitude: UKLat, longitude: UKLong, html: UKHtml},
						{latitude: SGLat, longitude: SGLong, html: SGHtml},
						{latitude: IBLat, longitude: IBLong, html: IBHtml}],
			latitude: 30, longitude: -3,
			zoom: 2
		});
	});
});

