$(document).ready(function() {
	$("#navigation > li:last > a").addClass('last');
	if($("#navigation > li:last > a").hasClass('selected')) {
		$("#navigation > li:last > a").addClass('last_selected');
	} else {
		$("#navigation > li:last > a").addClass('last');
	}
	$("#submenu > li:last").addClass('last');
	
	

	var map = null;
	var geocoder = null;
	var addressas = "<div>Rinkuškių k., LT-41187, Biržų raj.</div>	<div>Tel: (8-450) 46805, faks.: (8-450) 46807, </div><div>El. paštas: info@birzuranga.lt</div>";
	function initialize() {
		if (GBrowserIsCompatible()) {
			map = new GMap2(document.getElementById("contact_gmaps"));
			map.setCenter(new GLatLng(56.2, 24.73), 13);
			map.addControl(new GLargeMapControl())
			var marker = new GMarker(new GLatLng(56.216, 24.731));
			map.addOverlay(marker);
			marker.openInfoWindowHtml(addressas);
			
			
			var crossLayer = new GTileLayer(new GCopyrightCollection(""), 0, 15);
			crossLayer.getTileUrl =  function(tile, zoom) {
				return "./include/tile_crosshairs.png";
			}
			crossLayer.isPng = function() {return true;}

			// Create a new map type incorporating the tile layer
			var layerTerCross = [ G_PHYSICAL_MAP.getTileLayers()[0], crossLayer ];
			var mtTerCross = new GMapType(layerTerCross, G_PHYSICAL_MAP.getProjection(), "Ter+");
			map.addMapType(G_PHYSICAL_MAP);
			map.addMapType(mtTerCross);
			map.addControl(new GLargeMapControl());

			var mapControl = new GHierarchicalMapTypeControl();
			mapControl.clearRelationships();
			mapControl.addRelationship(G_SATELLITE_MAP, G_HYBRID_MAP, "Labels", false);
			mapControl.addRelationship(G_PHYSICAL_MAP, mtTerCross, "Crosshairs");
			map.addControl(mapControl);

			//geocoder = new GClientGeocoder();
		}
	}
	if($('#contact_gmaps').lenght > 0) {
		initialize();
	}
});