
	function addEvent(obj, evType, fn){
		if (obj.addEventListener){
			obj.addEventListener(evType, fn, false);
			return true;
		}else if (obj.attachEvent){
			var r = obj.attachEvent("on"+evType, fn);
			return r;
		}else{
			return false;
		}
	}
	
	
    function Gmapload() {
      if (GBrowserIsCompatible()) {
		var coords = new GLatLng(-37.928392,145.11599)
		var coords_marker = new GLatLng((-37.928392*1.000004),(145.11599*0.9999996))
        var map = new GMap2(document.getElementById("map"));
		map.addControl(new GSmallMapControl());
		var marker = new GMarker(coords_marker);
        map.setCenter(coords, 15);
		map.addOverlay(marker);
		
      }
    }
		
		
		$(function() {
 	$("body").addClass("js")
	
	if($.browser.msie && $.browser.version<7){
		var $pngs = $("img[src='.png']");
		if($pngs.length>0){ $pngs.ifixpng(); }
	}

	$("#navigation > ul").superfish({delay: 500, speed: 'fast', dropShadows: false });
	
	
	
	if($("#images_swf").length==1){
		swfobject.embedSWF("images.swf", "images_swf", 180, 160, "9.0.0", null, {max:5,imgDir:encodeURIComponent("photos/slides/"),imgName:"slide",imgSufx:"_l",imgStart:0,fadeTime:3,fadeDelay:2000,imgNamePad:1},{wmode:"transparent"});
	}
	
	if($("#map").length==1){
		
		addEvent(window, "load", Gmapload);
		addEvent(window, "unload", GUnload);
	
		
	}
	
	
	$("a[title^='View photo: ']").each(function(){
		var newtitle = String($(this).attr('title')).substring(String("View photo: ").length);
		$(this).attr('title',newtitle);
		$(this).colorbox({transition:'fade', speed:500});
	});
	
	$("a[title^='New Window: ']").each(function(){
		var newtitle = String($(this).attr('title')).substring(String("New Window: ").length);
		$(this).attr('title',newtitle);
		$(this).click(function(){ var newwin = window.open($(this).attr('href'),'newwin'); newwin.focus(); return false; });
	});
	
 })
