window.addEvent('domready', function(){
$('content_wrap').set('morph', {
				duration: 600
			}).set('opacity', 0.7);
    
	
     $('wrapper').addEvents
            ({


		mouseenter:

            function(){
               
               $('content_wrap').morph({
				'opacity': 1
               

			});



		},
		mouseleave: function(){

               $('content_wrap').morph({
				'opacity': 0.7
			
			});
		}
	});

//Klappmenü links

    	$('nav2').set('tween', {
				duration: 1500,
                transition: Fx.Transitions.Expo.easeOut // This could have been also 'bounce:out'
			}).set('opacity', 0.8).addEvents({
		mouseenter: function(){
				$('nav2').tween(
                      'margin-left','5%');
                 $('nav2').morph({
				'opacity': 1

			});



		},
		mouseleave: function(){
				$('nav2').tween(

                    'margin-left','-90%');
               $('nav2').morph({
				'opacity': 0.8
			});
		}
	});
//Hauptnavigation Bewegungen ect.

    $('naavi1').set('morph', {duration: '400'}).set('tween', {duration: 1100, transition: Fx.Transitions.Expo.easeOut}).set('opacity', 0.8).addEvents({
		mouseenter: function(){
				$('nav1').tween('height','60%'),
                 $('nav1').morph({
				'opacity': 1
			}),
             $('naavi1').morph({
				'opacity': 1
                 
         
			});
		},
		mouseleave: function(){
				$('nav1').tween('height','25%');
               $('nav1').morph({
				'opacity': 0.8
				

			}),
                $('naavi1').morph({                  
          
                 'opacity': 0.8})

		}
	});
    	$('naavi2').set('tween', {
				duration: 1500,
                transition: Fx.Transitions.Expo.easeOut // This could have been also 'bounce:out'
			}).set('opacity', 0.8).addEvents({
		mouseenter: function(){
				$('nav1').tween(
                      'height','60%');
                 $('nav1').morph({
				'opacity': 1
                  
			});
                $('naavi2').morph({
				'opacity': 1
                

			});
		},
		mouseleave: function(){
				$('nav1').tween(

                    'height','25%');
               $('nav1').morph({
				'opacity': 0.8
			});
                $('naavi2').morph({
				'opacity': 1

			});
		}
	});
$('naavi3').set('tween', {
				duration: 1500,
                transition: Fx.Transitions.Expo.easeOut // This could have been also 'bounce:out'
			}).set('opacity', 0.6).addEvents({
		mouseenter: function(){
				$('nav1').tween(
                      'height','60%');
                 $('nav1').morph({
				'opacity': 1,
                   'background-color': '#faf7ea'
			});
                $('naavi3').morph({
				'opacity': '1',
                  'font-size': '17%'

			});
		},
		mouseleave: function(){
				$('nav1').tween(

                    'height','25%');
               $('nav1').morph({
				'opacity': 0.8
			});
                $('naavi3').morph({
				'opacity': 1
			});
		}
	});
    	$('naavi4').set('tween', {
				duration: 1500,
                transition: Fx.Transitions.Expo.easeOut // This could have been also 'bounce:out'
			}).set('opacity', 0.6).addEvents({
		mouseenter: function(){
				$('nav1').tween(
                      'height','60%');
                 $('nav1').morph({
				'opacity': '1',
                   'background-color': '#faf7ea'
			});
                $('naavi4').morph({
				'opacity': '1',
                  'font-size': '17%'

			});
		},
		mouseleave: function(){
				$('nav1').tween(

                    'height','25%');
               $('nav1').morph({
				'opacity': '0.6',
				 'background-color': '#faf7ea'
			});
                $('naavi4').morph({
				'opacity': '1',
                  'font-size': '16%'

			});
		}
	});


	
	// The same as before: adding events
	$('naavi1').addEvents({
		'mouseenter': function()
            {
			$('top_navi_overlay1').set('morph', {duration: '1200'}).set('opacity', 0.0).morph({
				'opacity': 1,
                'background-color': '#faf7ea'
		});
            },
		'mouseleave': function(){
			// Resets the tween and changes the element back to its original size
			$('top_navi_overlay1').set('morph', {duration: '400'}).morph({
				'opacity': 0
		});
		}
	});
	$('naavi2').addEvents({
		'mouseenter': function()
            {
			$('top_navi_overlay2').set('morph', {duration: '1200'}).set('opacity', 0.0).morph({
				'opacity': 1
		});
            },
		'mouseleave': function(){
			// Resets the tween and changes the element back to its original size
			$('top_navi_overlay2').set('morph', {duration: '400'}).morph({
				'opacity': 0
		});
		}
	});
		$('naavi3').addEvents({
		'mouseenter': function()
            {
			$('top_navi_overlay3').set('morph', {duration: '1200'}).set('opacity', 0.0).morph({
				'opacity': 1
		});
            },
		'mouseleave': function(){
			// Resets the tween and changes the element back to its original size
			$('top_navi_overlay3').set('morph', {duration: '400'}).morph({
				'opacity': 0

		});
		}
	});

	$('naavi4').addEvents({
		'mouseenter': function()
            {
			$('top_navi_overlay4').set('morph', {duration: '1200'}).set('opacity', 0.0).morph({
				'opacity': 1
		});
            },
		'mouseleave': function(){
			// Resets the tween and changes the element back to its original size
			$('top_navi_overlay4').set('morph', {duration: '400'}).morph({
				'opacity': 0
		});
		}
	});

   
$('warning_button').addEvents({
		click: function(){
				$('warning').set('tween', {
				duration: 900,
                transition: Fx.Transitions.Expo.easeIn // This could have been also 'bounce:out'
			}).tween(
                      'margin-top','-1000px');
               

			}
            });



	});
