/* jQuery Funktionen */

$(document).ready(function(){
	
	$("a.fancy").fancybox
	(
		{ 		
			'zoomSpeedIn': 300, 		
			'zoomSpeedOut': 300, 		
			'overlayShow': false 	
		}
	);	
	
	$('#bildwechsel').cycle({ 
		fx:         'fade', 
		timeout:     3000, 
		pager:      '#bildnav', 
		pagerEvent: 'mouseover',
		pagerAnchorBuilder: function(idx, slide) {
			var imageBase = slide.src;	// get img url		
			var imageAlt = slide.alt;	// get alt tag		
			var imageTokenSmall = "-thumb"; // define thumbimage add
			var imageData = imageBase.split('.'); //string to array 
			var imageDataFiletype = imageData.pop(); //get filename and delete from array
			var imageSmall = imageData.join(".") + imageTokenSmall + '.' + imageDataFiletype; // build new url with thumbimage add
			return '<a href="#" class="id' + idx + '"><img src="' + imageSmall + '" width="79" height="42" alt="" /></a>'; // retrun ;)
		}		
	});
	
	

});

function formcheck() {
		var felder = "Bitte füllen Sie noch folgende Felder aus:\n\n";
				
		if (document.kontaktformular.email.value == "") 
		 { 
		felder = felder + "· E-Mail\n";
		 }
		 
		 if (document.kontaktformular.Name.value == "") 
		 { 
		felder = felder + "· Nachname\n";
		 }

		 if (document.kontaktformular.Text.value == "") 
		 { 
		felder = felder + "· Ihre Nachricht\n";
		 }
		if (felder != "Bitte füllen Sie noch folgende Felder aus:\n\n") {
		alert (felder);
		return false;  
		 }
		 }

