$(document).ready(function(){
hideReasons();
showReason('reason1');
$("img").pngfix();
$('#images-6reasons ul li').click(function(){
  var liClass = $(this).attr("class");
   hideReasons();
   showReason(liClass);
});
$('select.trainingmodules').change(function () {
          var str;
          str = $(this).val();
		  for(i=1;i<=3;i++){
		  $('.module'+i).hide();
		  if(str==i){
		  $('.module'+i).show();
		  }
		  }
              
        })
		
$('.board').click(function(){
$('.aboutus-team').hide();
$('.aboutus-board').show();
});
$('.team').click(function(){
$('.aboutus-board').hide();
$('.aboutus-team').show();
});
});

function hideReasons(){
for(i=1;i<=6;i++){
$('.reason'+i+'-heading-image').hide();
$('.reason'+i+'-text').hide();
}
}

function showReason(reason){
$('.'+reason+'-heading-image').show();
$('.'+reason+'-text').show();
}

	var map = null;
var geocoder = null;

function initialize() {
  if (GBrowserIsCompatible()) {
    map = new GMap2(document.getElementById("map_canvas"));
    map.setCenter(new GLatLng(-30.13668,135.56835), 3);
	map.setUIToDefault();
    geocoder = new GClientGeocoder();
  }
}

function showAddress(address,studioName) {
  if (geocoder) {
    geocoder.getLatLng(
      address,
      function(point) {
        if (!point) {
          //alert(address + " not found");
        } else {
          var marker = new GMarker(point);
		 GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowHtml('<div style="width:200px;min-height:100px;"><span style="color:#56017A;font-weight:bold;">'+studioName+'</span><br />'+address+'</div>');
          });
          map.addOverlay(marker);
          //marker.openInfoWindowHtml('<div style="width:200px;min-height:100px;"><span style="color:#56017A;font-weight:bold;">'+studioName+'</span><br />'+address+'</div>');
        }
      }
    );
  }
}

function showAddressOnClick(address,studioName) {
  if (geocoder) {
    geocoder.getLatLng(
      address,
      function(point) {
        if (!point) {
          alert(address + " not found");
        } else {
          var marker = new GMarker(point);
		  map.setCenter(point, 13);
		 GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowHtml('<div style="width:200px;min-height:100px;"><span style="color:#56017A;font-weight:bold;">'+studioName+'</span><br />'+address+'</div>');
          });
          map.addOverlay(marker);
          marker.openInfoWindowHtml('<div style="width:200px;min-height:100px;"><span style="color:#56017A;font-weight:bold;">'+studioName+'</span><br />'+address+'</div>');
        }
      }
    );
  }
}

	
