function changeImg(img_src, img_id)
{
	src = img_src;	
	$('#'+img_id).attr("src", src);
}

function slideSwitch() {
    var $active = $('#slideshow IMG.active');

    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');

    // use this to pull the images in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $('#slideshow IMG:first');
    // uncomment the 3 lines below to pull the images in random order
    
    // var $sibs  = $active.siblings();
    // var rndNum = Math.floor(Math.random() * $sibs.length );
    // var $next  = $( $sibs[ rndNum ] );

    if ($active.next().length != 0){
	    $active.addClass('last-active');
	
	    $next.css({opacity: 0.0})
	        .addClass('active')
	        .animate({opacity: 1.0}, 1000, function() {
	            $active.removeClass('active last-active');
	        });
    }
}

function sendInformatie()
{
	naam_v = $('#Naam').val();
	e_mail_v = $('#E-mail').val();
	telefoon_v = $('#Telefoon').val();
	vragen_v = $('#Vragen').val();
	if (naam_v == '' || naam_v == 'Naam' || 
		e_mail_v == '' || e_mail_v == 'E-mail' ||
		telefoon_v == '' || telefoon_v == 'Telefoon' || 
		vragen_v == '' || vragen_v == 'Vragen of opmerkingen'
	    ) 
		{
		  $('#error_form_out').slideDown('slow');
		}
	else{
		 $('#error_form_out').slideUp('slow');
		 $.ajax({
				type: "POST",
				url: "parts/send_informatie.php",
				data: "naam="+naam_v+"&e_mail="+e_mail_v+"&telefoon="+telefoon_v+"&vragen="+vragen_v,
				success: function(html){								
					$('#information_form').html(html);			 		
				}
			})
		}
}
function checkValue(field)
{		
	cur_v = $('#'+field).val();	
	if (!cur_v) cur_v = $('#Vragen').val();
	if (cur_v == field || cur_v == 'Vragen of opmerkingen') $('#'+field).val('');
}

function placeDefaultImg()
{
	
}
