// Google Mapping Location
function load() {
	if (GBrowserIsCompatible()) {
	var map = new GMap2(document.getElementById("map"));
	map.setCenter(new GLatLng(-37.853102,144.992323), 15);
	var marker = new GMarker(new GLatLng(-37.853102,144.992323));
	map.addOverlay(marker);
	map.addControl(new GSmallMapControl());
	}
}


// Scroll Functionality   
$(document).ready(function(){
  $('a[href*=#]').click(function() {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
    && location.hostname == this.hostname) {
      var $target = $(this.hash);
      $target = $target.length && $target
      || $('[name=' + this.hash.slice(1) +']');
      if ($target.length) {
        var targetOffset = $target.offset().top;
        $('html,body')
        .animate({scrollTop: targetOffset}, 1000);
       return false;
      }
    }
  });
});


// Mail Form                   
$(document).ready(function(){

$("#ajax-contact-form").submit(function(){
	var str = $(this).serialize();
		$.ajax({
        type: "POST",
        url: "/mailform/contact.php",
        data: str,
        success: function(msg){
                
        $("#note").ajaxComplete(function(event, request, settings){
            
			if(msg == 'OK') // Message Sent? Show the 'Thank You' message and hide the form
				{
				result = '<div class="notification_ok">Your message has been sent. Thank you!</div>';
				$("#fields").hide();
				}
				
				else
				{
				result = msg;
				}
				
				$(this).html(result);
				
				});
				
			}
            
		});
            
   		 return false;
            
    });
            
});
            
