// JavaScript Document
// Load jQuery
google.load("jquery", "1");
google.load("jqueryui", "1");

google.setOnLoadCallback(function() {
	
	$(".portfolio a").mouseover(function() {
		$(".hidden", this).stop(true, true).show();
	});
	$(".portfolio a").mouseout(function() {
		$(".hidden", this).fadeOut(3500);
	});
	$(".servicesSubNav a").not(".active").mouseover(function() {
		$(this).stop(true, true).animate({
			color: 'rgb(32,99,150)'
		}, 10);
	});
	$(".servicesSubNav a").not(".active").mouseout(function() {
		$(this).stop(true, true).animate({
			color: 'rgb(107,107,107)'
		}, 2500);
	});
	$(".servicesList a").not(".active").mouseover(function() {
		$(this).stop(true, true).animate({
			color: 'rgb(32,99,150)'
		}, 10);
	});
	$(".servicesList a").not(".active").mouseout(function() {
		$(this).stop(true, true).animate({
			color: 'rgb(107,107,107)'
		}, 2500);
	});
	$("#portfolioImgNav a").click(function(){
		var img = $(this).attr('href');
		$("#largeImage img").attr('src', img);
		return false;
	});
	$("a").click(function() {
		$(this).blur();
	});
	$("#servicesList a").mouseover(function(){
		$("#servicesGraphic").html('<img src="services/'+$(this).attr('rel')+'.jpg"/>');
	});
});
if (document.getElementById("map"))
	{
		google.load("maps", "2");
		google.setOnLoadCallback(function() {
			var map = new GMap2(document.getElementById("map"));
			map.setCenter(new GLatLng(52.953187,-1.141334), 18);
			map.setMapType(G_PHYSICAL_MAP );
			point = new GLatLng(52.953087,-1.141334);
			
			var myIcon = new GIcon(G_DEFAULT_ICON);
			myIcon.image = "images/nzime_pin.png";
			myIcon.iconSize = new GSize(58, 68);
			myIcon.shadow = "images/nzime_pin.png";
			myIcon.shadowSize = new GSize(58, 68);
			myIcon.iconAnchor = new GPoint(0, 68);
			myIcon.infoWindowAnchor = new GPoint(10, 14);
			myIcon.printImage = "images/nzime_pin.png";
			myIcon.mozPrintImage = "images/nzime_pin.png";
			myIcon.printShadow = "images/nzime_pin.png";
			myIcon.transparent = "images/nzime_pin.png";
			//myIcon.imageMap = [ 10,29, 1,16, 0,5, 5,0, 12,4, 18,2, 21,12, 21,16 ]; 
		
			var markerOptions = { icon:myIcon };
			map.addOverlay(new GMarker(point, markerOptions))
			map.setUIToDefault();
		});
	}