/*
 *
 * 	Y3m.de - General JavaScript
 *	general.js
 *
 */
 
 // Set JQuery in Compatibility Mode
 jQuery.noConflict();
 
 // define the accordeon
 jQuery(document).ready(function(){
 		// hide the fields
		jQuery(".accordion-content").hide();
 		
		// initialize the event
		jQuery('.accordion-selector').click(function(event){
				jQuery(this).next().slideToggle();
		});

	// map
	// fade in the Where Are We
	jQuery("div.map-popup").wait();
	jQuery("div.map-popup").fadeIn("slow");
	
	//  exit button
	jQuery("span.close").click(function(event){
   			jQuery("div.map-popup").fadeOut("slow");
     });

});
 
 /*
  * Wait function
  */
 jQuery.fn.wait = function(time, type) {
        time = time || 2000;
        type = type || "fx";
        return this.queue(type, function() {
            var self = this;
            setTimeout(function() {
                jQuery(self).dequeue();
            }, time);
        });
    };
