// deze editie slider
$(document).ready(function() {					   
	// put all your jQuery goodness in here.
	AANTAL = 0;
	pf = $("#contentscroll li").each(function(i){
		$(this).attr("id", "itemid"+i);
		AANTAL = i;
	});
	
	if(AANTAL != 0){
		$("#contentscroll li").hide();
		$("#contentscroll li#itemid0").show();
		$("#contentscroll li#itemid1").show();
		$("#contentscroll li#itemid2").show();
		$("#contentscroll li#itemid3").show();
		$("#contentscroll li#itemid4").show();
		$("#contentscroll li#itemid5").show();
		$("#contentscroll li#itemid6").show();
		
		if(AANTAL > 2){
			deTijd = setInterval("showHideJobs()", 5000 );
		}
	}
});

nowShow = 7;
nowHide = 0;
function showHideJobs(){
	$("#contentscroll li#itemid" + nowHide).slideUp();
	$("#contentscroll li#itemid" + nowShow).slideDown();
	
	nowShow++;
	nowHide++;
	
	if(nowShow > AANTAL){
		nowShow = 0;
	}
	
	if(nowHide > AANTAL){
		nowHide = 0;
	}
}


/* goSetHeight */
function goSetHeight(dit){	

	var maximaHeight = 0;
	
	$(dit).each(function(){
							   
		nuHeight = $(this).height();
		if(nuHeight > maximaHeight){
			
			maximaHeight = $(this).height();
		}
		
	});

	$(dit).each(function(){
		$(this).height(maximaHeight);
	});
	
};

// submit form
function submitMe(formId){
	$(formId).submit();
}


// show hide add
function showAdd(){
	$.fancybox({
		'href' 			: '#add',
		'padding'		: 0,
		'scrolling'		: 'no',
		'vautoDimensions': false,
		'titleShow'		: false,
		'onClosed'		: function() {
			$("#add").hide();
		}
	});

}
