$(function(){
	
	$('#slider3').fader({
	    'speed':  1200,
	    'timeout': 6000
	});
	
	$('.banner').click(function(){
		$('#logar').hide();
		$('form#recuperar').hide();
	});
	
	$('.login').click(function(){
		$('form#recuperar').hide();
		$('#logar').show();
		return false;
	});
	
	$('.esqueci').click(function(){
		$('#logar').hide(); 
		$('form#recuperar').show();
		return false;
	});
	
	$("form#selecao_periodo #calendario_1" ).datepicker({
		dateFormat: 'dd/mm/yy',
		dayNames: [
		'Domingo','Segunda','Terça','Quarta','Quinta','Sexta','Sábado','Domingo'
		],
		dayNamesMin: [
		'D','S','T','Q','Q','S','S','D'
		],
		dayNamesShort: [
		'Dom','Seg','Ter','Qua','Qui','Sex','Sáb','Dom'
		],
		monthNames: [
		'Janeiro','Fevereiro','Março','Abril','Maio','Junho','Julho','Agosto','Setembro',
		'Outubro','Novembro','Dezembro'
		],
		monthNamesShort: [
		'Jan','Fev','Mar','Abr','Mai','Jun','Jul','Ago','Set',
		'Out','Nov','Dez'
		],
		nextText: 'Próximo',
		prevText: 'Anterior'

		}).mask("99/99/9999");
	$("form#selecao_periodo #calendario_2" ).datepicker({
		dateFormat: 'dd/mm/yy',
		dayNames: [
		'Domingo','Segunda','Terça','Quarta','Quinta','Sexta','Sábado','Domingo'
		],
		dayNamesMin: [
		'D','S','T','Q','Q','S','S','D'
		],
		dayNamesShort: [
		'Dom','Seg','Ter','Qua','Qui','Sex','Sáb','Dom'
		],
		monthNames: [
		'Janeiro','Fevereiro','Março','Abril','Maio','Junho','Julho','Agosto','Setembro',
		'Outubro','Novembro','Dezembro'
		],
		monthNamesShort: [
		'Jan','Fev','Mar','Abr','Mai','Jun','Jul','Ago','Set',
		'Out','Nov','Dez'
		],
		nextText: 'Próximo',
		prevText: 'Anterior'

		}).mask("99/99/9999");
	
	$('form#selecao_periodo select.adultos_select').selectmenu({style:'dropdown', menuWidth: 84});
	$('form#selecao_periodo select.criancas_select').selectmenu({style:'dropdown', menuWidth: 84});
	
	$('a.open-reservas').click(function(){
		$(this).hide();
		$(this).prev().show();
		return false;
	});
	
	$('a.close').click(function(){
		$('.selecao-reserva-internal').hide();
		$('a.open-reservas').show();
		return false;
	});
	
	/* 360º */
	
	$('#view360duplo a.a360').click(function(){
		$('#view360duplo a.a360').hide();
		$('#view360duplo img.balaoduplo').hide();
		$('.fader-container').hide();
		$('ul#ul_360 li').each(function(){$(this).hide()});
		$('ul#ul_360').show();
		$('ul#ul_360 li#li_'+$(this).attr('id')).show();
		$('#fechar360').show();
		$('#fechar360').click(function(){
			$('#view360duplo a.a360').show();
			$('.fader-container').show();
			$('ul#ul_360 li').each(function(){$(this).hide()});
			$('ul#ul_360').hide();
			$('#fechar360').hide();
			return false;
		});
		return false;
	});
	
	if ($('#view360duplo img.balaoduplo').is(':visible')) {
		window.setTimeout(function(){
			$('#view360duplo img.balaoduplo').hide();
		},8000);
	}	
	
	/* Balão de mensagem do botão reserar - menu */
	
	$('.bt-faca-reserva').hover(function(){
	  $('.reserva-msg').stop(true, true).fadeIn('slow');
	},function(){
	  $('.reserva-msg').stop(true, true).fadeOut('slow');
	}
	
	);
	
});


