$(document).ready(

	// Alternating table rows
	function() {
		$('#content table.border, #content table.alternating, #content-wide table.border, #content-wide table.alternating').colorize({
			bgColor:'#f9f9f9',
			altColor:'#ececec',
			hoverColor:'none',
			hiliteColor: 'none'
		});

		if($('div.gallery a.zoom').fancybox)
		{
			$('div.gallery a.zoom').add('div.pic-tl a.zoom').fancybox({
				'speedIn'				:	600,
				'speedOut'				:	200,
				'titlePosition'			:	'inside',
				'hideOnContentClick'	:	true
			});
		}

		$('#category-select > select').change(function(e){
			$(this).closest('form').submit();
		})

		if(window.opera) {
			if ($("a.jqbookmark").attr("rel") != ""){ // don't overwrite the rel attrib if already set
				$("a.jqbookmark").attr("rel","sidebar");
			}
		}

		$("a.bookmark").click(function(event){
			event.preventDefault(); // prevent the anchor tag from sending the user off to the link
			var url = document.URL;
			var title = document.title;

			if (window.sidebar) { // Mozilla Firefox Bookmark
				window.sidebar.addPanel(title, url,"");
			} else if (window.external) { // IE Favorite
				window.external.AddFavorite( url, title);
			} else if(window.opera) { // Opera 7+
				return false; // do nothing - the rel="sidebar" should do the trick
			} else { // for Safari, Konq etc - browsers who do not support bookmarking scripts (that i could find anyway)
				 alert('Unfortunately, this browser does not support the requested action,'
				 + ' please bookmark this page manually.');
			}

		});

	}

);

// Code von externem Newsletteranbieter

function checkForm()
{
	if(document.form1.feld_vorname.value == "")
	{
		alert("Das Feld  'Vorname' muss ausgef\u00FCllt werden!");
		document.form1.feld_vorname.focus();
		return false;
	}
	if(document.form1.feld_nachname.value == "")
	{
		alert("Das Feld  'Nachname' muss ausgef\u00FCllt werden!");
		document.form1.feld_nachname.focus();
		return false;
	}
	if(document.form1.feld_email.value == "")
	{
		alert("Das Feld  'E-Mail' muss ausgef\u00FCllt werden!");
		document.form1.feld_email.focus();
		return false;
	}
	if (!isValidEmail(document.form1.feld_email.value) )
	{
		alert("Bitte kontrollieren Sie Ihre Email-Adresse!");
		document.form1.feld_email.focus();
		return false;
	}
	return true;
}

function isValidEmail(str)
{
	var oRegExp = /^[\+_a-z0-9-](\.{0,1}[\+_a-z0-9-])*@([&auml;&uuml;&ouml;a-z0-9-]{1,}\.){0,}[&auml;&uuml;&ouml;a-z0-9-]{1,}(\.[a-zA-Z]{2,}){1,2}$/i
	return oRegExp.test(str);
}




