function projecten() {
    naam = $('#zoekleden').val();
    id = $('#idZoeken').val();
    $.get("projecten.php", { naam: naam, id: id },
       function(data){
        $('#projecten').html(data);
    });
}

$(document).ready(function()
{
    var a = function(self){
        self.anchor.fancybox();
    };
    
    $('#zoekleden').live('keyup', projecten);

    $("#pikame").PikaChoose({
        autoPlay:false,
        transition:[0],
        showCaption: false,
        speed:50,
        text:{previous:"", next:""},
        buildFinished:a
    });
    
    $(".validateForm").validate({
        errorPlacement: function(error, element) {
			error.prependTo( element.parent().next() );
		},
		// set this class to error-labels to indicate valid fields
		success: function(label) {
			// set &nbsp; as text for IE
			label.html("&nbsp;").addClass("checked");
		}
    });
    
    $.validator.messages.required = ""; 
    $("#contactForm").validate({});
    
    $('.hasSubmenu').mouseover(function() {
        $(this).children('ul').show();
    });
    
    $('.hasSubmenu').mouseout(function() {
        $(this).children('ul').hide();
    });
    
	$("a[rel='lightbox']").colorbox();
    
    $('.innerfade').innerfade({
		speed: 750,
		timeout: 5000,
		type: 'random'
	});
});
