// submit
function submitMe(dit){
	$(dit).submit();
}

$(document).ready(function() {
	$("#subscription").validate();
});

// suckerfish dropdown
sfHover = function() {
	var sfEls = document.getElementById("taalkeuze").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);


// 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);
	});
	
};
