$(document).ready(function(){

	$('#nav > li > a').each(function(){
		$(this).parent().css('font-weight','bold');
		var Breite = $(this).width()+1;
		$(this).css('width',Breite+'px');
		$(this).parent().css('font-weight','normal');
	});

	$('#header > a').hover(function(){
		$(this).find('div').toggle();
	});

	$('#home .teaser.closed').live('click', function(){
		$('#home .teaser.open .close').fadeOut('fast');
		$('#home .teaser.open .more').fadeIn('fast');
		$('#home .teaser.open').animate({
			width: '280',
			backgroundColor: '#fff'
		}, 500, function(){
			$(this).removeClass('open').addClass('closed');
			$(this).css('z-index','1');
		});
		$(this).children('.close').fadeIn('fast');
		$(this).children('.more').fadeOut('fast');
		$(this).removeClass('closed').addClass('open');
		$(this).css('z-index','3');
		$(this).animate({
			width: '600',
			backgroundColor: '#ffe6b0'
		}, 500, function(){
			$(this).css('z-index','2');
		});
	});
	
	$('#home .teaser .close').live('click', function(){
		$(this).fadeOut('fast');
		$(this).parents().children('.more').fadeIn('fast');
		$(this).parent('.teaser').animate({
			width: '280',
			backgroundColor: '#fff'
		}, 500, function(){
			$(this).removeClass('open').addClass('closed');
			$(this).css('z-index','1');
		});
	});

	// $('#home .text').condense({
	// 	condensedLength: 200
	// });

	$('#home').parent("#content").addClass("home");
	$('iframe').parent("#content").addClass("iframe");

	$('.contenttable tr:odd').addClass("odd");
	$('.contenttable tr:even').addClass("even");
	$('.contenttable tr').each(function(){
		$(this).children('td:first').addClass("first");
	});

	$('.calendar-table .columPrevious a img').attr("src","/fileadmin/templ/img/arrow_left_left_blue.png").attr("width","11").attr("height","11");
	$('.calendar-table .columNext a img').attr("src","/fileadmin/templ/img/arrow_right_right_blue.png").attr("width","11").attr("height","11");
	$('.calendar-table div.linked_today_nolink').parent("td").addClass("linked_today_nolink");
	$('.calendar-table div.linked_day').parent("td").addClass("linked_day");
	$('.calendar-table td[colspan]').addClass("notinmonth");



});

