(function(a){a.fn.hoverIntent=function(k,j){var l={sensitivity:7,interval:100,timeout:0};l=a.extend(l,j?{over:k,out:j}:k);var n,m,h,d;var e=function(f){n=f.pageX;m=f.pageY};var c=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);if((Math.abs(h-n)+Math.abs(d-m))<l.sensitivity){a(f).unbind("mousemove",e);f.hoverIntent_s=1;return l.over.apply(f,[g])}else{h=n;d=m;f.hoverIntent_t=setTimeout(function(){c(g,f)},l.interval)}};var i=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);f.hoverIntent_s=0;return l.out.apply(f,[g])};var b=function(q){var o=(q.type=="mouseover"?q.fromElement:q.toElement)||q.relatedTarget;while(o&&o!=this){try{o=o.parentNode}catch(q){o=this}}if(o==this){return false}var g=jQuery.extend({},q);var f=this;if(f.hoverIntent_t){f.hoverIntent_t=clearTimeout(f.hoverIntent_t)}if(q.type=="mouseover"){h=g.pageX;d=g.pageY;a(f).bind("mousemove",e);if(f.hoverIntent_s!=1){f.hoverIntent_t=setTimeout(function(){c(g,f)},l.interval)}}else{a(f).unbind("mousemove",e);if(f.hoverIntent_s==1){f.hoverIntent_t=setTimeout(function(){i(g,f)},l.timeout)}}};return this.mouseover(b).mouseout(b)}})(jQuery);(function(a){a.fn.clicky=function(b,c){return this.each(function(){var g=a(this);var f;if(b){f=g.find(b).eq(0)}else{f=g.find("a");if(f.length!=1){f=null}}var e=g;if(c){var d=g.find(c);e=(d.length)?d:g}if(f){e.each(function(){a(this).click(function(h){if(h.target.nodeName!="a"){window.location=f.attr("href")}h.preventDefault()}).css("cursor","pointer").attr("title",f.attr("title"))})}})}})(jQuery);var ModalDialog={open:function(b,a){if(typeof($.fn.modal)==="function"){if(typeof(a)==="object"){if(a.onCloseEffect){a.onClose=function(c){c.data.fadeOut("slow",function(){c.container.hide(0,function(){c.overlay.fadeOut("fast",function(){$.modal.close()})})})}}$(b).modal(a)}else{$(b).modal()}}},close:function(){$.modal.close()}};(function(b){b.fn.picViewer=function(c){var e={clNext:".pv-next",clPrev:".pv-prev",clBank:".pv-bank",clNum:".pv-num",clPicLink:".pv-pic",clPicImg:".pv-pic img",time:4000};var d=b.extend("",e,c);return this.each(function(){var o=this;var g=b(d.clBank+" > li",o);var q=b(d.clPicLink,o);var l=b(d.clPicImg,o);var p=g.length;if(p==0){return}var h={lang:site_cfg.lang};b(".pv-panel").remove();var m='<p class="pv-panel"> <a href="#" class="pv-next">'+h.lang.nastepne+'</a> <a href="#" class="pv-prev">'+h.lang.poprzednie+'</a> <span class="pv-num"><em></em></span> </p>';b(m).insertAfter(q);var k=b('<span class="loader" />').appendTo(q);l.load(function(){q.removeClass("loading");l.show()});var f=b(d.clNum,o);var n=0;a(1,p,f);var i=[];g.each(function(s,t){i.push({href:b(" a",t).attr("href"),src:b(" img",t).attr("src")})});b(d.clNext,this).bind("click slide",function(s,t){if(s.type=="click"){clearInterval(r)}l.hide(0,function(){q.addClass("loading");if(++n>p-1){n=0}a(n+1,p,f);l.attr("src",i[n].href)});s.preventDefault()}).attr("title","następne zdjęcie").show();b(d.clPrev,this).bind("click slide",function(s,t){if(s.type=="click"){clearInterval(r)}l.hide(0,function(){q.addClass("loading");if(--n<0){n=p-1}a(n+1,p,f);l.attr("src",i[n].href)});s.preventDefault()}).attr("title","poprzednie zdjęcie").show();var j=b(d.clNext,o);if(typeof(d.time)==="number"){var r=setInterval(function(){j.trigger("slide")},d.time)}})};function a(d,e,c){c.html(d+" <em>/ "+e+"</em>")}})(jQuery);$(function(){var a=$("#searchbox");a.find(".toggler a, h2").click(function(){var b=a.find(".ext");b.slideToggle(222,function(){if(b.filter(":animated").length<=1){a.toggleClass("extended")}});return false});$('#nav > ul > li:not(".current")').hoverIntent({sensitivity:3,interval:50,timeout:250,over:function(){$t=$(this);$t.addClass("h");$(" div.sub",this).show().css("z-index","999")},out:function(){$t=$(this);$t.removeClass("h");$(" div.sub",this).fadeOut("fast",function(){$(this).css("z-index","");$t.parent().find("li.current > ul").show()})}});$.tools.dateinput.localize("pl",{months:"Styczeń,Luty,Marzec,Kwiecień,Maj,Czerwiec,Lipiec,Sierpień,Wrzesień,Październik,Listopad,Grudzień",shortMonths:"Sty,Lut,Mar,Kwi,Maj,Cze,Lip,Sie,Wrz,Paź,Lis,Gru",days:"Niedziela,Poniedziałek,Wtorek,Środa,Czwartek,Piątek,Sobota",shortDays:"Ni,Po,Wt,Śr,Cz,Pt,So"});$(".datepicker :text").dateinput({lang:"pl",format:"yyyy-mm-dd",min:2,selectors:true});$(".datepicker").each(function(){var b=$(":text",this).eq(0).data("dateinput");$(this).find("img").toggle(function(){b.show();return false},function(){b.hide();return false})});$("#infoline .switch").tabs("#infoline .pane",{effect:"fade",fadeOutSpeed:600,fadeInSpeed:400,rotate:true}).slideshow({autoplay:true,interval:3000});$("#consult-box .switch").tabs("#consult-box .pane",{effect:"fade",fadeOutSpeed:600,fadeInSpeed:400,rotate:true}).slideshow({autoplay:true,interval:3000});$("#home-dayoffers .nav ul").tabs("#home-dayoffers .box > .panes > div",{effect:"fade",rotate:true,tabs:"li"});$("#home-dayoffers .pager").tabs("> .panes .pane",{effect:"fade",rotate:true}).slideshow({autoplay:true,interval:5000,clickable:false});$("#cat-teaser .pager").tabs("#cat-teaser .panes > div",{effect:"fade",rotate:true});$("#cat-cols .pager-thick").tabs("#cat-cols .panes > div",{effect:"fade",rotate:true,onBeforeClick:function(c,b){var d=this.getPanes().eq(b);if(d.is(":empty")){d.html('<div class="loader"><i></i><span>pobieranie ofert...</span></div>');d.load(this.getTabs().eq(b).attr("href"))}}});$("#offer-tabs .tabs").tabs("#offer-tabs .panes > div",{tabs:"li",effect:"fade",onBeforeClick:function(c,b){var d=this.getPanes().eq(b);d.type=d.hasClass("pane_photos")?"photos":d.hasClass("pane_reviews")?"reviews":d.hasClass("pane_map")?"map":null;if(d.type){d.data("type",d.type)}if(d.is(":empty")){d.html('<div class="loader"><i></i><span>wczytywanie...</span></div>');d.load(this.getTabs().eq(b).find("a").attr("href"),function(){if(d.type==="photos"){d.append('<div class="loader"><i></i><span>wczytywanie...</span></div>');$.getScript(site_cfg.url.js+"jquery/colorbox-min.js",function(){d.find(".loader").remove();$(".pane_photos a[rel='hotelgallery']").colorbox({transition:"fade"});$(".pane_photos").delegate(".pager a","click",function(){var e=$(this).attr("href");d.html('<div class="loader"><i></i><span>wczytywanie...</span></div>');d.load(e,function(){$(".pane_photos a[rel='hotelgallery']").colorbox({transition:"fade"})});return false})})}else{if(d.type==="reviews"){$(".pane_reviews").delegate(".pager a","click",function(){var e=$(this).attr("href");d.html('<div class="loader"><i></i><span>wczytywanie...</span></div>');d.load(e,function(){});return false})}else{if(d.type==="map"){initialize()}}}})}else{switch(d.type){case"photos":d.append('<div class="loader"><i></i><span>wczytywanie...</span></div>');$.getScript(site_cfg.url.js+"jquery/colorbox-min.js",function(){d.find(".loader").remove();$(".pane_photos a[rel='hotelgallery']").colorbox({transition:"fade"});$(".pane_photos").delegate(".pager a","click",function(){var e=$(this).attr("href");d.html('<div class="loader"><i></i><span>wczytywanie...</span></div>');d.load(e,function(){$(".pane_photos a[rel='hotelgallery']").colorbox({transition:"fade"})});return false})});break;case"reviews":$(".pane_reviews").delegate(".pager a","click",function(){var e=$(this).attr("href");d.html('<div class="loader"><i></i><span>wczytywanie...</span></div>');d.load(e,function(){});return false});break}}},onClick:function(c,b){var d=this.getPanes().eq(b);if(d.data("type")==="map"){initialize()}}});$(":input[title]").each(function(){var b=$(this);if(b.val()===""){b.val(b.attr("title"))}b.focus(function(){if(b.val()===b.attr("title")){b.val("")}});b.blur(function(){if(b.val()===""){b.val(b.attr("title"))}})});(function(){var e=$("#participants-min_num").html(),b=$("#participants-max_num").html(),f=$("#offer-bookingform #participants"),d=f.find("> li.template");d.removeClass("template").detach();var c=f.children(":not('.template')").length;if(c<e||c==0){d.clone().appendTo(f)}f.delegate(".btn-add","click",function(){if(f.children().length<b){d.clone().hide().appendTo(f).fadeIn()}else{alert("Dodano maksymalną ilość osób.")}return false}).delegate(".btn-del","click",function(){if(f.children().length>e){$(this).closest("li").fadeOut().remove()}return false})})();$(".offers-list .from .more a").tooltip({offset:[10,2],effect:"slide"}).dynamic({bottom:{direction:"down",bounce:true}});if(typeof($.fn.colorbox)==="function"){$("div.product .thumb a").colorbox()}$(".picviewer").picViewer({time:false});$(".fauxshowhide-toggler a").live("click",function(){$(this).parent(".fauxshowhide-toggler").toggleClass("fauxshowhide-toggler-collapsed");$($(this).attr("href")).toggleClass("fauxshowhide-content-collapsed");return false});$(".weather-days li.city .h").clicky()});if(typeof(site_cfg)==="undefined"){var site_cfg={}}site_cfg.lang={zwin:"zwiń",poprzednie:"poprzednie",nastepne:"następne"};
