
/*!
 * JavaScript Funktionen zum Öffnen des Vorhangs
 * 
 */
 
$(document).ready(function() {
		
			$vorhangoffen = false;
		
			$(".kordel").click(function(){
				$(this).blur();
				if ($vorhangoffen == false){ 
					$(this).stop().animate({top: '0px' }, {queue:false, duration:350, easing:'easeOutBounce'}); 
					$(".vorhanglinks").stop().animate({width:'60px'}, 2000 );
					$(".vorhangrechts").stop().animate({width:'60px'},2000 );
					$vorhangoffen = true;
					
					$("#logo").fadeOut(2000);
					$('#introDialog').toggle();
									
				}else{
					$(this).stop().animate({top: '-40px' }, {queue:false, duration:350, easing:'easeOutBounce'}); 
					$(".vorhanglinks").stop().animate({width:'50%'}, 2000 );
					$(".vorhangrechts").stop().animate({width:'51%'}, 2000 );
					$vorhangoffen = false;
					
					$('#logo').fadeIn(3000);
					
					$('#introDialog').toggle();
				}
				return false;
			});
			
		$(".logo").click(function(){
				$(".kordel").blur();
				if ($vorhangoffen == false){ 
					$(".kordel").stop().animate({top: '0px' }, {queue:false, duration:350, easing:'easeOutBounce'}); 
					$(".vorhanglinks").stop().animate({width:'60px'}, 2000 );
					$(".vorhangrechts").stop().animate({width:'60px'},2000 );
					$vorhangoffen = true;
					
					$("#logo").fadeOut(2000);
					$('#introDialog').toggle();
									
				}else{
					$(".kordel").stop().animate({top: '-40px' }, {queue:false, duration:350, easing:'easeOutBounce'}); 
					$(".vorhanglinks").stop().animate({width:'50%'}, 2000 );
					$(".vorhangrechts").stop().animate({width:'51%'}, 2000 );
					$vorhangoffen = false;
					
					$('#logo').fadeIn(3000);
					
					$('#introDialog').toggle();
				}
				return false;
			});			
			
			
			
var spotanimation = function() {
	
//$("#spot").click(function(){	
	$('#spot').animate({
        path: new $.path.arc({
            center: [0, 780],
            radius: 1000,
            start: 200,
            end: 160,
            dir: -1
        }),
        opacity: '1'
	},2000, 'linear');
	
	$('#spot').animate({
        path: new $.path.arc({
            center: [0, -1100],
            radius: 1000,
            start: 20,
            end: 340,
            dir: -1
        }),
        opacity: '1'
    },2000, 'linear');
};	

	$("#spot").click(function(){	spotanimation() });
			
});	  //// ende ready

		
		
		
function vorhang_auf() {	
	$vorhangoffen = false;
	$(".kordel").blur();
	if ($vorhangoffen == false){ 
		$(".kordel").stop().animate({top: '0px' }, {queue:false, duration:350, easing:'easeOutBounce'}); 
		$(".vorhanglinks").stop().animate({width:'60px'}, 2000 );
		$(".vorhangrechts").stop().animate({width:'60px'},2000 );
		$vorhangoffen = true;
		
		$("#logo").fadeOut(2000);
		$('#introDialog').toggle();
		
	}
	return false;
};	
		
function vorhang_zu(alink)  {
		$(".kordel").stop().animate({top: '-40px' }, {queue:false, duration:350, easing:'easeOutBounce'}); 
		$(".vorhanglinks").stop().animate({width:'50%'}, 500 );
		$(".vorhangrechts").stop().animate({width:'51%'}, 500 );
		$vorhangoffen = false;
		window.setTimeout("naechste_seite_laden('" +alink.href+"')", 500);	
		
		//spotanimation();
		
		$('#logo').fadeIn(500);
		$('#introDialog').toggle();
		
		return false;		
};

function naechste_seite_laden(page) {

window.open(page, "_self");

};


/*
* 
* 
* 
*/
	
function doit(auswahl) {
	$('#'+auswahl+'1').toggle();
	$('#'+auswahl+'2').toggle();
};

$(document).ready(function() {

$('#book1').click(function() { doit("book"); });

$('#book2').click(function() { doit("book"); });

$('#book1').mouseenter(function() {
	doit("book");
}).mouseleave(function(){
	doit("book");
});

$('#book2').mouseenter(function() {
	doit("book");
}).mouseleave(function(){
	doit("book");
});

/* HOME */
$('#home1').click(function() { doit("home"); });

$('#home2').click(function() { doit("home"); });

$('#home1').mouseenter(function() {
	doit("home");
}).mouseleave(function(){
	doit("home");
});

$('#home2').mouseenter(function() {
	doit("home");
}).mouseleave(function(){
	doit("home");
});

/* Links */
$('#links1').click(function() { doit("links"); });

$('#links2').click(function() { doit("links"); });

$('#links1').mouseenter(function() {
	doit("links");
}).mouseleave(function(){
	doit("links");
});

$('#links2').mouseenter(function() {
	doit("links");
}).mouseleave(function(){
	doit("links");
});

/* Termine */
$('#termine1').click(function() { doit("termine"); });

$('#termine2').click(function() { doit("termine"); });

$('#termine1').mouseenter(function() {
	doit("termine");
}).mouseleave(function(){
	doit("termine");
});

$('#termine2').mouseenter(function() {
	doit("termine");
}).mouseleave(function(){
	doit("termine");
});

/* Gästebuch */
$('#gaestebuch1').click(function() { doit("gaestebuch"); });

$('#gaestebuch2').click(function() { doit("gaestebuch"); });

$('#gaestebuch1').mouseenter(function() {
	doit("gaestebuch");
}).mouseleave(function(){
	doit("gaestebuch");
});

$('#gaestebuch2').mouseenter(function() {
	doit("gaestebuch");
}).mouseleave(function(){
	doit("gaestebuch");
});

/* Archiv */
$('#archiv1').click(function() { doit("archiv"); });

$('#archiv2').click(function() { doit("archiv"); });

$('#archiv1').mouseenter(function() {
	doit("archiv");
}).mouseleave(function(){
	doit("archiv");
});

$('#archiv2').mouseenter(function() {
	doit("archiv");
}).mouseleave(function(){
	doit("archiv");
});

/* Kontakte */
$('#kontakte1').click(function() { doit("kontakte"); });

$('#kontakte2').click(function() { doit("kontakte"); });

$('#kontakte1').mouseenter(function() {
	doit("kontakte");
}).mouseleave(function(){
	doit("kontakte");
});

$('#kontakte2').mouseenter(function() {
	doit("kontakte");
}).mouseleave(function(){
	doit("kontakte");
});

});  /*  $(document).ready(function() { ENDE */

	function internstart() {
		Check = prompt("Geben Sie Ihr Passwort "+unescape("f%FCr")+" diese interne Seite ein.","Falscher italienischer Vorname vom Mann zurzeit in Hawaii.");
		
		if (Check != '' && Check != null) {
			if(Check.toLowerCase() != "aldo") {
				window.location.href="termine.html";
				alert("Falsches Kennwort eingegeben!");
			}
		} else {
			window.location.href="termine.html";
		}
   };
   
