externalLinks();

if (typeof jQuery != 'undefined') {
	$(document).ready(function() {

		// Validation
		if($('.validate').size()) {
			$(".validate").validate({
				errorLabelContainer: $("#errorContainer")
			});

			// Add error title
			$('#errorContainer').html('<h3 class="error">De volgende fouten zijn opgetreden:</h3>');

			// add an * after required fields
			$('input.required, select.required, textarea.required').each(function(){
				$('label[for='+$(this).attr('id')+']').append(' *');
			});
		}

		//Init visual scroller on the homepage
		$('.scrollable')
			.scrollable({
				circular:true,
				speed:600,
				keyboard:false
			}).navigator().autoscroll(5000);


	});
}
