| Server IP : 177.55.116.72 / Your IP : 216.73.217.104 Web Server : Apache System : Linux UBAPCWEB27 3.10.0-862.14.4.el7.x86_64 #1 SMP Wed Sep 26 15:12:11 UTC 2018 x86_64 User : web_hotelpraiadoc ( 3326) PHP Version : 8.2.20 Disable Function : proc_open, passthru, escapeshellcmd, exec, shell_exec, system, ini_alter, dl, popen, php_check_syntax, show_source, highlight_file, symlink, link, openlog, apache_child_terminate MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/hotelpraiadoconde.com.br/public/backup/estrutura/inc/js/ |
Upload File : |
$(document).ready(function(){
//animacao - ajusta posi��o das setas no resize
function resize() {
var w = $(window).width();
if (w<1000) w = 1000;
if (w>1400) {
$("#animacao .seta").css("left","").css("right","");
} else {
var d = (1400-w)/2
$("#animacao #animacao-prev").css("left",d+"px");
$("#animacao #animacao-next").css("right",d+"px");
}
}
setTimeout(function(){ resize(); },100);
$(window).resize(function(){
resize();
});
//RESERVAS *******************************
//"selects"
$("#reserva .box .select.combo").each(function(){
var $select = $(this);
var $box = $select.parents(".box");
var $boxes = $("#reserva .box")
var $input = $box.find("input");
var $content = $box.find(".select-content");
$select.click(function(e){
e.stopPropagation();
if ($box.hasClass("open")) {
$boxes.removeClass("open");
} else {
$boxes.removeClass("open");
$box.addClass("open");
}
});
$content.find("li").click(function(e){
e.stopPropagation();
$boxes.removeClass("open");
var $li = $(this);
var value = $li.data("value");
var text = $li.text();
var label = $li.data("label"); if (label===undefined) label = text;
$input.val(value);
$select.text(label);
});
});
$(document).click(function(){
$("#reserva .box.open").removeClass("open");
});
//calendarios
$("#reserva .box .select.cal").click(function(e){
e.stopPropagation();
});
$("#reserva .box .select.cal").datepicker({
onClose: function(){ $("#reserva .box.open").removeClass("open"); },
beforeShow: function(){ $("#reserva .box.open").removeClass("open"); $(this).parents(".box").addClass("open"); },
showAnim: "",
minDate: 0, //data inicial = hoje (+0 dias)
maxDate: "+2Y +1M +1D" //data limite = daqui 2 anos, 1 mes e 1 dia (exemplo)
});
//****************************************
//campo select em formulario
$(".formulario .campo-select select").change(function(){
var val = $(this).val();
$(this).parents(".campo-select").find(".campo").val(val);
});
//slideshow
if ($("#slideshow").length>0) {
$('#carousel').flexslider({
animation: "slide",
controlNav: false,
animationLoop: false,
slideshow: false,
itemWidth: 89,
itemMargin: 0,
asNavFor: '#slider'
});
$('#slider').flexslider({
animation: "slide",
controlNav: false,
animationLoop: false,
slideshow: true,
sync: "#carousel",
pausePlay: true,
slideshowSpeed: 1000,
pauseText: 'Pausar slideshow',
playText: 'Iniciar slideshow',
});
}
});