
jQuery.fn.delay = function(time, func){
    this.each(function(){
        setTimeout(func, time);
    });
    
    return this;
};

var J = jQuery.noConflict();

J(document).ready(function(){


    J('.navilink').hover(function(){
        J('> ul', this).fadeIn("fast");
        J(this).addClass('navilinkaktiv');
    }, function(){
        J('> ul', this).fadeOut("fast");
        var element = this;
        J(element).removeClass('navilinkaktiv');
    });

    J('.navilinkaktiv').hover(function(){
        J('> ul', this).fadeIn("fast");
    }, function(){
        J('> ul', this).fadeOut("fast");
    });
	
	
			J(".PopUpGross").fancybox({ 
						padding:10,
						imageScale:true,
						zoomOpacity:true,
						zoomSpeedIn:0,
						zoomSpeedOut:0,
						zoomSpeedChange:300,
						frameWidth:560,
						frameHeight:420,
						overlayShow:true,
						overlayOpacity:0.3,
						overlayColor:'#666',
						enableEscapeButton:true,
						showCloseButton:true,
						hideOnOverlayClick:true,
						hideOnContentClick:false,
						centerOnScroll:true,
						itemArray:[],
						callbackOnStart:null,
						callbackOnShow:null,
						callbackOnClose:null
						});


			J(".PopUpKlein").fancybox({ 
						padding:10,
						imageScale:true,
						zoomOpacity:true,
						zoomSpeedIn:0,
						zoomSpeedOut:0,
						zoomSpeedChange:300,
						frameWidth:380,
						frameHeight:200,
						overlayShow:true,
						overlayOpacity:0.3,
						overlayColor:'#666',
						enableEscapeButton:true,
						showCloseButton:true,
						hideOnOverlayClick:true,
						hideOnContentClick:false,
						centerOnScroll:true,
						itemArray:[],
						callbackOnStart:null,
						callbackOnShow:null,
						callbackOnClose:null
						});
})


function closeFB() {
	alert("zu");
	parent.$.fn.fancybox.close();
}

