$(document).ready(function() {
	//Auf den ggf. übermittelten Anker reagieren
	if(location.hash) {
		x = location.hash;
		getContent(x.slice(1)+".html");
	}
	
	//Links per Ajax nachladen
//	$("a:not([href^='http://'])").livequery("click", function() {
	$("a:[href^='index.php?id=']").livequery("click", function() {
	//$("#menu a").click(function() {
		url = $(this).attr("href");
		//alert("Geklickt auf "+url);
		if (url.indexOf("=64")>0) return true;
		if (url.indexOf("=54")>0) return true;
		if (url.indexOf("=100")>0) return true;


		getContent(url);
		$(this).blur();
		return false;
	});
	
	//Informieren das etwas passiert
/*

	$("#content").ajaxStart(function() {
		$(this).fadeOut(function() {
			$(this)
			    .text("Loading...")
			    .addClass("loading")
			    .fadeIn();

		});
	});
*/ 
        $("#content").ajaxStart(function() {
			$(this)
			.addClass("loading")
                            .text("Loading...")
	
          });
          
         
});

/*

function getContent(url) {
    $.ajax({
	url: url+"&type=101",
	success: function(html) {
	    $("#content")
	        .removeClass("loading")
	        .css("display", "none")
	        .html(html)
	        .fadeIn();
	
	}


    });
}
*/
function getContent(url) {
    $.ajax({
	url: url+"&type=101",
	success: function(html) {
	    $("#content").html(html)
	
	}


    });
}


