$(document).ready(function() {
	$('.round').corners("7px");
	$('.rounded').corners("7px");
	$('.rounded1').corners("7px");
	$('.rounded2').corners("7px");


});

$(document).ready(function() {
	$("*").tooltip();
	$("#tabs").tabs();

	var first = 0;
	var speed = 700;
	var pause = 3000;

	function removeFirst() {
		first = $('ul#listticker li:first').html();
		$('ul#listticker li:first').animate( {
			opacity : 0
		}, speed).fadeOut('slow', function() {
			$(this).remove();
		});
		addLast(first);
	}

	function addLast(first) {
		last = '<li style="display:none">' + first + '</li>';
		$('ul#listticker').append(last)
		$('ul#listticker li:last').animate( {
			opacity : 1
		}, speed).fadeIn('slow')
	}

	interval = setInterval(removeFirst, pause);
});
function initialize() {
	geocoder = new google.maps.Geocoder();
	var latlng = new google.maps.LatLng(-34.397, 150.644);
	var myOptions = {
		zoom : 15,
		center : latlng,
		mapTypeControl : true,
		mapTypeControlOptions : {
			style : google.maps.MapTypeControlStyle.DROPDOWN_MENU
		},
		navigationControl : true,

		mapTypeId : google.maps.MapTypeId.HYBRID
	}
	map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
}

function code_addresse() {
	var address = "Quickborn, Goethestrasse 50";
	var image = '_IMAGES/pmsg_google_map_flagge.png';

	if (geocoder) {
		geocoder
				.geocode(
						{
							'address' : address
						},
						function(results, status) {
							if (status == google.maps.GeocoderStatus.OK) {
								map.setCenter(results[0].geometry.location);
								var marker = new google.maps.Marker(
										{
											title : "\nTurnhalle Goetheschule\n\nGoethestraße 50 - 52\n25451 Quickborn\n",
											map : map,
											icon : image,
											position : results[0].geometry.location
										});
							} else {
								alert("Geocode was not successful for the following reason: "
										+ status);
							}
						});
	}
}

// Prüft auf Eingabefelder
function re() {
	schii = false;
	schi = false;
	if (document.form1.nam.value == '') {
		document.form1.z.value = "Pflichtfeld: Name ";
		schii = false;
		document.form1.Submit.disabled = true;
	}
	if (document.form1.nach.value == '') {
		document.form1.z.value = "Pflichtfeld: Nachricht ";
		schii = false;
		document.form1.Submit.disabled = true;
	}
	if (document.form1.nach.value == '' && document.form1.nam.value == '') {
		document.form1.z.value = "Pflichtfelder: Name & Nachricht ";
		schii = false;
		document.form1.Submit.disabled = true;
	}
	if (document.form1.nach.value != '' && document.form1.nam.value != '') {
		document.form1.z.value = "";
		schii = true;
	}
	if (document.form1.cap.value == document.form1.hi.value) {
		document.form1.zz.value = "Code stimmt!!";
		schi = true;
	}
	if (document.form1.cap.value != document.form1.hi.value) {
		document.form1.zz.value = "Code stimmt NICHT!!";
		schi = false;
		document.form1.Submit.disabled = true;
	}
	if (schii == true && schi == true) {
		document.form1.Submit.disabled = false;
	}
}

function addsmiley(smiley) {
	document.form1.nach.value = document.form1.nach.value + '' + smiley;
	document.form1.nach.focus();
}

