/***********************
*  Site Specific JS   *
************************/

$('.match').matchHeight();
$('#view_section_1').insertAfter('#slider'); 

$(document).ready(function(){ 
  $.favicon('http://cdn.myld.com.au/2/132/curryup-window-cleaning_8106d0346f.ico');
  menu.contactDetails({
    mobile: '0408739429',
    email:'Peter@curryupwindowcleaning.com.au'
  });
   
  $('.flexslider').flexslider({
    randomize: true,
    controlNav: false 
  });
    
  $('.matchp').matchHeight();
  
  
  $('#custom_form').formValidation({ 
    validateText: ["name"],
    validateEmail: ["email"],
    validateSpam: true
  }); 
});
 
$(window).load(function(){ 
  setTimeout(function(){
    $('.page-title').addClass('animated pulse');  

  }, 0)
});  

function map() {
  var myLatlng = new google.maps.LatLng(-16.92033, 145.77085);
  var mapOptions = {
    zoom: 13,
    center: myLatlng,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  }
  
  if ($('#map').length > 0) {
      var map = new google.maps.Map(document.getElementById('map'), mapOptions);
    
      var marker = new google.maps.Marker({
          position: myLatlng,
          map: map 
      });
      
      google.maps.event.addDomListener(window, 'resize', function() {
			map.setCenter(myLatlng);
	  });         
      google.maps.event.addDomListener(window, 'orientationchange', function() {
			map.setCenter(myLatlng);
	  });   
	}
}
$(window).load(function(){
	map();
});