$(document).ready(function() { 

	
	// Weitere Formatierungen
	$('table:not(.detailinfo)').find('th:odd, td:odd').addClass('wechsel');
	$('table.detailinfo').find('th:even, td:odd').addClass('wechsel');
	
	
	// Schriftgröße
	var zoom = 1;
	if ($.cookie('schrift')) { 
		var zoom = $.cookie('schrift');
		$('body').css({ fontSize: $.cookie('schrift')+'em' });
	} else { 
		var zoom = 1;
	};
	$('#fontsize a').click(function() { 			
		if ($(this).hasClass('minus'))	{ zoom = zoom * 0.95; };
		if ($(this).hasClass('reset')) 	{ zoom = 1 };
		if ($(this).hasClass('plus')) 	{ zoom = zoom * 1.05; };		
		$.cookie('schrift', zoom);		
		$('body').css({ fontSize: zoom+'em' });
		return false;
	});
	
	// Saison-Tooltip
	$('ul[rel]').hide().addClass('tooltipul');
	$('table.detailinfo thead tr th[rel]').each(function() { 
		$(this).append('&nbsp;&nbsp;&nbsp;[?]');
		var saison = $(this).attr('rel');
		$(this).hover(function() { 
			$(this).css({ cursor: 'help' });
			$('ul[rel*="'+saison+'"]').show();
		}, function() { 
			$('ul[rel*="'+saison+'"]').hide();
		});
	});
	
	// Tooltip
	$('*[title]').eujTool();

	
});

function popup(url, title) {
	var breite = 785;
	var hoehe = 490;
	var leftPos = (screen.width) ? (screen.width - breite) / 2:0;
	var topPos = (screen.height) ? (screen.height - hoehe) / 2:0;
	var props = "width="+breite+", height="+hoehe+", status=yes, left="+leftPos+", top="+topPos+" toolbar=0, personalbar=0, menubar=0, scrollbars=0, resizable=0, status=0";
	newwindow = window.open(url, title, props);
	if (window.focus) { 
		newwindow.focus()
	}
	return false;
}
