$(document).ready(				  				  
		
function() {
			$("#loginb").hide();
	$("#quicklogin").click(
		function() {
			$("#loginb").slideToggle("slow");
		}
	 );	
		
		/* LIGHTBOX */
		$('a[@href*=.jpg]').lightBox();
		$('a[@href*=.gif]').lightBox();
		$('a[@href*=.png]').lightBox();
		$('a[@href*=.JPG]').lightBox();
		$('a[@href*=.GIF]').lightBox();

		
		/* FORMULARE */
		$("input,select, textarea").focus(
			function(){
				$(this).addClass("focused");
			}
		);
		
		
		
		/* BEI VERLASSEN EINE FORMULAR FELDES  */
		$("input,select, textarea").blur(
			function(){
				$(this).removeClass("focused");		
				
				/* PRÜFE OB FELD KEINEN INHALT HAT UND PFLICHTFELD IST */
				if ( $(this).is("[@value=''][@name*='*']")) 				
						{
						/* MARKIERE ROT */
						$(this).addClass("falsch");
					}
						else {
						/* ENTFERNE ROTE MARKIERUNG */	
						$(this).removeClass("falsch");
			
				}
				/* WENN FELD AUSGEFÜLLT IST MARKIERE ES GRÜN */
				if ( $(this).is("[@value!='']")) 
							{
								$(this).addClass("richtig");	
							} 
							
							else {
								/* SETZE FELD ZURÜCK AUF GRAU */
								$(this).removeClass("richtig");
								/* AUSSER ES IST EIN PFLICHTFELD*, DANN ROT MARKIEREN */
								if ( $(this).is("[@name*='*']")) 
								{
									$(this).removeClass("falsch");
									$(this).addClass("falsch");
								}
								
							}
				/* FÜR ANREDE */
				if ( $(this).is("[@value*='Bitte']")) 
								{
									$(this).removeClass("richtig");
									$(this).removeClass("falsch");
									$(this).addClass("falsch");
								}
				if ( $(this).is("input[@type=submit]")) {
									$(this).removeClass("richtig");
									$(this).removeClass("falsch");
									
				}
			}
		);
	}
);

function checkSubmit() {
		/* MARKIERE ALLE NICHT AUSGEFÜLLTEN PFLICHTFELDER */
		$("input[@type=submit]").removeClass("richtig").removeClass("falsch");
		$("[@name*='*'][@value='']").addClass("falsch");
		$("select[@name*='*'][@value*='Bitte']").addClass("falsch");
	}

