$(document).ready(function(){

   //zmiana koloru tla i czcionki
   $('#nav ul li:not(:last)').hover(function(){
								  $(this).css('background','url(/img/active.png)');
								  $(this).children('a').css('color','orange');
								  }, function(){
								  $(this).css('background','url(/img/nav-separator.png) no-repeat');
								  $(this).children('a').css('color','black');
								  });
   
   //przeniesienie po kliknieciu li a nie tylko a
   $('#nav ul li:not(:last)').click(function(){
								  var href = $(this).children('a').attr('href');
								  window.location.replace(href);														  
								  });
   
   $('.menus').hover(function(){ 
							  $(this).css('background-color','#f9e7c1');
							  },function(){
							  $(this).css('background-color','#FFF4DD');
							  });
	/*	$("#map").gMap({ markers: [{ latitude: 52.414599,
                              longitude: -4.085444,
                              html: "The Orangery",
                              popup: true}],
					   zoom:17});*/
	});

		// Array of images:
		
		
			var imageArray = ['img/active.png'];
		 
		// Add hidden element
		var hidden = $('body').append('<div id="img-cache" style="display:none/>').children('#img-cache');
		 
		// Add images to hidden element.
		$.each(imageArray, function (i, val) {
		  $('<img/>').attr('src', val).appendTo(hidden);
		});
		
		
		function equalHeight(columns) {
			tallest = 0;
			columns.each(function() {
				thisHeight = $(this).height();
				if(thisHeight > tallest) {
					tallest = thisHeight;
				}
			});
			columns.height(tallest);
		}
		
		function initialize() {
		  if (GBrowserIsCompatible()) {
			var map = new GMap2(document.getElementById("map"));
			map.setCenter(new GLatLng(52.414599,-4.085444), 14);
			var point = new GLatLng(52.414599,-4.085444);
    		map.addOverlay(new GMarker(point));
			map.openInfoWindow(map.getCenter(),
                   document.createTextNode("The Orangery"));
			map.setUIToDefault();
		  }
		}
