jQuery(document).ready(function(){

	// Open external links in new window without using html target attribute
	jQuery('a.external, .field-type-file a').click(function(){
		window.open(this.href);
		return false;
	});
	
});
;
jQuery(document).ready(function(){
	if(jQuery('#node-38').length > 0)
	{
		jQuery('#node-38 .field-name-body .field-item').append('<div id="map"><div id="gmap"></div></div><div class="clr"></div>');
		
		var myLatlng = new google.maps.LatLng(51.656378,3.92111);
		
		var myOptions = {
			
		  zoom: 14,
		  center: myLatlng,
		  mapTypeId: google.maps.MapTypeId.ROADMAP
		}
		
		var map = new google.maps.Map(document.getElementById("gmap"), myOptions);
		
		var contentString = '<div id="content">'+
		    '<div id="mapInfo">'+
		    '</div>';
		
		var infowindow = new google.maps.InfoWindow({
		    content: contentString
		});
		
		var marker = new google.maps.Marker({
		    position: myLatlng,
		    map: map,
		    title:"Steutel"
		});
		
		google.maps.event.addListener(marker, 'click', function() {
		  //infowindow.open(map,marker);
		});
	}


	
	
	

});;
/**
 * Tijdseenheden in milliseconden
 * 1000 = 1 seconde
 */

var timeout = 5000; /* tijd tussen slide */
var speed 	= 1000; /* snelheid van wissel animatie */


jQuery(document).ready(function(){
	
	/* get dimensions */
	var height 	= jQuery('.view-slideshow .views-row img').first().height();
	var width 	= jQuery('.view-slideshow .views-row img').first().width();
	
	var total 	= jQuery('.view-slideshow .views-row').length;
	
	var current_slide = 1;
	
	/* set dimensions */
	jQuery('.view-slideshow').width(width);
	jQuery('.view-slideshow').height(height);
	
	jQuery('.view-slideshow .views-row img').each(function(){
		jQuery(this).height(height);
		jQuery(this).width(width);
		jQuery(this).css('position','absolute');
		jQuery(this).hide();
	});
	
	jQuery('.view-slideshow .views-row img').first().show(1);
	
	var timer 		= setTimeout(changeSlide, timeout);
	var next_slide 	= 1;
	
	function changeSlide(){
		timer = setTimeout(changeSlide, timeout);

		if(current_slide == total)
		next_slide = 1;
		else
		{
			next_slide++;	
		}
					
		jQuery('.view-slideshow .views-row-'+current_slide+' img').fadeOut(speed);
		jQuery('.view-slideshow .views-row-'+next_slide+' img').fadeIn(speed);
		
		current_slide = next_slide;
		
		
	}
	
});

;

