// ### Suchfeld ###

function clearField(obj, search_def_str){

	if(obj.value == search_def_str){

	  obj.value = "";

	}

}

function showDefault(obj, search_def_str){

	if(obj.value == ""){

	  obj.value = search_def_str;

	}

}



$(function() {
	
	// Slider (Head) ###############################################################	
	
$(".slider .n").tabs(".slider .s > div", {

	// enable "cross-fading" effect
	effect: 'fade',
	
	fadeInSpeed: "slow",
	fadeOutSpeed: 0,

	// start from the beginning after the last tab
	rotate: true

// use the slideshow plugin. It accepts its own configuration
}).slideshow({
	interval: 4000,
	autoplay: true,
	clickable: false
	
	});	

var iDiv = $(".slider .s > div > div");
if(iDiv){
	showiDiv = function(){
		iDiv.fadeIn();	
	}
	$(".slider .s > div > div").hide();
	var t=setTimeout("showiDiv()",500);	
}	

//$("img.b").hide();
//$("img.b").fadeIn();	


	// Fancy Box ###############################################################
	if($("a#single_image").length){
		$("a#single_image").fancybox({
			'zoomOpacity' : true,
			'zoomSpeedIn': 400,
			'zoomSpeedOut': 400,
			'overlayOpacity': 0.7,
			'overlayColor': '#000',
			'overlayShow': true
		}); 
	}
	
	if($("a#inline800").length){
		$("a#inline800").fancybox({
			'hideOnContentClick': true,
			'overlayColor': '#000',
			'overlayOpacity': 0.7,
			'frameWidth': 800,
			'frameHeight': 600
		}); 
	}
	
	if($("a.group").length){
		$("a.group").fancybox({
			'zoomOpacity' : true,
			'overlayColor': '#000',
			'overlayOpacity': 0.7,
			'zoomSpeedIn': 400,
			'zoomSpeedOut': 400,
			'overlayShow': true
		}); 
	}
	
	if($("a.lightBox").length){
		$('a').lightBox(); // Select all links in the page
	}
	
	/*
	$(window).resize(function() {
		adjustStyle($(this).height());
	});
	adjustStyle(window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight);
	*/
		
});

