$(function(){
		  
		$('#Menu li:nth-child(8)').addClass('no-bg');
		$('#Menu > ul > li:last-child').addClass('search no-bg');
		

		//Full Caption Sliding (Hidden to Visible)
		$('.boxgrid.captionfull').hover(function(){
			$(".cover", this).stop().animate({top:'160px'},{queue:false,duration:160});
		}, function() {
			$(".cover", this).stop().animate({top:'260px'},{queue:false,duration:160});
		});
		
		//Switcher
		$('div#ProductsSwitch').find('ul').hide();
		$('div#ProductsSwitch').stop(true, true).hover(function(){
			$(this).find('ul').stop(true, true).slideDown();
		},function(){
			$(this).find('ul').slideUp();	
			});

		
});

function initialize() {
		
		// Creating a LatLng object containing the coordinate for the center of the map  
          var latlng = new google.maps.LatLng(55.865623, -4.286882);  
          // Creating an object literal containing the properties we want to pass to the map  
          var options = {  
          	zoom: 17,
          	center: new google.maps.LatLng(55.865623, -4.286882),
          	mapTypeId: google.maps.MapTypeId.ROADMAP
          };    
          // Calling the constructor, thereby initializing the map  
          var map = new google.maps.Map(document.getElementById('map_canvas'), options);  
                    
          // Creating a marker
		  var image = 'http://www.flamemultimedia.com/images/powered_fm.png';
		  var marker = new google.maps.Marker({
			position: new google.maps.LatLng(55.865623, -4.286882), 
			map: map,
			icon: image
   		  });
          
          // Creating an InfowWindow          
          var infowindow = new google.maps.InfoWindow({
            content: 'Geo-Flame<br/>1190 Argyle Street<br/>Glasgow<br/>G3 8TE<br/>08453 893 300<br/><a href="http://www.flamemultimedia.com/" target="_blank">flamemultimedia.com</a>'
          });
		  
		  infowindow.open(map, marker);
		  map.panBy(30, -120);
          // Adding a click event to the marker
          google.maps.event.addListener(marker, 'click', function() {
          // Opening the InfoWindow
          infowindow.open(map, marker);
          });
      	}
		
		var doctitle = document.title;
		if (doctitle == "Contact Us | Get in touch today"){
		google.maps.event.addDomListener(window, 'load', initialize);
}
