jQuery(document).ready(function () {
	
	jQuery.noConflict();
	
	// Position der Box - Center
	jQuery.fn.center = function () {
		this.css("position","absolute");
		this.css("top", ( jQuery(window).height() - this.height() ) / 2+jQuery(window).scrollTop() + "px");
		this.css("left", ( jQuery(window).width() - this.width() ) / 2+jQuery(window).scrollLeft() + "px");
		return this;
	  }
	
	jQuery(".box-profil").center();
	
	// Licht aus	
	jQuery('.box-lightsout').css("height", jQuery(document).height());	

	// Fade in Effekt für die Box
	jQuery('a[rel="box-profil"]').click(function() {
		jQuery('.box-profil').fadeIn("slow");
		jQuery('.box-lightsout').fadeTo("slow", .5);
	});
	
	// Schließen der Box oder in den abgedunkelten bereich
	jQuery('a.FensterC, .box-lightsout').click(function() {
		jQuery('.box-profil').fadeOut("slow");
		jQuery('.box-lightsout').fadeOut("slow");
	});
});
