$(document).ready(function() {

	$('#loading').hide();
	$("#banner").accordion();
	
/*	$(function initialize() {
	      if (GBrowserIsCompatible()) {
	        var map = new GMap2(document.getElementById("map"));
			var marker = new GMarker(new GLatLng(55.87155490317328, -4.337196350097656));
	        map.setCenter(new GLatLng(55.87155490317328, -4.337196350097656), 12);

			map.addOverlay(marker);
			
	        map.setUIToDefault();
	      }
	    });
	*/
	
	$('#banner h2').click(function(){
		var image = $(this).attr('id');
		
		//alert(image);
		$("#images img").each(function(){
			$(this).hide();
			
			
		});
		
		$('#images .'+ image).show();
		
		return false;
	});
	
	
	$('.thumb-link').click(function(){
		var image = $(this).attr('title');
		//alert(image);
		$('#loading').show();		
		$('img#main').fadeOut('fast');
		$('img#main').attr('src', image);
		setTimeout(function () {
			 $('img#main').fadeIn('slow');

			$('#loading').hide('slow');
		}, 1500);
		
//		$(image).load(function () {
			
//		});
//		$('#loading').remove();

		
		return false;
	});
});

