jQuery(function( $ ){

	$.localScroll.defaults.axis = 'y';
	
	$.localScroll.hash({
		queue:true,
		duration:0
	});
	

	$.localScroll({
		queue:true,
		duration:1000,
		hash:true,
		onBefore:function( e, anchor, $target ){
		},
		onAfter:function( anchor, settings ){
		}
	});
});

jQuery(function($) {
$.fn.search = function() {
	return this.focus(function() {
		if( this.value == "Suchbegriff" ) {
			this.value = "";
		}
	}).blur(function() {
		if( !this.value.length ) {
			this.value = "Suchbegriff";
		}
	});
};
$("#Suchfeld").search();
$("#Suchfeld_oben").search();

$.fn.searcheng = function() {
	return this.focus(function() {
		if( this.value == "Search item" ) {
			this.value = "";
		}
	}).blur(function() {
		if( !this.value.length ) {
			this.value = "Search item";
		}
	});
};
$("#Suchfeld_oben").searcheng();


$.fn.namefunk = function() {
	return this.focus(function() {
		if( this.value == "Ihren Namen hier eingeben" ) {
			this.value = "";
		}
	}).blur(function() {
		if( !this.value.length ) {
			this.value = "Ihren Namen hier eingeben";
		}
	});
};
$("#name").namefunk();
$("#kontaktName").namefunk();
$("#fehlerName").namefunk();
$("#vkName").namefunk();

$.fn.strassefunk = function() {
	return this.focus(function() {
		if( this.value == "Ihre Straße und Hausnummer hier eingeben" ) {
			this.value = "";
		}
	}).blur(function() {
		if( !this.value.length ) {
			this.value = "Ihre Straße und Hausnummer hier eingeben";
		}
	});
};
$("#strasse").strassefunk();
$("#vkStrasse").strassefunk();

$.fn.plzfunk = function() {
	return this.focus(function() {
		if( this.value == "Ihre PLZ und Wohnort hier eingeben" ) {
			this.value = "";
		}
	}).blur(function() {
		if( !this.value.length ) {
			this.value = "Ihre PLZ und Wohnort hier eingeben";
		}
	});
};
$("#plz").plzfunk();
$("#vkPLZ").plzfunk();

$.fn.mailfunk = function() {
	return this.focus(function() {
		if( this.value == "Ihre E-Mail-Adresse hier eingeben" ) {
			this.value = "";
		}
	}).blur(function() {
		if( !this.value.length ) {
			this.value = "Ihre E-Mail-Adresse hier eingeben";
		}
	});
};
$("#mail").mailfunk();
$("#kontaktMail").mailfunk();
$("#fehlerMail").mailfunk();
$("#vkMail").mailfunk();

$.fn.telefonfunk = function() {
	return this.focus(function() {
		if( this.value == "Ihre Telefon-Nummer hier eingeben" ) {
			this.value = "";
		}
	}).blur(function() {
		if( !this.value.length ) {
			this.value = "Ihre Telefon-Nummer hier eingeben";
		}
	});
};
$("#telefon").telefonfunk();
$("#vkTelefon").telefonfunk();

$.fn.personenfunk = function() {
	return this.focus(function() {
		if( this.value == "Die Anzahl teilnehmender Personen hier eingeben" ) {
			this.value = "";
		}
	}).blur(function() {
		if( !this.value.length ) {
			this.value = "Die Anzahl teilnehmender Personen hier eingeben";
		}
	});
};
$("#personen").personenfunk();
$("#vkPersonen").personenfunk();

$.fn.textfunk = function() {
	return this.focus(function() {
		if( this.value == "Ihre Nachricht hier eingeben" ) {
			this.value = "";
		}
	}).blur(function() {
		if( !this.value.length ) {
			this.value = "Ihre Nachricht hier eingeben";
		}
	});
};
$("#text").textfunk();
$("#kontaktText").textfunk();
$("#fehlerText").textfunk();
$("#vkText").textfunk();
});

$(function() { $.highlightAccessKeys(); });
