ddsmoothmenu.init({
	 mainmenuid: "smoothmenu",
	 orientation: 'h',
	 classname: 'ddsmoothmenu', 
	 contentsource: "markup" 
	});

$(document).ready(function() {
    
	$('.slideshow').cycle({
		fx: 'fade'
	});
	
	$('.hide_init').removeClass();
	
	$(".single_image").fancybox();
	$(".single_image2").fancybox();
	
	
	
	$('.leesmeer').click(function () 
	{
		var obj = $(this).parents('.partner').find('.vervolgtekst');
		
		if (obj.css('display')=='none')
		{
			obj.slideDown();
			$(this).find('a').addClass('active'); 	
		}
		else
		{
			obj.slideUp();
			$(this).find('a').removeClass('active');
		}
		
	});
	
	if(jQuery("#map_canvas").length != 0)
	{
			var geocoder;
	  		var map;
	  		
	  		function initialize() {
		    	geocoder = new google.maps.Geocoder();
		    	var latlng = new google.maps.LatLng(-34.397, 150.644);
		    	var myOptions = {
		      		zoom: 15,
		      		center: latlng,
		      		mapTypeId: google.maps.MapTypeId.ROADMAP
		    		}
		    	map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
	  		} 		
	
			initialize();			
	   		codeAddress();   		
	   		
	}

	function codeAddress() 
	{
	    //var address = 'Neerkantseweg 24, Liessel';
	    var address = $('.map_address').html();
	    var image = new google.maps.MarkerImage('/dancepoint.nl/img/beachflag.png',
	      // This marker is 20 pixels wide by 32 pixels tall.
	      new google.maps.Size(50, 44),
	      // The origin for this image is 0,0.
	      new google.maps.Point(0,0),
	      // The anchor for this image is the base of the flagpole at 0,32.
	      new google.maps.Point(25, 55));
	  	  var shadow = new google.maps.MarkerImage('/dancepoint.nl/img/beachflag_shadow.png',
	      // The shadow image is larger in the horizontal dimension
	      // while the position and offset are the same as for the main image.
	      new google.maps.Size(65, 28),
	      new google.maps.Point(0,0),
	      new google.maps.Point(20, 35));
	
	    
	    if (geocoder) 
	    {
	    	geocoder.geocode( { 'address': address}, function(results, status) 
	      	{
	      		if (status == google.maps.GeocoderStatus.OK) 
	        	{
	        		map.setCenter(results[0].geometry.location);
	          		var marker = new google.maps.Marker({
	              		map: map, 
	              		position: results[0].geometry.location,
	              		shadow: shadow,
	              		icon: image
	          		});
	        	} 
	        	else 
	        	{
	          		alert("Geocode was not successful for the following reason: " + status);
	        	}
	      	});
	    }
	}

	
});



