
jQuery(document).ready(function(){
	//alert("jquery loaded!");
	
	/* LIGHTBOX */	
	// select the thumbnails and make them trigger our overlay
	var foundGallery = jQuery("div.gallery").html();
	//alert("foundGallery:"+foundGallery);
	if(foundGallery != null){
		jQuery("div.gallery div.items div a").overlay({
			// each trigger uses the same overlay with the id "gallery"
			target: '#mhvgallery',
			// optional exposing effect
			expose: '#222222'
			// let the gallery plugin do its magic!
		}).gallery({
			// the plugin accepts its own set of configuration options
			speed: 800,
			autohide: false,
			info:'.info2',
			opacity: 1
		});
	}
	
	
	// BOOKING FORM: SET ARRIVAL & DEPARTURE DATES
	bookingArrival = jQuery("#formPicker").find("#tdate").each(function (i) {
		today = jQuery.datepicker.formatDate('dd.mm.yy', new Date());
		jQuery(this).val(today);
	});
	
	//alt-Attributes hinzufuegen - by Benjamin Oberhauser | brandnamic
	jQuery('#nav a').each(function(){jQuery(this).html().replace(/&/g,'-');});
	
	jQuery('.content-holder a').each(function(){
		if(!jQuery(this).attr('title'))
			jQuery(this).attr('title',jQuery(this).text());
	});
	jQuery('.content-holder img').each(function(){
		if(!jQuery(this).attr('alt'))
			jQuery(this).attr('alt',jQuery(this).text());
		if(!jQuery(this).attr('title'))
			jQuery(this).attr('title',jQuery(this).text());
	});
	
	
	
	
});
