$(function(){
	
	  var geocoder;
	  var map;
	  function initialize() {
		geocoder = new google.maps.Geocoder();
		var myOptions = {
		  zoom: 12,
		  mapTypeId: google.maps.MapTypeId.ROADMAP
		}
		map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
		codeAddress();
	  }
		
	function codeAddress() {
		var address = $("#map").val();
		geocoder.geocode( { 'address': address}, function(results, status) {
		  if (status == google.maps.GeocoderStatus.OK) {
			map.setCenter(results[0].geometry.location);
			var image = 'images/map-mark.png';
			var marker = new google.maps.Marker({
				map: map,
				icon: image, 
				position: results[0].geometry.location
			});
		  } 
		});
  	}

	initialize();
	
	$('#slider').nivoSlider({
		slices:25,
        animSpeed:500,
        pauseTime:3000,
		directionNav:false,
		effect:'fold',
		controlNav:false
		});
		
});

