$(document).ready(function() {
	$("#validate").validate({
		rules: {
			nospam_pflicht: {
				required: true,
				remote: "/nospam/process.php"
			}
		},
		errorPlacement: function(error, element) {
			if (element.attr("type") == "radio" || element.attr("type") == "checkbox" ){
				if(element.parent().parent().is("li")){
					element.parent().parent().append(error);
				}
				else {
					element.parent().parent().prepend(error);
				}
			}
			else {
				error.insertAfter(element);
			}
		}
	})
	$(function() {
		$('.datepicker').datepicker({
			numberOfMonths: 3,
			showButtonPanel: true,
			changeMonth: true,
			changeYear: true,
			yearRange: 'c-10:c+10'
		});
	});
	$(function() {
		$('.datepicker2').datepicker({
			numberOfMonths: 3,
			showButtonPanel: true,
			changeMonth: true,
			changeYear: true,
			yearRange: 'c-10:c+10'
		});
	});
	$(function() {
		$('.datepickerGeb').datepicker({
			numberOfMonths: 3,
			showButtonPanel: true,
			changeMonth: true,
			changeYear: true,
			yearRange: 'c-100:c+10'
		});
	});
});
