//hide DOM objects in .popup BEFORE they are ready:
$("head").append("<style type='text/css'>.subcont {display:none}</style>");
//safari extrawurst: append
if ($.browser.safari){ $("head").find("style:last").append(" ") }

//define fadeToggle
jQuery.fn.fadeToggle = function(speed, easing, callback) {
   return this.animate({opacity: 'toggle'}, speed, easing, callback);
}; 

//wait for DOM ready
$(document).ready(function(){
	
	//startseite: 4 welten changeclass on hover
	$(".fourblocks a").animate({opacity:0.99}, 1);
	$(".fourblocks a").mouseenter(function(){
		$(this).animate({opacity:0.7}, 300);
	});
	$(".fourblocks a").mouseleave(function(){
		$(this).animate({opacity:0.99}, 300);
	});
	
	//new nav
	$(".subcont").hide();
	$(".trigger1").click(function(){
		$(".subcont2, .subcont3").hide();
		$(".subcont1").fadeToggle("slow");
	});
	$(".trigger2").click(function(){
		$(".subcont1, .subcont3").hide();
		$(".subcont2").fadeToggle("slow");
	});
	$(".trigger3").click(function(){
		$(".subcont2, .subcont1").hide();
		$(".subcont3").fadeToggle("slow");
	});
	
});