//wait for DOM ready
$(document).ready(function(){

	
//input funktionen
jQuery.fn.DefaultValue = function(){
		// Scope\
		var elements = this;
		var args = arguments;
		var c = 0;
		return(
			elements.each(function(){
				// Default values within scope
				var el = $(this);
				var def = args[c++];
 
				el.val(def).focus(function(){
					$(this).addClass('hasfocus');
					if(el.val() == def){
						el.val("");
					}
					el.blur(function(){
					$(this).removeClass('hasfocus');
						if(el.val() == ""){
							el.val(def);
					}
				});
			});
		})
	);
};
$('input.kname').DefaultValue('Ihr Name');


//lightbox
$(function(){
	$('a.lb').lightBox();
});


$('#cycle-logos').cycle({ 
    fx:     'fade', 
    timeout: 4000, 
    pause: 1,
});  


$('.ausflug').hide();
$('.ausflugsziele h3').click(function(){
	$(this).next('.ausflug').slideToggle();
});



jQuery(function($){
  $.datepicker.regional['de'] = {clearText: 'löschen', clearStatus: 'aktuelles Datum löschen',
          closeText: 'schließen', closeStatus: 'ohne Änderungen schließen',
          prevText: '&#x3c;zurück', prevStatus: 'letzten Monat zeigen',
          nextText: 'Vor&#x3e;', nextStatus: 'nächsten Monat zeigen',
          currentText: 'heute', currentStatus: '',
          monthNames: ['Januar','Februar','März','April','Mai','Juni',
          'Juli','August','September','Oktober','November','Dezember'],
          monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
          'Jul','Aug','Sep','Okt','Nov','Dez'],
          monthStatus: 'anderen Monat anzeigen', yearStatus: 'anderes Jahr anzeigen',
          weekHeader: 'Wo', weekStatus: 'Woche des Monats',
          dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
          dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
          dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
          dayStatus: 'Setze DD als ersten Wochentag', dateStatus: 'Wähle D, M d',
          dateFormat: 'dd.mm.yy', firstDay: 1, 
          initStatus: 'Wähle ein Datum', isRTL: false};
  $.datepicker.setDefaults($.datepicker.regional['de']);
});
$('#datepicker-an, #datepicker-ab').datepicker();




$('table.preisliste tr td:nth-child(2)').css({'background': '#769088', 'text-align': 'center', 'color': '#fff'});
$('table.preisliste tr td:nth-child(3)').css({'background': '#5a8679', 'text-align': 'center', 'color': '#fff'});
$('table.preisliste tr td:nth-child(4)').css({'background': '#496d62', 'text-align': 'center', 'color': '#fff'});

//ende DOM ready
});
