function onPageLoad(tabIndex,pageIndex)
{
	$("ul.sf-menu > li:eq(" + tabIndex + ")").addClass("current");
	$(".current li:eq(" + pageIndex + ")").addClass("current-link");
	
	Cufon.replace('#content h1', {
		color: '#cf0f0f'
	});
	
	Cufon.replace('#offer h1', {
		color: '#eeeeee'
	});
	
	Cufon.replace('#notice h1', {
		color: '#ffffff'
	});
	
	Cufon.replace('#events h1', {
		color: '#ffffff'
	});
}

function initialize()
{
	if (GBrowserIsCompatible())
	{
		// If JavaScript is enabled, then we can give a height and width to the map div
		var mapObj = document.getElementById("map_canvas");
		
		var map = new GMap2(mapObj);
		// Find the address tag
		var address = document.getElementById("google-address");
		address.className = "hide";
		var address = '<address>' + address.innerHTML + '</address><form method="get" onsubmit="getDirections(); return false;" id="google-directions"><p><label for="startFrom">Start Address:</label> <input type="text" id="startFrom" /> <input type="submit" id="submit" value="Go" /><kbd><abbr title="Example">ex.</abbr> 32 Main St Taunton, MA</kbd></p></form>';
		
		map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());
		map.setCenter(new GLatLng(41.809866,-70.975730), 9);
		
		// Place a marker in the center of the map and open the info window automatically
		var marker = new GMarker(map.getCenter());
		GEvent.addListener(marker, "click", function() {
		marker.openInfoWindowHtml(address);
		});
		map.addOverlay(marker);
		marker.openInfoWindowHtml(address);
	}
}

function getDirections(address)
{
	if (document.getElementById('startFrom').value != '') window.open('http://maps.google.com/maps?saddr=' + document.getElementById('startFrom').value + '&daddr=111 Highland Rd Lakeville, MA 02347','Directions','');
}