$(function() {
	
	$('.afbeeldingfader .wrapper').cycle({
		fx: 'fade',
		cleartype: false
	});
	$('#wat .wrapper').cycle({
		fx: 'fade',
		cleartype: false
	});
	cleartype: false

	$("ul.toplevel > li").mouseenter(function() {
		if($(this).children("ul").size()) {
			if($(this).children("ul").css("display") != "block") {
				$(this).children("ul").show("blind");
				$(this).children('a').addClass('sub');
			}
		}
	}).mouseleave(function() {
		if($(this).children("ul").css("display") == "block") {
			$(this).children("ul").hide("blind");
			$(this).children('a').removeClass('sub');
		}
	});
	
	$(".solicitatieclick").click(function() {
		$(".sollicitatie").toggle();
		
	});
	
	//placeholder support
	function supports_input_placeholder() {
		var i = document.createElement('input');
		return 'placeholder' in i;
	}

	if(!supports_input_placeholder()){
		$("input[placeholder],textarea[placeholder]").each(function(){
		   
		   var self = this;
		   var $self = $(self);
		   var placeholder = $self.attr("placeholder");
		   
		   if(self.value == '')
				self.value = placeholder;
		   $self.bind("focus",function(){
				if(self.value == placeholder)
					self.value = "";
		   }).bind("blur",function(){
				if(!self.value.length)
					self.value = placeholder;
		   });
		   
		   $self.parents('form').submit(function(){
				if(self.value == placeholder)
					self.value = '';
		   });
		   
		});
	}
		
});
