jQuery.fn.htmlbox = function(conf){
		var $ = jQuery;
		$(this).each(function(){
			/*
			Klick Event
			*/
			$(this).click(function(e){
				/*
				Deklarationen
				*/
				var closeButton = conf["closeButton"] ? conf["closeButton"]:"img/close.png";
				var href = $(this).attr("href");
				var width = conf["width"] ? conf["width"]:"800";
				var height = conf["height"] ? conf["height"]:"600";
				var background = conf["background"] ? conf["background"]:"#fff";
				
				/*
				Wenn kein href angegen
				*/
				if( $(this).attr("href") == "" ) return;
				
				/*
				Link funktionalität streichen
				*/
				e.preventDefault();
				
				/*
				Base Url Testen
				*/
				if(href.indexOf("http://")==0) href = href;
				else href = href;
				
				/*
				Template erstellen
				*/
				$("body").append(''+
					'<div id="loading"></div>'+
					'<div id="htmlbox">'+
						'<div id="background"></div>'+
						'<div id="element">'+
						'</div>'+
						'<div class="close">'+
							'<img src="'+closeButton+'" alt="close" />'+
						'</div>'+
					'</div>'+
				'');
				
				/*
				Loading CSS
				*/
				$("#loading").css({
					"position":"fixed",
					"top":"0px",
					"left":"0px",
					"width":"100%",
					"height":"100%",
					"zIndex" : 4000,
					"background" : "#000 url(fileadmin/javascript/htmlbox/img/load.gif) center 300px no-repeat",
					"opacity" : 0.5
				}).hide().fadeIn("slow");
				
				/*
				Lightbox CSS
				*/
				$("#htmlbox").css({
					"position":"fixed",
					"top":"-9999px",
					"left":"0px",
					"width":"100%",
					"height":"100%",
					"zIndex" : 4000
				});
				
				$.get(href+"?r="+Math.random(),function(data) {
					/*
					Deklarationen
					*/
					var marginLeft = width/2 * -1;
					var marginTop = height/2 * -1;
					
					/*
					Loading entfernen
					*/
					$("#loading").remove();
					
					/*
					Inhalt einfügen
					*/
					$("#element").append(data);
					
					/*
					Maximal Breite Festlegen
					*/
				
					/*
					Background CSS
					*/
					$("#background").css({
						"position":"absolute",
						"top":"0px",
						"left":"0px",
						"width":"100%",
						"height":"100%",
						"background":"#000",
						"opacity":0.5
					});
					
					/*
					Element CSS
					*/
					$("#element").css({
						"position":"absolute",
						"top":"100px",
						"left":"50%",
						"zIndex":4010,
						"overflow":"hidden",
						"width":width+"px",
						"height":height+"px",
						"marginLeft":marginLeft,
						//"marginTop":marginTop,
						"background" : background
					}).hide().slideDown("slow");
					
					/*
					Close Button CSS
					*/
					$("#htmlbox .close").css({
						"position":"absolute",
						"top":"100px",
						"left":"50%",
						"zIndex":4020,
						"marginLeft" : -marginLeft + 10,
						//"marginTop" : marginTop -10,
						"cursor" : "pointer"
					});
					
					/*
					Close Button Event
					*/
					$("#htmlbox .close").click(function(){
						$("#htmlbox").remove();
						$("#element").remove();
						$("#background").fadeOut("slow",function(){
							$("#htmlbox").remove();
						});
					});
					
					/*
					FadeIn
					*/
					$("#htmlbox").css("top","0px");
				});
				
			});
		});
	}
