// JavaScript Document
shortTime = 200;
longTime = 800;

currentImg = 1;
allimages = 11;

host = window.location.hostname;
if (host == 'localhost') {
	localhost = true;
	rootPath = 'http://localhost:8888/Forum%20Landschaft/deutsch/html/';
} else {
	localhost = false;
	rootPath = 'http://www.forumlandschaft.ch/';
}


$(document).ready(function() {

// menu color animation
	$('#navi a').live('mouseenter', function() {
		$(this).animate({
			backgroundColor: 'rgb(128, 000, 000)',
			color: 'rgb(255, 255, 255)'
		}, shortTime)
	}).live('mouseleave', function() {
		if (!$(this).hasClass('hover')) {
			$(this).animate({
				backgroundColor: 'rgb(255, 255, 255)',
				color: 'rgb(128, 128, 128)'
			}, shortTime)
		}
	});
	
// störende elemente adden oder css umschreiben
	$('#container').css('overflow', 'hidden');
	$('#left, #right').css({
		marginBottom: '-2500px',
		paddingBottom:'2500px'
	});
	$('#middle h1:eq(0), #right h1:eq(0)').css('margin-top', '0');
	$('.pdf').attr('target', '_blank');
	
// menu aktivieren
	if (navisite) {
		aktuellerNaviPunkt = '#navi'+navisite;
		$(aktuellerNaviPunkt).addClass('hover');		
	};

// dossiers 
	$(".dossiers li").mouseenter(function() {
		$(this).animate({
				backgroundColor: 'rgb(128, 000, 000)'
			}, longTime);
		
		dossiername = $(this).find('img').attr('alt');
		$('#dossiername').html(dossiername);
	}).mouseleave(function() {
		$(this).animate({
				backgroundColor: 'rgb(255, 255, 255)'
			}, shortTime);
			
		$('#dossiername').html('Dossiername');
	});
	
// disclaimer
	$('#disclaimertoggle').click(function() {
		$('#disclaimer').slideToggle(shortTime);
	});
	
// Funktionen beim aufruf starten
titelbild();

}).everyTime(4000, function(i) {
	titelbildFade();
});
