function checkForm(element) {
	var error = false;
	$(element).find("[required]").each(function(i) {
				if (this.value == '') {
					if (error != true)
						this.focus();
					$(this).addClass('error');
					error = true;
				} else
					$(this).removeClass('error');
			});
	if (error == true) {
		alert("Es wurden nicht alle benötigten Felder ausgefüllt!");
		return false;
	} else {
		return true;
	}
}
$(function() {
	$(".needs_js").css('display', 'block');
	$("body").addClass("script").removeClass("noscript");
	if($().fancybox) $(".fancybox, .fancybox a").fancybox();
	
	$(".included_album").each(function(){
		var id = "album"+rand(0,1000);
		$(this).find("li a").attr("rel", id).fancybox();
	});

	
});

function rand (min, max) {
	return Math.floor(Math.random() * (max - min + 1)) + min;
}
