$(document).ready(init);

function init() {

	// OPTIONALLY SET THE DATE FORMAT FOR ALL DATE PICKERS ON THIS PAGE
	$.datePicker.setDateFormat('dmy','.'); // german
	
	// OPTIONALLY SET THE LANGUAGE DEPENDANT COPY IN THE POPUP CALENDAR
	
	$.datePicker.setLanguageStrings(
		['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'],
		['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'],
		{p:'zurück', n:'weiter', c:'schließen', b:'Datum auswählen'}
	);
	
	// DIFFERENT OPTIONS SHOWING HOW YOU MIGHT INITIALISE THE DATE PICKER (UNCOMMENT ONE AT A TIME) //
	// all inputs with a class of "date-picker" have a date picker which lets you pick any date in the future
	$('input.date-picker').datePicker();
	// OR
	// all inputs with a class of "date-picker" have a date picker which lets you pick any date from today till 05/011/2006
	//$('input.date-picker').datePicker({endDate:'05/11/2006'});
	// OR
	// all inputs with a class of "date-picker" have a date picker which lets you pick any date from 05/03/2006 till 05/11/2006
	//$('input.date-picker').datePicker({startDate:'05/03/2006', endDate:'05/11/2006'});
	// OR 
	// the input with an id of "Anreise" will have a date picker that lets you pick any day in the future...
	$('input#Anreise').datePicker({firstDayOfWeek:6});
	// ...and the input with an id of "Abreise" will have a date picker that lets you pick any day in the future...
	$('input#Abreise').datePicker({firstDayOfWeek:6});
	
	/*
	// testing code to check the change event is fired...
	$('input#date1').bind(
		'change',
		function()
		{
			alert($(this).val());
		}
	);
	*/
	
	// END DIFFERENT OPTIONS //
}

