// JavaScript Document

$(document).ready(function() {	
	
	/*
	var inprog_steuer = 0;
	$("#steuer.grey_button").hover(function() {
		 if (inprog_steuer == 0) {
			 inprog_steuer = 1;
			 $('#start_steuerrechner').animate({
				height:'142px'
			});
	
			$('#steuer.grey_button').animate({
				top:'-142px'
			});
		 }
	}, function() {
		$('#start_steuerrechner').animate({
			height:'0px'
		});
		
		$('#steuer.grey_button').animate({
			top:'0px'
		},function(){
			inprog_steuer = 0;	
		});		 
	});
	
	
	var inprog_suche = 0;
	$("#suche.grey_button").hover(function() {
		 if (inprog_suche == 0) {
			 inprog_suche = 1;
			 $('#start_objektsuche').animate({
				height:'142px'
			});
	
			$('#suche.grey_button').animate({
				top:'-142px'
			});
		 }
	}, function() {
		$('#start_objektsuche').animate({
			height:'0px'
		});
		
		$('#suche.grey_button').animate({
			top:'0px'
		},function(){
			inprog_suche = 0;	
		});		 
	});	
	*/
	
	/*
	function loadSlideshow() {
		$('.slideshow').nivoSlider({
			effect:'fade',
			controlNav: false,
			animSpeed:500, 
			pauseTime:5000,
			directionNav: false,
			captionOpacity:1,			
			afterLoad: function(){
				
			}
		});		
	}
	
	
	loadSlideshow();
	*/
	
	$('.slideshow').nivoSlider({
		effect:'fade',
		controlNav: false,
		animSpeed:500, 
		pauseTime:5000,
		directionNav: false,
		captionOpacity:1,			
		afterLoad: function(){
			
		}
	});	
	
	$('#detail_lageplan').css('display','none');
	
	$('#gallery_link a').click(function(){		
		$('.detailnavi').removeClass('active');
		$('#gallery_link').addClass('active');
		$('#detail_lageplan').css('display','none');	
		$('#videos').css('display','none');
	});
	
	$('#map_link a').click(function(){
		$('.detailnavi').removeClass('active');
		$('#map_link').addClass('active');		
		$('#detail_lageplan').css('display','block');
		$('#videos').css('display','none');
		initializeGoogleMaps();
	});
	
	$('#video_link a').click(function(){
		$('.detailnavi').removeClass('active');
		$('#video_link').addClass('active');	
		$('#videos').css('display','block');
		$('#detail_lageplan').css('display','none');		
	});

});
