(function(ab){var T=ab(window),ad,ar,S=-1,aj,aa,U,ac,Z,M,af,ak=!window.XMLHttpRequest,au=window.opera&&(document.compatMode=="CSS1Compat")&&(ab.browser.version>=9.3),al=document.documentElement,am={},ae=new Image(),O=new Image(),Q,ay,aq,ah,P,av,R,aw,X,N;ab(function(){ab("body").append(ab([Q=ab('<div id="lbOverlay" />')[0],ay=ab('<div id="lbCenter" />')[0],R=ab('<div id="lbBottomContainer" />')[0]]).css("display","none"));aq=ab('<div id="lbImage" />').appendTo(ay).append(ah=ab('<div style="position: relative;" />').append([P=ab('<a id="lbPrevLink" href="#" />').click(W)[0],av=ab('<a id="lbNextLink" href="#" />').click(at)[0]])[0])[0];aw=ab('<div id="lbBottom" />').appendTo(R).append([ab('<a id="lbCloseLink" href="#" />').add(Q).click(V)[0],X=ab('<div id="lbCaption" />')[0],N=ab('<div id="lbNumber" />')[0],ab('<div style="clear: both;" />')[0]])[0]});ab.slimbox=function(a,b,c){ad=ab.extend({loop:false,overlayOpacity:0.8,overlayFadeDuration:400,resizeDuration:400,resizeEasing:"swing",initialWidth:250,initialHeight:250,imageFadeDuration:400,captionAnimationDuration:400,counterText:"Image {x} of {y}",closeKeys:[27,88,67],previousKeys:[37,80],nextKeys:[39,78]},c);
if(typeof a=="string"){a=[[a,b]];b=0}Z=T.scrollTop()+((au?al.clientHeight:T.height())/2);M=ad.initialWidth;af=ad.initialHeight;ab(ay).css({top:Math.max(0,Z-(af/2)),width:M,height:af,marginLeft:-M/2}).show();ac=ak||(Q.currentStyle&&(Q.currentStyle.position!="fixed"));if(ac){Q.style.position="absolute"}ab(Q).css("opacity",ad.overlayOpacity).fadeIn(ad.overlayFadeDuration);Y();an(1);ar=a;ad.loop=ad.loop&&(ar.length>1);return ax(b)};ab.fn.slimbox=function(d,a,b){a=a||function(e){return[e.href,e.title]};b=b||function(){return true};var c=this;return c.unbind("click").click(function(){var g=this,e=0,f,j=0,h;f=ab.grep(c,function(k,l){return b.call(g,k,l)});for(h=f.length;j<h;++j){if(f[j]==g){e=j}f[j]=a(f[j],j)}return ab.slimbox(f,e,d)})};function Y(){var a=T.scrollLeft(),b=au?al.clientWidth:T.width();ab([ay,R]).css("left",a+(b/2));if(ac){ab(Q).css({left:a,top:T.scrollTop(),width:b,height:T.height()})}}function an(b){ab("object").add(ak?"select":"embed").each(function(d,c){if(b){ab.data(c,"slimbox",c.style.visibility)}c.style.visibility=b?"hidden":ab.data(c,"slimbox")
});var a=b?"bind":"unbind";T[a]("scroll resize",Y);ab(document)[a]("keydown",ai)}function ai(a){var b=a.keyCode,c=ab.inArray;return(c(b,ad.closeKeys)>=0)?V():(c(b,ad.nextKeys)>=0)?at():(c(b,ad.previousKeys)>=0)?W():false}function W(){return ax(aa)}function at(){return ax(U)}function ax(a){if(a>=0){S=a;aj=ar[S][0];aa=(S||(ad.loop?ar.length:0))-1;U=((S+1)%ar.length)||(ad.loop?0:-1);ag();ay.className="lbLoading";am=new Image();am.onload=ao;am.src=aj}return false}function ao(){ay.className="";ab(aq).css({backgroundImage:"url("+aj+")",visibility:"hidden",display:""});ab(ah).width(am.width);ab([ah,P,av]).height(am.height);ab(X).html(ar[S][1]||"");ab(N).html((((ar.length>1)&&ad.counterText)||"").replace(/{x}/,S+1).replace(/{y}/,ar.length));if(aa>=0){ae.src=ar[aa][0]}if(U>=0){O.src=ar[U][0]}M=aq.offsetWidth;af=aq.offsetHeight;var a=Math.max(0,Z-(af/2));if(ay.offsetHeight!=af){ab(ay).animate({height:af,top:a},ad.resizeDuration,ad.resizeEasing)}if(ay.offsetWidth!=M){ab(ay).animate({width:M,marginLeft:-M/2},ad.resizeDuration,ad.resizeEasing)
}ab(ay).queue(function(){ab(R).css({width:M,top:a+af,marginLeft:-M/2,visibility:"hidden",display:""});ab(aq).css({display:"none",visibility:"",opacity:""}).fadeIn(ad.imageFadeDuration,ap)})}function ap(){if(aa>=0){ab(P).show()}if(U>=0){ab(av).show()}ab(aw).css("marginTop",-aw.offsetHeight).animate({marginTop:0},ad.captionAnimationDuration);R.style.visibility=""}function ag(){am.onload=null;am.src=ae.src=O.src=aj;ab([ay,aq,aw]).stop(true);ab([P,av,aq,R]).hide()}function V(){if(S>=0){ag();S=aa=U=-1;ab(ay).hide();ab(Q).stop().fadeOut(ad.overlayFadeDuration,an)}return false}})(jQuery);jQuery(function(a){a("a[rel^='lightbox']").slimbox({},null,function(b){return(this==b)||((this.rel.length>8)&&(this.rel==b.rel))})});function showProductComponents(b){if(b.selectedIndex<0){return}opts=document.getElementById("pm_product_component").options;opts.length=0;var d=b.options[b.selectedIndex].value;var a=productComponents[d].length;for(var c=0;c<a;c++){opts[opts.length]=new Option(productComponents[d][c].text,productComponents[d][c].value)
}document.getElementById("pm_product_component").size=Math.min(a,20)}function goToPage(a){var b=document.getElementById("pm_page");b.value=a;b.form.submit();return false}function toggleGroup(c){var b=document.getElementById(c);var a=document.getElementById(c+"_toggle");if(b.style.display=="none"){b.style.display="";a.innerHTML="[ - ]"}else{b.style.display="none";a.innerHTML="[ + ]"}return false}var currentHotel;var savedHotels=new Array();function enquiryDiscard(){document.getElementById("enquiryPopup").style.display="none";document.getElementById("hotelStatus"+currentHotel).className="hotelStatus hotelRejected";for(i=0;i<savedHotels.length;i++){if(savedHotels[i]==currentHotel){savedHotels.splice(i,1);document.getElementById("hotelCount").innerHTML=savedHotels.length;return}}}function enquirySave(){document.getElementById("enquiryPopup").style.display="none";document.getElementById("hotelStatus"+currentHotel).className="hotelSaved hotelStatus";for(i=0;i<savedHotels.length;i++){if(savedHotels[i]==currentHotel){return
}}savedHotels[savedHotels.length]=currentHotel;document.getElementById("hotelCount").innerHTML=savedHotels.length}function showHotel(b,c){currentHotel=b;var a=document.getElementById("enquiryPopup");ajaxRequest(ROOT+"/enquiry-ajax/","hotelID="+b+"&month="+c);return false}function getSavedHotels(){var a;var b="";if(!savedHotels.length){return""}b="Automatically added: \n";for(a=0;a<savedHotels.length;a++){b+="Customer may be interested in hotel "+hotelName[savedHotels[a]]+".\n"}return b}function submitEnquiry(){document.getElementById("ExtraInfo").value+=getSavedHotels()}function validateForm(){var b=document.getElementById("CustName");var a=document.getElementById("CustEMail");var d=document.getElementById("CustPhone1");if(!b.value.match(/[a-z]/i)){alert("Please enter your name");b.focus();return false}if(!a.value.match(/^[\w-.]+@[\w][\w-.]*\.\w+$/i)){alert("Please enter a valid e-mail address");a.focus();return false}var c=d.value;d.value=fixTelephoneNumber(c);if(d.value==""){alert("Please ensure that your telephone number is valid");
d.value=c;d.focus();return false}return true}function validateHoliday(){var b=document.forms.enqform;var c=b.elements;c.CustName.value=c.CustName.value.replace(/^\s+|\s+$/g,"");c.CustSurname.value=c.CustSurname.value.replace(/^\s+|\s+$/g,"");if(!c.CustName.value.length){alert("Please enter your first name.");c.CustName.focus();return false}if(!c.CustSurname.value.length){alert("Please enter your surname.");c.CustSurname.focus();return false}if(!c.CustEMail.value.length){alert("Please enter your email address so we can answer your enquiry.");c.CustEMail.focus();return false}if(!c.CustEMail.value.match(/^[\w-.]+@[\w-]+.[\w-.]+$/)){alert("Please enter a valid email address.");c.CustEMail.focus();return false}var a=c.CustPhone1.value;c.CustPhone1.value=fixTelephoneNumber(c.CustPhone1.value);if(c.CustPhone1.value==""&&a!=""){alert("Please ensure that your telephone number is valid");c.CustPhone1.value=a;c.CustPhone1.focus();return false}a=c.CustPhone2.value;c.CustPhone2.value=fixTelephoneNumber(c.CustPhone2.value);
if(c.CustPhone2.value==""&&a!=""){alert("Please ensure that your telephone number is valid");c.CustPhone2.value=a;c.CustPhone2.focus();return false}if(c.CustPhone1.value==""&&c.CustPhone2.value==""){alert("Please enter your telephone number so we can answer your enquiry.");c.CustPhone1.value=a;c.CustPhone1.focus();return false}return true}function fixTelephoneNumber(d,a){if(d==""){return""}d=d.replace(/[\D]/g,"");if(d.substr(0,1)=="0"){d="44"+d.substr(1)}if(a){var e=new Array("71","72","73","74","75","77","78","79");var c=false;var b=d.substr(0,4);for(n in e){if(b=="44"+e[n]){c=true;break}}if(!c){return""}}if(d.length!=11&&d.length!=12){return""}return d}function validateOneStageEnquiry(c,h){h+="_";var l=c.elements[h+"Duration"];if(!l.options[l.selectedIndex].value){alert("Please select a duration");l.focus();return false}var b=["CustName","CustSurname","CustEMail"];var d=["first name","surname","e-mail address"];var g;for(g=0;g<b.length;g++){l=document.getElementById(h+b[g]);if(!l.value){alert("Please enter your "+d[g]);
l.focus();return false}}var q=document.getElementById(h+"CustPhone1");var f=q.value;q.value=fixTelephoneNumber(f);if(q.value==""&&f!=""){alert("Please ensure that your telephone number is valid");q.value=f;q.focus();return false}var p=document.getElementById(h+"CustPhone2");var f=p.value;p.value=fixTelephoneNumber(f);if(p.value==""&&f!=""){alert("Please ensure that your telephone number is valid");p.value=f;p.focus();return false}var k=document.getElementById(h+"CustEMail");if(!k.value.match(/^[\w-.]+@[\w-]+\.[\w-.]+$/)){alert("Please enter a valid email address.");k.focus();return false}l=document.getElementById(h+"CustPhone1");var a=document.getElementById(h+"CustPhone1");if(l.value==""&&a.value==""){alert("Please enter your daytime or evening telephone number");l.focus();return false}var j=c.elements;var o=false;var m=0;for(var g=0;g<j.length;g++){if(j[g].name.match(/wedding_\d+$/)){o=true;if(j[g].checked){m++}}}if(o&&!m){alert("Please choose where you might like to get married");return false}return true};