
$(document).ready(function() {
	$('form#jump button').hide();
	$('form#jump select').change(function() { $('form#jump').get(0).submit(); });

	$('form#query input').focus(function() { if (this.value == 'Suche') this.value = ''; }).get(0).value = 'Suche';

	$('tbody tr td a').each(function() {
		$(this).css({textDecoration: 'none', color: 'black', backgroundImage: 'none', paddingLeft: 0, fontWeight: 'normal'});
		$(this).parent().parent()
			.css({cursor: 'pointer'})
			.click(function() {
				document.location.href = $(this).find('a').attr('href');
			});
	});

	$('#maincontent ul').each(function() {
		if ($(this).attr('class')) return;
		var lis = $(this).find('li');
		if (lis.length == 1) return;

		var onlyLinks = true;
		lis.each(function() {
			var children = $(this).children();
			if (!children.length) onlyLinks = false;
			if (children.not('a').length) onlyLinks = false;
		});
		if (onlyLinks) $(this).addClass('only-links');
	});

	$('div.flash').curvy();
});
