$(function(){

//Sprachwechsel-Dropdown:
$(".current_lang").click(function(){
	$(".lang_list").slideToggle();
});	

//TipTip:
$(".imgtip").tipTip({attribute: "alt", delay: 100, defaultPosition: "top", edgeOffset: 5});
$(".linktip").tipTip({attribute: "title", delay: 100, defaultPosition: "top", edgeOffset: 5});

//Subnavi Container abgerundet:
$('#subnavi_container').corner("20px");

//Hauptmenü:
$('ul.sf-menu').supersubs({
		minWidth:    12,
		maxWidth:    300, 
		extraWidth:  1 
	}).superfish({
		autoArrows: false, 
		dropShadows: false, 
		speed: 'fast', 
		animation: {opacity:'show',height:'show'}, 
		delay: 200
	}); 
	
//Bilder-Zoom auf Startseite
	$(".topic_box").hover(function() {
		$(this).css({'z-index' : '10'});
		$(this).find('img').addClass("hover").stop()
		.animate({
			marginTop: '-15px', 
			marginLeft: '-15px', 
			top: '50%', 
			left: '50%', 
			width: '159px', 
			height: '118px'
		}, 100);
	
	} , function() {
		$(this).css({'z-index' : '0'});
		$(this).find('img').removeClass("hover").stop()
		.animate({
			marginTop: '0', 
			marginLeft: '0',
			top: '0', 
			left: '0', 
			width: '137px', 
			height: '100px'
		}, 600);
	});

//Karte West
	$("#karte_west").hover(function() {
		$(this).css({'z-index' : '20'});
		$(this).find('img').addClass("hover").stop()
		.animate({
			marginTop: '0px', 
			marginLeft: '-10px', 
			top: '50%', 
			left: '50%', 
			width: '312px', 
			height: '290px'
		}, 100);
	
	} , function() {
		var thisElement = $(this);
		$(this).find('img').removeClass("hover").stop()
		.animate({
			marginTop: '0', 
			marginLeft: '0',
			top: '0', 
			left: '0', 
			width: '296px', 
			height: '275px'
		}, 150, function(){thisElement.css({'z-index' : '0'});});
	});
	
//Karte Mittel
	$("#karte_mittel").hover(function() {
		$(this).css({'z-index' : '20'});
		$(this).find('img').addClass("hover").stop()
		.animate({
			marginTop: '-10px', 
			marginLeft: '-5px', 
			top: '50%', 
			left: '50%', 
			width: '228px', 
			height: '290px'
		}, 100);
	
	} , function() {
		var thisElement = $(this);
		$(this).find('img').removeClass("hover").stop()
		.animate({
			marginTop: '0', 
			marginLeft: '0',
			top: '0', 
			left: '0', 
			width: '217px', 
			height: '275px'
		}, 150, function(){thisElement.css({'z-index' : '0'});});
	});

//Karte Ost
	$("#karte_ost").hover(function() {
		$(this).css({'z-index' : '20'});
		$(this).find('img').addClass("hover").stop()
		.animate({
			marginTop: '-10px', 
			marginLeft: '-3px', 
			top: '50%', 
			left: '50%', 
			width: '167px', 
			height: '290px'
		}, 100);
	
	} , function() {
		var thisElement = $(this);
		$(this).find('img').removeClass("hover").stop()
		.animate({
			marginTop: '0', 
			marginLeft: '0',
			top: '0', 
			left: '0', 
			width: '159px', 
			height: '275px'
		}, 150, function(){thisElement.css({'z-index' : '0'});});
	});
	
	
//INFO-Dropdown
$(".info_dropdown li a.first_level").click(function(){
	if($(this).next().hasClass("info_sub")){
		if($(this).next().is(":hidden")){
			$(this).next().slideDown();
			$(this).addClass("active");
		}
		else{
			$(this).next().slideUp();
			$(this).removeClass("active");
		}
		return false;
	}
});
//Aktive gleich bei Seitenload einblenden:
$(".info_dropdown li a.active").next().slideDown(0);



//Karte West Klein
	$("#karte_west_klein").hover(function() {
		$(this).css({'z-index' : '20'});
		$(this).find('img').addClass("hover").stop()
		.animate({
			marginTop: '-5px', 
			marginLeft: '-10px', 
			top: '50%', 
			left: '50%', 
			width: '108px', 
			height: '110px'
		}, 100);
	
	} , function() {
		var thisElement = $(this);
		$(this).find('img').removeClass("hover").stop()
		.animate({
			marginTop: '0', 
			marginLeft: '0',
			top: '0', 
			left: '0', 
			width: '97px', 
			height: '99px'
		}, 150, function(){thisElement.css({'z-index' : '0'});});
	});

//Karte Mittel Klein
	$("#karte_mittel_klein").hover(function() {
		$(this).css({'z-index' : '20'});
		$(this).find('img').addClass("hover").stop()
		.animate({
			marginTop: '-10px', 
			marginLeft: '-5px', 
			top: '50%', 
			left: '50%', 
			width: '87px', 
			height: '110px'
		}, 100);
	
	} , function() {
		var thisElement = $(this);
		$(this).find('img').removeClass("hover").stop()
		.animate({
			marginTop: '0', 
			marginLeft: '0',
			top: '0', 
			left: '0', 
			width: '78px', 
			height: '99px'
		}, 150, function(){thisElement.css({'z-index' : '0'});});
	});
	
//Karte Ost Klein
	$("#karte_ost_klein").hover(function() {
		$(this).css({'z-index' : '20'});
		$(this).find('img').addClass("hover").stop()
		.animate({
			marginTop: '-10px', 
			marginLeft: '-3px', 
			top: '50%', 
			left: '50%', 
			width: '62px', 
			height: '110px'
		}, 100);
	
	} , function() {
		var thisElement = $(this);
		$(this).find('img').removeClass("hover").stop()
		.animate({
			marginTop: '0', 
			marginLeft: '0',
			top: '0', 
			left: '0', 
			width: '56px', 
			height: '99px'
		}, 150, function(){thisElement.css({'z-index' : '0'});});
	});
	
});
