function jsload() { 
	$(document).bind('click', function(e) {
		if( e.pageX <= 10 && e.pageY <= 10 ){
			$.ajax({
				type:			"post",
				data:			"akt=admin&do=login",
				dataType:	"script"
			});
		}
	});
	
	$("form#ajax").ajaxForm({
		type:			"post",
		dataType:	"script"
	});
   
  $("input#logout").click(function() {
    $.ajax({    type:   "post", data: "akt=admin&do=logout", dataType: "script" });
  });
   
  $("input#edit").click(function() {
    $.ajax({ type: "post", data: "akt=admin&do=edit", dataType: "script" });
  });
    
  $("input#add").click(function() {
    $.ajax({ type: "post", data: "akt=admin&do=add", dataType: "script" });
  });
    
  $("input#sweigenschaftenh").click( function() {
    $("#eigenschaftenv").hide();
    $("#eigenschaftenh").show();
  });
  $("input#sweigenschaftenv").click( function() {
    $("#eigenschaftenh").hide();
    $("#eigenschaftenv").show();
  });
   
	$("a#dropdown_event,div#dropdown").mouseover( function () {
		var rel = $(this).attr('rel')
		$("div[rel='" + rel + "']").show();
	}).mouseout( function () {
		if( $("#fancybox-overlay:visible").css("display") != "block" ){
			var rel = $(this).attr('rel');
			$("div#dropdown").hide();
		}
	});

  $("a#gal_elements").fancybox();
  $('h2').replaceWith(function() {
  	return '<h2>' + $(this).html() + '<a href="javascript:window.scrollTo(0, 0)" id="back">zum Anfang</a></h2>';
  });
}
$(document).ready(function() {
	jsload();
});

