﻿$(document).ready(function(){
 // initialize tooltip 
 $('.first').click(function(){
 $('#first').fadeOut('fast');
 $('#second').fadeIn('slow');
 return false;
 });
  $('.second').click(function(){
 $('#second').fadeOut('fast');
  $('#first').fadeIn('slow');
 return false;
 });
 $('h3').click(function(){
 $(this).next().toggle();
 }).css('width','200px').css('text-align','left').css('margin-left','200px').next().hide();
 $('h3').next().css('width','300px').css('margin-right','-40px').css('padding','0').parent().css('width','300px');
 $('a.lightbox').fancybox({'zoomSpeedIn':300,'zoomSpeedOut':300,'imageScale':true,'hideOnContentClick': false});
    $("#transporter .hover").tooltip({ 
     
        // use single tooltip element for all tips 
        tip: '.tooltip1',  
         
        // tweak the position 
       offset: [360, 390], 
        relative:true, 
        // use "slide" effect 
        effect: 'slide',
		onBeforeShow:function(){
		this.getTrigger().parent().parent().css('z-index','200');		
		this.getTrigger().css('z-index','200');
		$('#stoerer').fadeIn("slow");
		this.getTrigger().parent().parent().parent().find('div').css('z-index','200');
		$('#domina').css('z-index','50').find('img').css('z-index','50');
		$('#transporter_innen').css('z-index','50').find('img').css('z-index','50');
		},
		onShow: function() { 
        //this.getTrigger().attr('src','files/images/transporter_hover.png');

    },
		onHide:function(){
		//this.getTrigger().attr('src','files/images/transporter.png'); 
		$('#stoerer').fadeOut("slow");
		this.getTrigger().parent().parent().css('z-index','50');		
		this.getTrigger().css('z-index','50');
		}	
         
    // add dynamic plugin  
    });
		
		$("#domina .hover").tooltip({ 
     
        // use single tooltip element for all tips 
        tip: '.tooltip2',  
         
        // tweak the position 
        offset: [270, 100], 
        //position:'center left', 
		relative:true,
        // use "slide" effect 
        effect: 'slide',
		onBeforeShow:function(){
		this.getTrigger().parent().parent().css('z-index','200');		
		this.getTrigger().css('z-index','200');
		this.getTrigger().parent().parent().parent().find('div').css('z-index','200');
		$('#transporter').css('z-index','50').find('img').css('z-index','50');
		$('#transporter_innen').css('z-index','50').find('img').css('z-index','50');
		},
		onShow: function() { 
        //this.getTrigger().attr('src','files/images/transporter_hover.png');
    },
		onHide:function(){
		//this.getTrigger().attr('src','files/images/transporter.png'); 
		this.getTrigger().parent().parent().css('z-index','50');		
		this.getTrigger().css('z-index','50');
		}	
         
    // add dynamic plugin  
    });

		$("#transporter_innen .hover").tooltip({ 
     
        // use single tooltip element for all tips 
        tip: '.tooltip3',  
         
        // tweak the position 
        offset: [310, 380], 
        //position:'center left',  
        // use "slide" effect 
		relative:true,
        effect: 'slide',
		onBeforeShow:function(){
		this.getTrigger().parent().parent().css('z-index','200');		
		this.getTrigger().css('z-index','200');
		this.getTrigger().parent().parent().parent().find('div').css('z-index','200');
		$('#transporter').css('z-index','50').find('img').css('z-index','50');
		$('#domina').css('z-index','50').find('img').css('z-index','50');
		},
		onShow: function() { 
        //this.getTrigger().attr('src','files/images/transporter_hover.png');
    },
		onHide:function(){
		//this.getTrigger().attr('src','files/images/transporter.png'); 
		this.getTrigger().parent().parent().css('z-index','50');		
		this.getTrigger().css('z-index','50');
		}	
         
    // add dynamic plugin  
    }).dynamic( { 
     
        // customized configuration on bottom edge 
        bottom: { 
         
            // slide downwards 
            direction: 'up', 
             
            // bounce back when closed 
            bounce: true 
        } });

})