

	function switchContent(page)
	{
		//jQuery('#content').replaceWith('<div id=\"content\"><div class=\"status_active\"></div></div>');
		jQuery('#load').slideUp(500, loadContent);		
		
		function loadContent()
		{
			jQuery('#loadAni').slideDown(200,actualContentLoad);
			function actualContentLoad()
			{
				jQuery('#load').load(page + ".php",
						function(response)
						{
							//jQuery('#load').replaceWith(response);						
							//jQuery('#load').slideUp(0, hideLoader2);						
							jQuery('#load').slideDown(500, hideLoader);						
							function hideLoader()
							{
								jQuery('#loadAni').slideUp(200);
							}
							function hideLoader2()
							{}
						}
					);
			}
		}
	}

function hookLinks()
{
	/* Check for hash value in URL */
    var hash = window.location.hash.substr(1);
    var href = jQuery('#nav ul li a').each(function(){
        var href = jQuery(this).attr('href');
        if(hash==href.substr(0,href.length-4)){
            var toLoad = hash+'.php #load';
            jQuery('#content').load(toLoad)
        }
    });
}

function mainStuff()
{	

/* SLIDING ANIMATION */
	jQuery('#nav ul li a').click(function() {
		window.location.hash = jQuery(this).attr('href').substr(0,jQuery(this).attr('href').length-4);  
		var toLoad = jQuery(this).attr('href')+' #load';
		jQuery('#load').slideUp('normal',loadContent);
		jQuery('#loadAni').slideDown('fast');
		function loadContent() {
			jQuery('#load').load(toLoad,'',showNewContent);
		};
		
		function showNewContent() {
			jQuery('#load').slideDown('normal',hideLoader);
		}
		function hideLoader() {
			jQuery('#loadAni').slideUp('fast');
			hookLinks();
			setupZoom();
			alert("done");
		}
				
		return false;		
	});
	jQuery('a.jQueryLink').click(function() {
		window.location.hash = jQuery(this).attr('href').substr(0,jQuery(this).attr('href').length-4);  
		var toLoad = jQuery(this).attr('href')+' #load';
		jQuery('#load').slideUp('normal',loadContent);
		jQuery('#loadAni').slideDown('fast');
		function loadContent() {
			jQuery('#load').load(toLoad,'',showNewContent);
		};
		
		function showNewContent() {
			jQuery('#load').slideDown('normal',hideLoader);
		}
		function hideLoader() {
			jQuery('#loadAni').slideUp('fast');
		}
		
		alert("2");
		return false;
		
	});
		
/* script ende */		
}

jQuery(document).ready(function() {	
	//mainStuff();
	jQuery('#nav ul li a').hover(function() {
		jQuery(this).stop().animate({ opacity: 1 });
	}, function() {
		jQuery(this).stop().animate({ opacity: 0.7 });
	});
	
	jQuery('#kontakt #social ul li a').hover(function() {
		jQuery(this).stop().animate({ paddingLeft: "10px",
													 	 width: "185px"}, 200);
	}, function() {
		jQuery(this).stop().animate({ paddingLeft: "5px",
													 width: "190px" });
	});
});