jQuery(function () { var e = jQuery(".bluebutton30wrapper"), d = jQuery(".bluebutton25wrapper"), c = jQuery(".bluebutton22wrapper"), f = jQuery(".bluebutton20wrapper"), b = jQuery(".smalllightwrapper"), g = jQuery(".biglightwrapper"), a = jQuery(".bluebuttonwrapper"); jQuery.each(a, function (j, m) { var l = jQuery(m), n = l.find(".bluebuttonleft"), k = l.find(".bluebuttonright"), h = l.find(".bluebuttoncenter"); l.hover(function () { n.css("background-position", "left -75px"); k.css("background-position", "right -100px"); h.css("background-position", "left -125px") }, function () { n.css("background-position", "left 0"); k.css("background-position", "right -25px"); h.css("background-position", "left -50px") }) }); jQuery.each(e, function (j, m) { var l = jQuery(m), n = l.find(".bluebutton30left"), k = l.find(".bluebutton30right"), h = l.find(".bluebutton30center"); l.hover(function () { n.css("background-position", "left -90px"); k.css("background-position", "right -120px"); h.css("background-position", "left -150px") }, function () { n.css("background-position", "left 0"); k.css("background-position", "right -30px"); h.css("background-position", "left -60px") }) }); jQuery.each(d, function (j, m) { var l = jQuery(m), n = l.find(".bluebutton25left"), k = l.find(".bluebutton25right"), h = l.find(".bluebutton25center"); l.hover(function () { n.css("background-position", "left -75px"); k.css("background-position", "right -100px"); h.css("background-position", "left -125px") }, function () { n.css("background-position", "left 0"); k.css("background-position", "right -25px"); h.css("background-position", "left -50px") }) }); jQuery.each(c, function (j, m) { var l = jQuery(m), n = l.find(".bluebutton22left"), k = l.find(".bluebutton22right"), h = l.find(".bluebutton22center"); l.hover(function () { n.css("background-position", "left -66px"); k.css("background-position", "right -88px"); h.css("background-position", "left -110px") }, function () { n.css("background-position", "left 0"); k.css("background-position", "right -22px"); h.css("background-position", "left -44px") }) }); jQuery.each(f, function (j, m) { var l = jQuery(m), n = l.find(".bluebutton20left"), k = l.find(".bluebutton20right"), h = l.find(".bluebutton20center"); l.hover(function () { n.css("background-position", "left -60px"); k.css("background-position", "right -80px"); h.css("background-position", "left -100px") }, function () { n.css("background-position", "left 0"); k.css("background-position", "right -20px"); h.css("background-position", "left -40px") }) }); jQuery.each(b, function (j, m) { var l = jQuery(m), n = l.find(".smalllightleft"), k = l.find(".smalllightright"), h = l.find(".smalllightcenter"); l.hover(function () { n.css("background-position", "left -75px"); k.css("background-position", "right -100px"); h.css("background-position", "left -125px") }, function () { n.css("background-position", "left 0"); k.css("background-position", "right -25px"); h.css("background-position", "left -50px") }) }); jQuery.each(g, function (j, m) { var l = jQuery(m), n = l.find(".biglightleft"), k = l.find(".biglightright"), h = l.find(".biglightcenter"); l.hover(function () { n.css("background-position", "left -120px"); k.css("background-position", "right -160px"); h.css("background-position", "left -200px") }, function () { n.css("background-position", "left 0"); k.css("background-position", "right -40px"); h.css("background-position", "left -80px") }) }) }); jQuery(function () { var a = jQuery(".accordionheader"); jQuery.each(a, function (c, d) { var b = jQuery(d).find("h2"), e = jQuery(d).siblings(".accordiontoggler"), f = e.find(".accordionwrapper"); if (e.height() == 0) { e.data("status", "closed"); b.css("background-position", "right 3px") } else { e.data("status", "opened"); b.css("background-position", "right -16px") } b.click(function () { if (e.data("status") == "closed") { e.data("status", "opened"); b.css("background-position", "right -16px"); e.stop().animate({ height: f.outerHeight(true) }, 1000) } else { e.data("status", "closed"); b.css("background-position", "right 3px"); e.stop().animate({ height: 0 }, 1000) } }) }) }); jQuery(function () { var a = jQuery(".groupsites img"); a.css("opacity", 1); a.hover(function () { jQuery(this).stop().animate({ opacity: 1 }, 300) }, function () { jQuery(this).stop().animate({ opacity: 1 }, 300) }) }); function InitLangMenu() { jQuery(".selectedlanguage").parent(".rightitem").width(jQuery(".selectedlanguage").outerWidth()); jQuery(".langmenuwrapper").css("display", "block"); var a = 0; jQuery.each(jQuery(".langmenuwrapper ul li a"), function () { a = Math.max(a, jQuery(this).outerWidth()) }); jQuery(".langmenuwrapper").width(a + 20); jQuery(".selectedlanguage").click(function () { jQuery(".langmenuwrapper").stop().animate({ height: jQuery(".langmenuwrapper ul").outerHeight(true) }, 300) }, function () { jQuery(".selectedlanguage").oneTime("500ms", "mouseout", function () { jQuery(".langmenuwrapper").css({ height: 0 }) }) }); jQuery(".langmenuwrapper").hover(function () { jQuery(".selectedlanguage").stopTime("mouseout") }, function () { jQuery(".langmenuwrapper").css({ height: 0 }) }) } function InitLoggedMenu() { jQuery(".loggeduser").parent(".rightitem").width(jQuery(".loggeduser").outerWidth()); jQuery(".loggedmenuwrapper").css("display", "block"); var a = 0; jQuery.each(jQuery(".loggedmenuwrapper ul li a"), function () { a = Math.max(a, jQuery(this).outerWidth()) }); jQuery(".loggedmenuwrapper").width(a + 20); jQuery(".loggeduser").hover(function () { jQuery(".loggedmenuwrapper").stop().animate({ height: jQuery(".loggedmenuwrapper ul").outerHeight(true) }, 300) }, function () { jQuery(".loggeduser").oneTime("500ms", "mouseout", function () { jQuery(".loggedmenuwrapper").css({ height: 0 }) }) }); jQuery(".loggedmenuwrapper").hover(function () { jQuery(".loggeduser").stopTime("mouseout") }, function () { jQuery(".loggedmenuwrapper").css({ height: 0 }) }) } function InitLoginMenu() { jQuery(".loginbutton").hover(function () { jQuery(this).attr("src", "/sitecollectionimages/buttons/loginokhover.png") }, function () { jQuery(this).attr("src", "/sitecollectionimages/buttons/loginok.png") }); if (jQuery(".loginformwrapper").hasClass("show")) { jQuery(".loginformwrapper").css("display", "block") } jQuery(".rightitem.loginWrapper .login").click(function () { jQuery(this).siblings(".loginformwrapper").css("display", "block") }); jQuery(".loginformwrapper .closeBtn").click(function () { jQuery(this).parents(".loginformwrapper").css("display", "none") }) } function InitHomeHighlight() { var h = jQuery(".homepagehighlightwrapper .viewport"), j = h.find(".item"), e = h.find(".textwrapper").css({ display: "block", opacity: 1 }), d = e.find(".highlightText").css({ display: "block", opacity: 0 }), f = { index: -1, maxindex: j.size() - 1, timer: true }, c = h.find(".clickBox").css({ display: "block", opacity: 1 }), k = h.find(".leftArea"), i = h.find(".rightArea"), b = k.find(".clickBox"), g = i.find(".clickBox"), a = h.find(".counter").css("opacity", 1); h.data("status", f); jQuery.each(j, function (l, m) { jQuery(m).css({ left: (h.width() / 2) - (jQuery(m).width() / 2), top: (h.height() / 2) - (jQuery(m).height() / 2) }) }); jQuery.each(d, function (l, n) { var m = jQuery(n).find(".whitebuttonwrapper"); m.css("margin-left", 205); jQuery(n).css({ display: "none", opacity: 0, top: (h.height() / 2) - (jQuery(n).height() / 2) }) }); b.click(function () { var l = h.data("status"); l.index--; if (l.index < 0) { l.index = l.maxindex } h.stopTime("slideshowtimer"); if (l.timer == true) { h.everyTime("10s", "slideshowtimer", function () { g.click() }) } a.html((l.index + 1) + "/" + (l.maxindex + 1)); h.data("status", l); j.not(j.eq(l.index)).stop().css({ display: "none", opacity: 0 }); if (j.eq(l.index).is("object") || j.eq(l.index).is("embed")) { j.eq(l.index).css({ display: "block", opacity: 1 }); e.css("display", "none") } else { j.eq(l.index).stop().css("display", "block").animate({ opacity: 1 }, 700); e.css("display", "block") } d.not(d.eq(l.index)).stop().css({ display: "none", opacity: 0 }); d.eq(l.index).stop().css("display", "block").animate({ opacity: 1 }, 700) }); g.click(function () { var l = h.data("status"); l.index++; if (l.index > l.maxindex) { l.index = 0 } h.stopTime("slideshowtimer"); if (l.timer == true) { h.everyTime("10s", "slideshowtimer", function () { g.click() }) } a.html((l.index + 1) + "/" + (l.maxindex + 1)); h.data("status", l); j.not(j.eq(l.index)).stop().css({ display: "none", opacity: 0 }); if (j.eq(l.index).is("object") || j.eq(l.index).is("embed")) { j.eq(l.index).css({ display: "block", opacity: 1 }); e.css("display", "none") } else { j.eq(l.index).stop().css("display", "block").animate({ opacity: 1 }, 700); e.css("display", "block") } d.not(d.eq(l.index)).stop().css({ display: "none", opacity: 0 }); d.eq(l.index).stop().css("display", "block").animate({ opacity: 1 }, 700) }).click(); if (j.size() === 1) { a.css("display", "none"); b.css("display", "none"); g.css("display", "none") } } function ToggleSlideshowTimer(d) { var b = jQuery(".homepagehighlightwrapper .viewport"), c = b.find(".rightArea"), a = c.find(".clickBox"), d = b.data("status"); if (d == true) { d.timer = true; b.data("status", d); a.click() } else { if (d == false) { d.timer = false; b.data("status", d); b.stopTime("slideshowtimer") } else { return } } } function InitQuickFormCalendars() { jQuery(".quickreservationformwrapper .datestart, .quickreservationformwrapper .dateend").datepicker(); jQuery(".quickreservationformwrapper .imgdatestart").click(function () { jQuery(".quickreservationformwrapper .datestart").datepicker("show") }); jQuery(".quickreservationformwrapper .imgdateend").click(function () { jQuery(".quickreservationformwrapper .dateend").datepicker("show") }) } function InitScroller() { var c = jQuery(".tableviewport"), b = c.find(".tablescroller"), f = jQuery("#scrollbar"), a = jQuery("#knob"), e = b.height() - c.height(), d = e / 160; if (b.height() <= c.height()) { a.css("display", "none") } else { a.css("display", "block"); a.draggable({ axis: "y", containment: "parent", drag: function (h, g) { b.css({ top: -g.position.top * d }) } }); c.hover(function () { b.mousewheel(function (h, i) { var g = a.position().top - i; if (g > 160) { g = 160 } if (g < 0) { g = 0 } h.preventDefault(); a.css({ top: g }); b.css({ top: -g * d }) }) }, function () { b.unmousewheel() }) } } function InitQuickform() { var a = jQuery(".quickformerror"), b = jQuery(".errorBox").css("opacity", 0); a.click(function () { var c = jQuery(this).next().text(); b.css({ left: jQuery(this).offset().left + 30, top: jQuery(this).offset().top - 10 }); b.css("display", "block").stop().animate({ opacity: 1 }, 500) }); a.hover(function () { var c = jQuery(this).next().text(); b.css({ left: jQuery(this).offset().left + 30, top: jQuery(this).offset().top - 10 }); b.css("display", "block").stop().animate({ opacity: 1 }, 500) }) } jQuery(function () { jQuery(".wrap-controler-hotel, .wrap-controler-produto").each(function () { var c = jQuery(this).find(".viewport img"), d = 0, b = c.length - 1, e = jQuery(this).find(".viewport .leftBtn"), a = jQuery(this).find(".viewport .rightBtn"); c.not(c.eq(d).css("display", "block")).css({ display: "block", opacity: 0 }); e.hover(function () { jQuery(this).css("background-position", "0 -26px") }, function () { jQuery(this).css("background-position", "0 0") }).click(function () { if (--d < 0) { d = b } c.not(c.eq(d).stop().animate({ opacity: 1 }, 250, "swing")).css("opacity", 0) }); a.hover(function () { jQuery(this).css("background-position", "-26px -26px") }, function () { jQuery(this).css("background-position", "-26px 0") }).click(function () { if (++d > b) { d = 0 } c.not(c.eq(d).stop().animate({ opacity: 1 }, 250, "swing")).css("opacity", 0) }) }) }); jQuery(function () { jQuery(".seepricecalendar").click(function (a) { a.preventDefault(); jQuery(this).parents(".wrap-controler-hotel").find(".calendarioprecowrapper").css("display", "block") }); jQuery(".calendariopreco .closeBtnWrapper a").click(function (a) { a.preventDefault(); jQuery(this).parents(".calendarioprecowrapper").css("display", "none") }); jQuery(".calendariopreco .body .left .viewport img").css("opacity", 1); jQuery(".calendariopreco .body .right .line .item").each(function () { jQuery(this).css("background-image", "none").hover(function () { jQuery(this).css("background-image", 'url("/sitecollectionimages/backgrounds/calendaritem.gif")') }, function () { jQuery(this).css("background-image", "none") }) }) }); jQuery(function () { var a = 777; jQuery(".accordionwrapper").each(function () { var f = jQuery(this), c = f.find(".accordionheader .leftText"), d = f.find(".accordionbody"), b = d.find(".accordionbodywrapper"); var e = jQuery(this); e.css({ "z-index": a-- }); if (f.hasClass("open")) { d.slideDown(300) } else { d.slideUp(300) } c.click(function () { if (f.hasClass("open")) { f.removeClass("open"); d.slideUp(300) } else { f.addClass("open"); d.slideDown(300) } }) }); jQuery(".roomitem .viewport").each(function () { var e = jQuery(this), d = e.find("img"), f = 0, c = d.length - 1, g = e.find(".leftBtn"), b = e.find(".rightBtn"); d.not(d.eq(f).css("display", "block")).css({ display: "block", opacity: 0 }); g.hover(function () { jQuery(this).css("background-position", "0 -26px") }, function () { jQuery(this).css("background-position", "0 0") }).click(function () { if (--f < 0) { f = c } d.not(d.eq(f).stop().animate({ opacity: 1 }, 250, "swing")).css("opacity", 0) }); b.hover(function () { jQuery(this).css("background-position", "-26px -26px") }, function () { jQuery(this).css("background-position", "-26px 0") }).click(function () { if (++f > c) { f = 0 } d.not(d.eq(f).stop().animate({ opacity: 1 }, 250, "swing")).css("opacity", 0) }) }); jQuery(".tarifalink a").click(function (b) { b.preventDefault(); jQuery(this).parent().next().find(".tarifabox").css("display", "block") }); jQuery(".tarifabox .close a").click(function (b) { b.preventDefault(); jQuery(this).parents(".tarifabox").css("display", "none") }) }); jQuery(function () { var a = jQuery(".quickformmessage"), b = jQuery(".messageBox").css("opacity", 0); a.hover(function () { b.css({ left: jQuery(this).position().left + 20, top: jQuery(this).position().top - 15 }); b.find("p").text(jQuery(this).siblings(".quickforminfomessage").text()); b.css("display", "block").stop().animate({ opacity: 1 }, 500) }, function () { b.stop().animate({ opacity: 0 }, 500, function () { b.css("display", "none") }) }) }); jQuery(function () { jQuery(".promosliderwrapper").each(function () { var e = jQuery(this).find(".scroller"), g = jQuery(this).find(".leftbtn"), a = jQuery(this).find(".rightbtn"), b = e.find(".promoitem"), d = e.find(".promoitemseparator"), c = 0, f = b.length - 3; e.width(b.width() * b.length + d.width() * d.length); if (b.length <= 3) { g.css({ "background-image": "none", cursor: "default" }); a.css({ "background-image": "none", cursor: "default" }) } else { g.css("opacity", 0.4).hover(function () { g.stop().animate({ opacity: 1 }, 200, "swing") }, function () { g.stop().animate({ opacity: 0.4 }, 200, "swing") }).click(function () { c--; if (c < 0) { c = 0 } e.stop().animate({ left: -(b.width() + d.width()) * c }, 500, "swing") }); a.css("opacity", 0.4).hover(function () { a.stop().animate({ opacity: 1 }, 200, "swing") }, function () { a.stop().animate({ opacity: 0.4 }, 200, "swing") }).click(function () { c++; if (c > f) { c = f } e.stop().animate({ left: -(b.width() + d.width()) * c }, 500, "swing") }) } }) }); jQuery(function () { jQuery(".promohotelitem").each(function () { var c = jQuery(this).find(".viewport img"), d = 0, b = c.length - 1, e = jQuery(this).find(".viewport .leftBtn"), a = jQuery(this).find(".viewport .rightBtn"); c.not(c.eq(d).css("display", "block")).css({ display: "block", opacity: 0 }); e.hover(function () { jQuery(this).css("background-position", "0 -26px") }, function () { jQuery(this).css("background-position", "0 0") }).click(function () { if (--d < 0) { d = b } c.not(c.eq(d).stop().animate({ opacity: 1 }, 250, "swing")).css("opacity", 0) }); a.hover(function () { jQuery(this).css("background-position", "-26px -26px") }, function () { jQuery(this).css("background-position", "-26px 0") }).click(function () { if (++d > b) { d = 0 } c.not(c.eq(d).stop().animate({ opacity: 1 }, 250, "swing")).css("opacity", 0) }) }) }); jQuery(function () { jQuery(".agendalistitem .clicker").each(function () { var a = jQuery(this).siblings(".agendapopup"), b = a.find(".closeBtnWrapper a"); jQuery(this).click(function () { a.css("display", "block") }); b.click(function (c) { c.preventDefault(); a.css("display", "none") }) }).hover(function () { jQuery(this).find("h4").css("text-decoration", "underline") }, function () { jQuery(this).find("h4").css("text-decoration", "none") }) }); jQuery(function () { jQuery(".lightbox.nopadding").each(function () { var a = 0, b = jQuery(this).find(".smallColumn"); b.each(function (c, d) { a = Math.max(a, jQuery(d).height()) }); if (a > 0) { b.height(a) } }) }); function SetupPromoScroll() { var e = jQuery(".promotionswrapper .viewport"), d = e.find(".scroll"), g = jQuery(".promotionswrapper .promoitem"), i = jQuery(".promotionswrapper .promoseparator"), j = jQuery(".promotionswrapper .leftArea"), h = jQuery(".promotionswrapper .rightArea"), b = j.find(".click"), f = h.find(".click"), a = e.find(".counter").css("opacity", 1), c = { index: 0, maxindex: g.size() - 3, timer: false }; e.data("status", c); d.width(g.width() * g.length + i.width() * i.length); if (d.width() > e.width()) { j.css({ display: "block", opacity: 1 }); h.css({ display: "block", opacity: 1 }); b.click(function () { var k = e.data("status"); k.index--; if (k.index < 0) { k.index = k.maxindex } a.html((k.index + 3) + "/" + (k.maxindex + 3)); e.data("status", k); d.stop().animate({ left: -(k.index * (g.width() + i.width())) }, 550, "swing") }); f.click(function () { var k = e.data("status"); k.index++; if (k.index > k.maxindex) { k.index = 0 } a.html((k.index + 3) + "/" + (k.maxindex + 3)); e.data("status", k); d.stop().animate({ left: -(k.index * (g.width() + i.width())) }, 550, "swing") }); a.html((c.index + 3) + "/" + (c.maxindex + 3)) } } function InitRegiaoMapAccordion() { var b = jQuery(".regiaoMapWrapper"), c = jQuery(".regiaoHeader .accordionclicker span.close"), a = jQuery(".regiaoHeader .accordionclicker span.open"); c.click(function () { jQuery(".mapoverlaywrapper").css("display", "none"); b.stop().animate({ height: 0 }, 200, "swing", function () { c.css("display", "none"); a.css("display", "block") }) }); a.click(function () { b.stop().animate({ height: 405 }, 750, "swing", function () { c.css("display", "block"); a.css("display", "none") }) }) } function InitRegiaoMap() { var a = { center: new google.maps.LatLng(MapOptions.center.latitude, MapOptions.center.longitude), zoom: MapOptions.zoom, disableDefaultUI: true, zoomControl: true, mapTypeId: google.maps.MapTypeId.ROADMAP }; var f = new google.maps.Map(document.getElementById("gmap"), a); var e = jQuery.Event("marker"); var c = 0; var b = 0; var d = function (m, g, n) { var k = jQuery(".mapoverlaywrapper"), i = k.find("img"), j = k.find("h2"), h = k.find("h3"), l = k.find(".price"); if (m.type == "pestana" || m.type == "futurehotel") { k.removeClass("dark").addClass("light") } else { if (m.type == "pousadas") { k.removeClass("light").addClass("dark") } } i.attr("src", m.image_url); i.parent().attr("href", m.hotelurl); j.html('<a href="' + m.hotelurl + '" target="_self">' + m.name + "</a>"); h.html(m.location); if (m.price != undefined) { k.find(".price, .horizontalSeparator").css("display", "block"); l.html(m.price) } else { k.find(".price, .horizontalSeparator").css("display", "none") } k.css({ display: "block", top: n - k.height() + 25, left: g }).unbind("mouseleave").bind("mouseleave", function () { k.css("display", "none") }) }; jQuery(document).bind("marker", function (g) { }).mousemove(function (g) { c = g.pageX; b = g.pageY }); jQuery.each(MapObjects, function (i, j) { var h = null; if (j.type == "pestana") { h = new google.maps.MarkerImage("/sitecollectionimages/icons/marker_type_1.png") } else { if (j.type == "futurehotel") { h = new google.maps.MarkerImage("/sitecollectionimages/icons/marker_type_2.png") } else { if (j.type == "pousadas") { h = new google.maps.MarkerImage("/sitecollectionimages/icons/marker_type_3.png") } } } var g = new google.maps.Marker({ clickable: true, cursor: "pointer", flat: true, icon: h, map: f, optimized: false, position: new google.maps.LatLng(j.coordinates.latitude, j.coordinates.longitude), visible: true }); google.maps.event.addDomListener(g, "mouseover", function (k) { d(j, c, b) }); MapMarkers.push(g) }) } function InitArticleToggler() { var a = jQuery(".innermenuitem a"), b = jQuery(".articleWrapper"); a.click(function (d) { var c = a.index(jQuery(this)); d.preventDefault(); a.parents("li").removeClass("selected"); jQuery(this).parents("li").addClass("selected"); b.css("display", "none"); b.eq(c).css("display", "block") }).eq(0).click() } function InitContactForm() { jQuery(".contactdatastart").datepicker(); jQuery(".contactdataend").datepicker(); jQuery(".contactimgstart").click(function () { jQuery(".contactdatastart").datepicker("show") }); jQuery(".contactimgend").click(function () { jQuery(".contactdataend").datepicker("show") }) } jQuery(".btn-gallery-photo").live("click", function (a) { a.preventDefault(); jQuery(".wrap-gallery").pestanaGallery({ type: "photo" }) }); jQuery(".btn-gallery-video").live("click", function (a) { a.preventDefault(); jQuery(".wrap-gallery").pestanaGallery({ type: "video" }) }); jQuery(".btn-gallery-close").live("click", function (a) { a.preventDefault(); jQuery(".wrap-gallery").pestanaGallery("destroy") }); (function (b) { var a = { init: function (c) { return this.each(function () { var r = b(this); var i = jQuery(".wrap-modalWindow").css("opacity", 0); var p = jQuery(document).width(); var t = jQuery(document).height(); var n = (jQuery(window).width() / 2) - 430; r.css("left", n + "px"); i.css({ height: t, width: p, display: "block" }).animate({ opacity: 1 }, 300, function () { r.css("display", "block"); jQuery(window).scrollTop(0) }); var u = jQuery(".filtersList"); var q = jQuery(".imgUrls"); var g = jQuery(".thumbsUrls"); var h = jQuery(".thumbsList"); jQuery(".filtersList a").live("click", function (x) { x.preventDefault(); var w = jQuery(this); var v = w.attr("name"); jQuery(".imagesList").html(""); u.find(".active").removeClass("active"); w.addClass("active"); jQuery(".thumbsList ul").css("top", "0px"); h.find(".visible").css("display", "none").removeClass("visible"); h.find("." + v + "").css("display", "block").addClass("visible"); if (jQuery(".imagesList img").length == 0) { jQuery(".thumbsList .visible li:first a").click() } }); var s = jQuery(".wrap-modalWindow .viewport_g"); var k = s.find(".item_g").stop().css({ display: "none", opacity: 0 }); var e = s.find(".clickBox_g").css({ display: "block", opacity: 0.8 }); var d = s.find(".leftArea_g"); var l = s.find(".rightArea_g"); var m = d.find(".clickBox_g"); var o = l.find(".clickBox_g"); var j = s.find(".counter_g").css("opacity", 1); m.live("click", function () { var w = jQuery(".imagesList img:visible"); var v = w.attr("id"); var B = jQuery(".thumbsList .visible li").size(); var z = jQuery(".thumbsList .visible li.selected").index(); var y = jQuery('.thumbsList .visible input[id="' + v + '"]').parent().prev().find("a"); var A = jQuery(".thumbsList .visible ul"); if (y.length > 0) { var x = y.parent().position().top; y.click(); if (x >= 272 && x < (B - 1) * 68) { A.stop().animate({ top: "+=68" }) } } else { jQuery(".thumbsList .visible li:last a").click(); A.stop().animate({ top: "-" + ((B * 68) - 340) + "" }) } }); o.live("click", function () { var x = jQuery(".imagesList img:visible"); var v = x.attr("id"); var C = jQuery(".thumbsList .visible li").size(); var A = jQuery(".thumbsList .visible li.selected").index(); var z = jQuery('.thumbsList .visible input[id="' + v + '"]').parent().next().find("a"); var B = jQuery(".thumbsList .visible ul"); if (z.length > 0) { var y = z.parent().position().top; var w = B.position().top; z.click(); if (y >= 340 && w > (C - 6) * (-68)) { B.stop().animate({ top: "-=68" }) } } else { jQuery(".thumbsList .visible li:first a").click(); B.stop().animate({ top: 0 }) } }); var f = function (y) { var y = y; var z = jQuery(".thumbsList .visible ul"); var w = z.find("li").size(); var x = w * 68 - 408; var A = w * 68 - 340; var v = z.position().top; jQuery(".thumbsList").append('<div class="block">&nbsp;</div>'); if (y === "bottom") { if (v >= -x) { z.stop().animate({ top: "-=68" }, 500, function () { jQuery(".thumbsList .block").remove() }) } else { z.stop().animate({ top: -A }, 500, function () { jQuery(".thumbsList .block").remove() }) } } else { if (y === "top") { if (v < -66) { z.stop().animate({ top: "+=68" }, 500, function () { jQuery(".thumbsList .block").remove() }) } else { z.stop().animate({ top: 0 }, 500, function () { jQuery(".thumbsList .block").remove() }) } } else { return } } }; jQuery(".nextB").bind("click touchend", function (v) { v.preventDefault(); f("bottom") }); jQuery(".prevT").bind("click touchend", function (v) { v.preventDefault(); f("top") }); jQuery(".thumbsList .visible a").live("click", function (C) { C.preventDefault(); var F = jQuery(this); var B = F.parent().index(); var G = jQuery(".wrap-gallery .item_g"); var H = jQuery(".wrap-gallery .viewport_g .imagesList"); var E = jQuery(".wrap-gallery .viewport_g .textsList"); var w = jQuery(".wrap-gallery .viewport_g .textsList p"); var x = jQuery(".thumbsList .visible li").size(); var I = F.next().next(); var v = I.attr("id"); var y = I.attr("alt"); var K = I.val(); jQuery(".thumbsList").find(".selected").removeClass("selected"); F.parent().addClass("selected"); G.stop().css({ display: "none", opacity: 0 }); w.stop().css({ display: "none", opacity: 0 }); if (H.find("#" + v + "").length > 0) { H.find("#" + v + "").css({ display: "block", opacity: 1 }); E.find("#txt-" + v + "").css({ display: "block", opacity: 1 }); var z = jQuery(".wrap-modalWindow-fullscreen .viewport_g .imagesList"); var A = H.html(); var D = jQuery(".wrap-modalWindow-fullscreen .viewport_g .textsList"); var J = E.html(); z.html("").html(A); D.html("").html(J); z.find("#" + v + "").css({ display: "block", opacity: 1 }).css({ height: "560px" }); D.find("#txt-" + v + "").css({ display: "block", opacity: 1 }) } else { H.append('<img id="' + v + '" class="item_g" alt="' + y + '" src="' + K + '" />'); E.append('<p id="txt-' + v + '">' + y + "</p>"); jQuery("#" + v + "").load(function () { var L = jQuery(this); L.css({ display: "block", opacity: 1 }); E.find("#txt-" + v + "").css({ display: "block", opacity: 1 }) }); var z = jQuery(".wrap-modalWindow-fullscreen .viewport_g .imagesList"); var A = H.html(); var D = jQuery(".wrap-modalWindow-fullscreen .viewport_g .textsList"); var J = E.html(); z.html("").html(A); D.html("").html(J); z.find("#" + v + "").css({ display: "block", opacity: 1 }).css({ height: "560px" }); D.find("#txt-" + v + "").css({ display: "block", opacity: 1 }) } if (x > 1) { jQuery(".wrap-gallery .counter_g").css("display", "block"); jQuery(".wrap-modalWindow-fullscreen .counter_g").css("display", "block"); jQuery(".wrap-gallery .counter_g").html((B + 1) + "/" + x); jQuery(".wrap-modalWindow-fullscreen .counter_g").html((B + 1) + "/" + x) } else { jQuery(".wrap-gallery .counter_g").css("display", "none"); jQuery(".wrap-modalWindow-fullscreen .counter_g").css("display", "none") } }); jQuery(".filtersList a.selected").click() }) }, destroy: function () { return this.each(function () { var f = b(this); var d = jQuery(".wrap-modalWindow .viewport_g"); var g = d.find(".leftArea_g"); var e = d.find(".rightArea_g"); var h = g.find(".clickBox_g"); var c = e.find(".clickBox_g"); jQuery(".filtersList a").die("click"); jQuery(".thumbsList .visible a").die("click"); c.die("click"); h.die("click"); jQuery(".imagesList").html(""); jQuery(".textsList").html(""); jQuery(".wrap-modalWindow").animate({ opacity: 0 }, 300, function () { jQuery(this).css("display", "none"); jQuery(".wrap-gallery").css("display", "none") }) }) } }; b.fn.pestanaGallery = function (c) { if (a[c]) { return a[c].apply(this, Array.prototype.slice.call(arguments, 1)) } else { if (typeof c === "object" || !c) { return a.init.apply(this, arguments) } else { b.error("Method " + c + " does not exist on jQuery.pestanaGallery") } } } })(jQuery); jQuery(".btn-gallery-fullscreen").live("click", function (a) { a.preventDefault(); jQuery(".wrap-modalWindow-fullscreen").pestanaGalleryFullscreen() }); jQuery(".btn-gallery-fullscreen-close").live("click", function (a) { a.preventDefault(); jQuery(".wrap-modalWindow-fullscreen").pestanaGalleryFullscreen("destroy") }); (function (b) { var a = { init: function (c) { return this.each(function () { var i = b(this).css("opacity", 0); var p = b(this).children(); var j = jQuery(document).width(); var f = jQuery(document).height(); var r = (jQuery(window).width() / 2) - 480; p.css("left", r + "px"); i.css({ height: f, width: j, display: "block" }).animate({ opacity: 1 }, 300, function () { p.css("display", "block"); jQuery(window).scrollTop(0) }); var h = i.find(".viewport_g"); var g = h.find(".leftArea_g"); var n = h.find(".rightArea_g"); var l = g.find(".clickBox_g"); var e = n.find(".clickBox_g"); var m = jQuery(".wrap-modalWindow .viewport_g"); var q = m.find(".leftArea_g"); var o = m.find(".rightArea_g"); var d = q.find(".clickBox_g"); var k = o.find(".clickBox_g"); l.live("click", function () { d.click() }); e.live("click", function () { k.click() }) }) }, destroy: function () { return this.each(function () { var c = b(this); var h = b(this).children(); var g = c.find(".viewport_g"); var f = g.find(".leftArea_g"); var i = g.find(".rightArea_g"); var d = f.find(".clickBox_g"); var e = i.find(".clickBox_g"); e.die("click"); d.die("click"); c.find(".textsList").html(""); c.animate({ opacity: 0 }, 300, function () { jQuery(this).css("display", "none"); h.css("display", "none") }) }) } }; b.fn.pestanaGalleryFullscreen = function (c) { if (a[c]) { return a[c].apply(this, Array.prototype.slice.call(arguments, 1)) } else { if (typeof c === "object" || !c) { return a.init.apply(this, arguments) } else { b.error("Method " + c + " does not exist on jQuery.pestanaGalleryFullscreen") } } } })(jQuery); (function (b) { var a = { init: function (c) { return this.each(function () { var d = jQuery(".wrap-modalWindow"); var g = jQuery(this); var h = g.children(); var i = jQuery(document).width(); var f = jQuery(document).height(); var e = (jQuery(window).width() / 2) - 430; d.append(g.html()); d.css({ height: f, width: i, display: "block" }).animate({ opacity: 1 }, 300, function () { h.css("display", "block"); jQuery(window).scrollTop(0) }) }) }, close: function (c) { return this.each(function () { var d = jQuery(this); var e = d.children(); e.animate({ opacity: 0 }, 200, function () { d.css({ height: 0, width: 0 }).animate({ opacity: 0 }, 300, function () { d.css({ display: "none" }).html("") }) }) }) } }; b.fn.tarifaPopup = function (c) { if (a[c]) { return a[c].apply(this, Array.prototype.slice.call(arguments, 1)) } else { if (typeof c === "object" || !c) { return a.init.apply(this, arguments) } else { b.error("Method " + c + " does not exist on jQuery.pestanaGallery") } } } })(jQuery); jQuery(document).ready(function () { jQuery(".btn-tarifa, .btn-facilities").bind("click touchend", function (b) { var a = $(this).parent().next(); b.preventDefault(); a.tarifaPopup() }); jQuery(".btn-tarifa-close").live("click touchend", function (a) { a.preventDefault(); jQuery(".wrap-modalWindow").tarifaPopup("close") }); jQuery(".thumb").hover(function () { var a = jQuery(this); a.next().css("display", "block") }, function () { var a = jQuery(this); a.next().css("display", "none") }) }); jQuery(document).ready(function () { jQuery("input[name=adress]:first").click(); jQuery("input[name=adress]").change(function () { if (jQuery(".delivery:checked").length > 0) { jQuery(".dados-entrega").slideDown(300) } else { jQuery(".dados-entrega").slideUp(300) } }).css("cursor", "pointer") }); jQuery(document).ready(function () { jQuery(".btn-enlarge").click(function (d) { d.preventDefault(); var c = jQuery(".leftColumn .wrap-map").html(); var a = jQuery(".wrap-modalWindow"); var f = jQuery("body").width(); var b = jQuery("body").height(); jQuery(".leftColumn .wrap-map").html(""); jQuery(".leftColumn .wrap-btn-enlarge").css("display", "none"); a.addClass("modalMap").css({ height: b, width: f, display: "block" }).animate({ opacity: 0.7 }, 300); jQuery(".leftColumn .wrap-map-enlarge").css({ display: "block" }); jQuery(".whitebox.wrapper-map-enlarge").css({ background: "none" }); jQuery(".wrap-map-enlarge .wrap-gmapslocation").html(c); initialize() }); jQuery(".wrap-map-enlarge .close a").click(function (c) { c.preventDefault(); var b = jQuery(".wrap-map-enlarge .wrap-gmapslocation").html(); var a = jQuery(".wrap-modalWindow"); jQuery(".wrap-map-enlarge .wrap-gmapslocation").html(""); jQuery(".wrap-map-enlarge").css("display", "none"); jQuery(".whitebox.wrapper-map-enlarge").css({ background: "#fff" }); a.animate({ opacity: 0 }, 300, function () { a.css({ display: "none" }) }).removeClass("modalMap"); jQuery(".leftColumn .wrap-btn-enlarge").css("display", "block"); jQuery(".wrap-map").html(b); initialize() }); jQuery(".modalMap").live("click", function () { jQuery(".wrap-map-enlarge .close a").click() }); jQuery(".payment").change(function () { if (jQuery(".payment_cc:selected").length > 0) { jQuery(".wrap-reservationform").slideDown(300) } else { if (jQuery(".wrap-reservationform:visible").length > 0) { jQuery(".wrap-reservationform").slideUp(300) } } }) }); function ShowLoginWindow1(loginWindow1Height) { jQuery("#lw1continue input").removeAttr("checked"); jQuery(".loginWindow2Wrapper").stop().animate({ height: loginWindow1Height }, 500, "swing") } function HideLoginWindows() { jQuery("#lw1login input").removeAttr("checked"); jQuery(".loginWindow2Wrapper").stop().animate({ height: 0 }, 500, "swing") } jQuery(function () { var loginWindow1Height = jQuery(".loginWindow2").outerHeight(); jQuery(".loginWindow2Wrapper").height(0); if (jQuery("#lw1login input[type=radio][checked]").val() != undefined) { ShowLoginWindow1(loginWindow1Height) } else { if (jQuery("#lw1continue input[type=radio][checked]").val() != undefined) { HideLoginWindows() } } jQuery("#lw1login input").click(function () { ShowLoginWindow1(loginWindow1Height) }); jQuery("#lw1continue input").click(function () { HideLoginWindows() }) });
