	$(document).ready(function() {
			//Activate FancyBox
			$("div#gallery a").fancybox({ 'hideOnContentClick': true, 'itemLoadCallback': true, 'overlayShow': true, 'overlayOpacity': 0.7 });


	// funkce pro vyhodnocování reguálrího výrazu v podmínce jQuery
	$.expr[':'].regex = function(elem, index, match) {
		var matchParams = match[3].split(','),
			validLabels = /^(data|css):/,
			attr = {
				method: matchParams[0].match(validLabels) ? 
				matchParams[0].split(':')[0] : 'attr',
				property: matchParams.shift().replace(validLabels,'')
			},
			regexFlags = 'ig',
			regex = new RegExp(matchParams.join('').replace(/^\s+|\s+$/g,''), regexFlags);
		return regex.test(jQuery(elem)[attr.method](attr.property));
	}

	// na všechny odkazy do vyjmenovaných domén věší onlick funkci, která umožňuje v systému Google Analicys
	// přenášet cookie trasující zdroj návštěvnosti
	$('a:regex(href, https:\/\/(w{3}\.)?hidden-places+\.com)').each(function(){
		$(this).click(function(){ 
			secondTracker._link(this.href);
			return false;
		});
	});
	$('a:regex(href, http:\/\/(w{3}\.)?domus-henrici+\.cz)').each(function(){
		$(this).click(function(){ 
			secondTracker._link(this.href);
			return false;
		});
	});
	$('a:regex(href, http:\/\/(w{3}\.)?hidden-places+\.com)').each(function(){
		$(this).click(function(){ 
			secondTracker._link(this.href);
			return false;
		});
	});
	$('a:regex(href, https:\/\/(w{3}\.)?gc\.synxis+\.com)').each(function(){
		$(this).click(function(){ 
			secondTracker._link(this.href);
			return false;
		});
	});
	$('a:regex(href, https:\/\/(w{3}\.)?reservations\.synxis+\.com)').each(function(){
		$(this).click(function(){ 
			secondTracker._link(this.href);
			return false;
		});
	});
}); 

Date.firstDayOfWeek = 0;
	Date.format = 'mm-dd-yyyy';
	$(function()
	{
		$('.date-pick').datePicker()
	});
	/*$.dpText = {
			TEXT_PREV_YEAR		:	'Předchozí rok',
			TEXT_PREV_MONTH		:	'Předchozí měsíc',
			TEXT_NEXT_YEAR		:	'Příští rok',
			TEXT_NEXT_MONTH		:	'Příští měsíc',
			TEXT_CLOSE			:	'Zavřít',
			TEXT_CHOOSE_DATE	:	'Zvolte datum'
		}*/
	$(function()
		{
			$('.date-pick').datePicker()
			$('#start-date').bind(
				'dpClosed',
				function(e, selectedDates)
				{
					var d = selectedDates[0];
					if (d) {
						d = new Date(d);
						$('#end-date').dpSetStartDate(d.addDays(1).asString());
					}
				}
			);
			$('#end-date').bind(
				'dpClosed',
				function(e, selectedDates)
				{
					var d = selectedDates[0];
					if (d) {
						d = new Date(d);
						$('#start-date').dpSetEndDate(d.addDays(-1).asString());
					}
				}
			);
			$('#arrival').bind(
				'dpClosed',
				function(e, selectedDates)
				{
					var d = selectedDates[0];
					if (d) {
						d = new Date(d);
						$('#departure').dpSetStartDate(d.addDays(1).asString());
					}
				}
			);
			$('#departure').bind(
				'dpClosed',
				function(e, selectedDates)
				{
					var d = selectedDates[0];
					if (d) {
						d = new Date(d);
						$('#arrival').dpSetEndDate(d.addDays(-1).asString());
					}
				}
			);
			$('#start-date').dpSetPosition($.dpConst.POS_BOTTOM, $.dpConst.POS_RIGHT);

			$('#end-date').dpSetPosition($.dpConst.POS_BOTTOM, $.dpConst.POS_RIGHT);
	});
	
	
	$(document).ready(function(){
			$("#nav-one li").hover(
				function(){ $("ul", this).fadeIn("fast"); }, 
				function() { } 
			);
	  		if (document.all) {
				$("#nav-one li").hoverClass ("sfHover");
			}
	  });
	  $.fn.hoverClass = function(c) {
			return this.each(function(){
				$(this).hover( 
					function() { $(this).addClass(c);  },
					function() { $(this).removeClass(c); }
				);
			});
	 };
	 
	 
	 $(document).ready(function(){
	
	//Fix Errors - http://www.learningjquery.com/2009/01/quick-tip-prevent-animation-queue-buildup/
	
	//Remove outline from links
	/*$("a").click(function(){
		$(this).blur();
	});*/
	
	//When mouse rolls over
	$("#hotel-active").mouseover(function(){
		$(this).stop().animate({top:'-79px', height:'120px'},{queue:false, duration:600})
	});
	
	//When mouse is removed
	$("#hotel-active").mouseout(function(){
		$(this).stop().animate({top:'0', height:'41px'},{queue:false, duration:600})
	});
	
});
