function checkForm(element) {
	var error = false;
	$(element).find("[required=true]").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');

			$("#rewards div").hide();
			$("#rewards div").eq(0).show();
			window.setInterval(function() {
						$("#rewards div").each(function() {
							if ($(this).css('display') == 'block') {
								cur_index = $("#rewards div").index(this);
								$(this).fadeOut("slow", function() {
									if ($("#rewards div").length == cur_index
											+ 1)
										$("#rewards div").eq(0).fadeIn();
									else
										$("#rewards div").eq(cur_index + 1)
												.fadeIn();
								});
							}

						});

					}, 8000);

			$("#navigation ul ul:not(.current)").css('display', 'none');
			
			$("#navigation ul li a:not(ul ul li a)").click(function(){
				$li = $(this).parent();
				$ul = $li.children("ul");
				if ( $ul.length == 1)
				{
					$("#navigation ul ul").not($ul).slideUp();
					if ($li.attr("jumpto")!="true")
					{
						$ul.slideToggle();
						return false;
					}
					else
						return true;
					
					
					
				}
				else
				{
					return true;
				}
			});
			

		});
