jQuery.autocomplete=function(ag,aB){var aJ=this;var aI=1.5;var ax=$(ag).attr("autocomplete","off");var aM=1;var aD=65000;if(aB.inputClass){ax.addClass(aB.inputClass)}var aH=document.createElement("div");var aa=$(aH).hide().addClass(aB.resultsClass).css("position","absolute");if(aB.width>0){aa.css("width",aB.width)}$("body").append(aH);ag.autocompleter=aJ;var an=null;var ay="";var am=-1;var Z={};var au=false;var X=false;var ak=null;var Y=false;var ac=false;function W(){Z={};Z.data={};Z.length=0}W();if(aB.data!=null){var aE="",i={},aN=[];if(typeof aB.url!="string"){aB.cacheLength=1}for(var aK=0;aK<aB.data.length;aK++){aN=((typeof aB.data[aK]=="string")?[aB.data[aK]]:aB.data[aK]);if(aN[0].length>0){aE=aN[0].substring(0,1).toLowerCase();if(!i[aE]){i[aE]=[]}i[aE].push(aN)}}for(var aO in i){aB.cacheLength++;af(aO,i[aO])}}ax.keydown(function(a){ak=a.keyCode;switch(a.keyCode){case 38:a.preventDefault();ar(-1);break;case 40:a.preventDefault();ar(1);break;case 9:case 13:if(ap()){ax.get(0).blur();a.preventDefault()}break;case 16:case 17:case 18:break;default:am=-1;if(an){clearTimeout(an)}an=setTimeout(function(){aC()},aB.delay);break}}).focus(function(){X=true}).blur(function(){X=false;if(!Y){ai()}});aA();function aC(){if(ak==46||(ak>8&&ak<32)){ab()}var a=ax.val();if(a==ay){return}ay=a;if(a.length>=aB.minChars){ax.addClass(aB.loadingClass);at(a)}else{ax.removeClass(aB.loadingClass);ab()}}function ar(a){var b=$("li",aH);if(!b){return}am+=a;if(am<0){am=0}else{if(am>=b.size()){am=b.size()-1}}b.removeClass("ac_over");$(b[am]).addClass("ac_over")}function ap(){var b=$("li.ac_over",aH)[0];if(!b){var a=$("li",aH);if(aB.selectOnly){if(a.length==1){b=a[0]}}else{if(aB.selectFirst){b=a[0]}}}if(b){aG(b);return true}else{return false}}function aG(b){if(!b){b=document.createElement("li");b.extra=[];b.selectValue=""}var a=$.trim(b.selectValue?b.selectValue:b.innerHTML);ag.lastSelected=a;ay=a;aa.html("");ax.val(a);aA();if(aB.onItemSelect){setTimeout(function(){aB.onItemSelect(b)},1)}}function aj(a,c){var b=ax.get(0);if(b.createTextRange){var d=b.createTextRange();d.collapse(true);d.moveStart("character",a);d.moveEnd("character",c);d.select()}else{if(b.setSelectionRange){b.setSelectionRange(a,c)}else{if(b.selectionStart){b.selectionStart=a;b.selectionEnd=c}}}b.focus()}function az(a){if(ak!=8){ax.val(ax.val()+a.substring(ay.length));aj(ay.length,a.length)}}function aq(){var b=aw(aB.popupParent||ax);var c;if(aB.width>0){c=aB.width}else{if(aB.popupParent){c=aB.popupParent.innerWidth()}else{c=ax.innerWidth()}}var a;if(aB.popupParent){a=aB.popupParent.innerHeight()}else{a=ax.outerHeight()}aa.css({width:parseInt(c)+"px",top:(b.y+a)+"px",left:b.x+"px"});ah()}function ai(){if(an){clearTimeout(an)}an=setTimeout(aA,200)}function aA(){if(ac){return}ac=true;if(an){clearTimeout(an)}var a=ax.removeClass(aB.loadingClass).val();if(aa.is(":visible")){ab()}if(aB.mustMatch){if(!ag.lastSelected||ag.lastSelected!=a){aG(null)}}ac=false}function ah(){if(aB.resultsId){aa.attr("id",aB.resultsId)}aa.show();if(typeof aB.onResultsShow==="function"){aB.onResultsShow(aa[0])}}function ab(){aa.hide();if(typeof aB.onResultsHide==="function"){aB.onResultsHide(aa[0])}if(aB.resultsId){aa.removeAttr("id")}}function ad(a,b){if(b){ax.removeClass(aB.loadingClass);aH.innerHTML="";if(!X||b.length==0){return aA()}if($.browser.msie){aa.append(document.createElement("iframe"))}aH.appendChild(al(b));if(aB.autoFill&&(ax.val().toLowerCase()==a.toLowerCase())){az(b[0][0])}else{if(aB.selectFirst){$("li:first",aH).addClass("ac_over")}}aq()}else{aA()}}function ae(e){if(!e){return null}var c=[];var a=e.split(aB.lineSeparator);for(var b=0;b<a.length;b++){var d=$.trim(a[b]);if(d){c[c.length]=d.split(aB.cellSeparator)}}return c}function al(f){var g=document.createElement("ul");var h=f.length;if((aB.maxItemsToShow>0)&&(aB.maxItemsToShow<h)){h=aB.maxItemsToShow}for(var e=0;e<h;e++){var d=f[e];if(!d){continue}var b=document.createElement("li");if(aB.formatItem){b.innerHTML=aB.formatItem(d,e,h);b.selectValue=d[0]}else{b.innerHTML=d[0];b.selectValue=d[0]}var c=null;if(d.length>1){c=[];for(var a=1;a<d.length;a++){c[c.length]=d[a]}}b.extra=c;g.appendChild(b);$(b).hover(function(){$("li",g).removeClass("ac_over");$(this).addClass("ac_over");am=$("li",g).indexOf($(this).get(0))},function(){$(this).removeClass("ac_over")}).click(function(j){j.preventDefault();j.stopPropagation();aG(this)})}$(g).mousedown(function(){Y=true}).mouseup(function(){Y=false});return g}function at(c){if(!aB.matchCase){c=c.toLowerCase()}var a=aB.cacheLength?k(c):null;if(a){ad(c,a)}else{if((typeof aB.url=="string")&&(aB.url.length>0)){aM+=1;if(aM>=aD){aM=0}var b=aM;$.get(aL(c),function(d){aF(c,d,b)})}else{ax.removeClass(aB.loadingClass)}}}function aF(c,a,b){a=ae(a);af(c,a);if(b==aM){ad(c,a)}}function aL(d){var b=aB.url.indexOf("?")==-1?"?":"&";var c=aB.url+b+"q="+encodeURI(d);for(var a in aB.extraParams){c+="&"+a+"="+encodeURI(aB.extraParams[a])}return c}function k(f){if(!f){return null}if(Z.data[f]){return Z.data[f]}if(aB.matchSubset){for(var g=f.length-1;g>=aB.minChars;g--){var b=f.substr(0,g);var d=Z.data[b];if(d){var e=[];for(var a=0;a<d.length;a++){var c=d[a];var h=c[0];if(av(h,f)){e[e.length]=c}}return e}}}return null}function av(a,b){if(!aB.matchCase){a=a.toLowerCase()}var c=a.indexOf(b);if(c==-1){return false}return c==0||aB.matchContains}this.flushCache=function(){W()};this.setExtraParams=function(a){aB.extraParams=a};this.findValue=function(){var a=ax.val();if(!aB.matchCase){a=a.toLowerCase()}var b=aB.cacheLength?k(a):null;if(b){ao(a,b)}else{if((typeof aB.url=="string")&&(aB.url.length>0)){$.get(aL(a),function(c){c=ae(c);af(a,c);ao(a,c)})}else{ao(a,null)}}};function ao(f,g){if(g){ax.removeClass(aB.loadingClass)}var h=(g)?g.length:0;var b=null;for(var e=0;e<h;e++){var d=g[e];if(d[0].toLowerCase()==f.toLowerCase()){b=document.createElement("li");if(aB.formatItem){b.innerHTML=aB.formatItem(d,e,h);b.selectValue=d[0]}else{b.innerHTML=d[0];b.selectValue=d[0]}var c=null;if(d.length>1){c=[];for(var a=1;a<d.length;a++){c[c.length]=d[a]}}b.extra=c}}if(aB.onFindValue){setTimeout(function(){aB.onFindValue(b)},1)}}function af(a,b){if(!b||!a||!aB.cacheLength){return}if(!Z.length||Z.length>aB.cacheLength){W();Z.length++}else{if(!Z[a]){Z.length++}}Z.data[a]=b}function aw(b){var a=b.offset();return{x:Math.ceil(a.left),y:Math.ceil(a.top)}}};jQuery.fn.autocomplete=function(f,d,e){d=d||{};d.url=f;d.data=((typeof e=="object")&&(e.constructor==Array))?e:null;d=$.extend({inputClass:"ac_input",resultsClass:"ac_results",resultsId:null,lineSeparator:"\n",cellSeparator:"|",minChars:1,delay:400,matchCase:0,matchSubset:1,matchContains:0,cacheLength:1,mustMatch:0,extraParams:{},loadingClass:"ac_loading",selectFirst:false,selectOnly:false,maxItemsToShow:-1,autoFill:false,width:0,popupParent:null,onResultsShow:null,onResultsHide:null},d);d.width=parseInt(d.width,10);if(d.popupParent){d.popupParent=$(d.popupParent);if(d.popupParent.length==0){d.popupParent=null}}this.each(function(){var a=this;new jQuery.autocomplete(a,d)});return this};jQuery.fn.autocompleteArray=function(c,d){return this.autocomplete(null,d,c)};jQuery.fn.indexOf=function(c){for(var d=0;d<this.length;d++){if(this[d]==c){return d}}return -1};(function(f){var e=[];f.tools=f.tools||{};f.tools.tooltip={version:"1.1.3",conf:{effect:"toggle",fadeOutSpeed:"fast",tip:null,predelay:0,delay:30,opacity:1,lazy:undefined,position:["top","center"],offset:[0,0],cancelDefault:true,relative:false,oneInstance:true,events:{def:"mouseover,mouseout",input:"focus,blur",widget:"focus mouseover,blur mouseout",tooltip:"mouseover,mouseout"},api:false},addEffect:function(a,b,c){g[a]=[b,c]}};var g={toggle:[function(b){var a=this.getConf(),d=this.getTip(),c=a.opacity;if(c<1){d.css({opacity:c})}d.show();b.call()},function(a){this.getTip().hide();a.call()}],fade:[function(a){this.getTip().fadeIn(this.getConf().fadeInSpeed,a)},function(a){this.getTip().fadeOut(this.getConf().fadeOutSpeed,a)}]};function h(q,d){var s=this,x=f(this);q.data("tooltip",s);var w=q.next();if(d.tip){w=f(d.tip);if(w.length>1){w=q.nextAll(d.tip).eq(0);if(!w.length){w=q.parent().nextAll(d.tip).eq(0)}}}function t(k){var l=d.relative?q.position().top:q.offset().top,m=d.relative?q.position().left:q.offset().left,j=d.position[0];l-=w.outerHeight()-d.offset[0];m+=q.outerWidth()+d.offset[1];var i=w.outerHeight()+q.outerHeight();if(j=="center"){l+=i/2}if(j=="bottom"){l+=i}j=d.position[1];var n=w.outerWidth()+q.outerWidth();if(j=="center"){m-=n/2}if(j=="left"){m-=n}return{top:l,left:m}}var b=q.is(":input"),r=b&&q.is(":checkbox, :radio, select, :button"),c=q.attr("type"),u=d.events[c]||d.events[b?(r?"widget":"input"):"def"];u=u.split(/,\s*/);if(u.length!=2){throw"Tooltip: bad events configuration for "+c}q.bind(u[0],function(i){if(d.oneInstance){f.each(e,function(){this.hide()})}var j=w.data("trigger");if(j&&j[0]!=this){w.hide().stop(true,true)}i.target=this;s.show(i);u=d.events.tooltip.split(/,\s*/);w.bind(u[0],function(){s.show(i)});if(u[1]){w.bind(u[1],function(){s.hide(i)})}});q.bind(u[1],function(i){s.hide(i)});if(!f.browser.msie&&!b&&!d.predelay){q.mousemove(function(){if(!s.isShown()){q.triggerHandler("mouseover")}})}if(d.opacity<1){w.css("opacity",d.opacity)}var v=0,a=q.attr("title");if(a&&d.cancelDefault){q.removeAttr("title");q.data("title",a)}f.extend(s,{show:function(i){if(i){q=f(i.target)}clearTimeout(w.data("timer"));if(w.is(":animated")||w.is(":visible")){return s}function j(){w.data("trigger",q);var k=t(i);if(d.tip&&a){w.html(q.data("title"))}i=i||f.Event();i.type="onBeforeShow";x.trigger(i,[k]);if(i.isDefaultPrevented()){return s}k=t(i);w.css({position:"absolute",top:k.top,left:k.left});var l=g[d.effect];if(!l){throw'Nonexistent effect "'+d.effect+'"'}l[0].call(s,function(){i.type="onShow";x.trigger(i)})}if(d.predelay){clearTimeout(v);v=setTimeout(j,d.predelay)}else{j()}return s},hide:function(i){clearTimeout(w.data("timer"));clearTimeout(v);if(!w.is(":visible")){return}function j(){i=i||f.Event();i.type="onBeforeHide";x.trigger(i);if(i.isDefaultPrevented()){return}g[d.effect][1].call(s,function(){i.type="onHide";x.trigger(i)})}if(d.delay&&i){w.data("timer",setTimeout(j,d.delay))}else{j()}return s},isShown:function(){return w.is(":visible, :animated")},getConf:function(){return d},getTip:function(){return w},getTrigger:function(){return q},bind:function(j,i){x.bind(j,i);return s},onHide:function(i){return this.bind("onHide",i)},onBeforeShow:function(i){return this.bind("onBeforeShow",i)},onShow:function(i){return this.bind("onShow",i)},onBeforeHide:function(i){return this.bind("onBeforeHide",i)},unbind:function(i){x.unbind(i);return s}});f.each(d,function(j,i){if(f.isFunction(i)){s.bind(j,i)}})}f.prototype.tooltip=function(a){var c=this.eq(typeof a=="number"?a:0).data("tooltip");if(c){return c}var b=f.extend(true,{},f.tools.tooltip.conf);if(f.isFunction(a)){a={onBeforeShow:a}}else{if(typeof a=="string"){a={tip:a}}}a=f.extend(true,b,a);if(typeof a.position=="string"){a.position=a.position.split(/,?\s/)}if(a.lazy!==false&&(a.lazy===true||this.length>20)){this.one("mouseover",function(d){c=new h(f(this),a);c.show(d);e.push(c)})}else{this.each(function(){c=new h(f(this),a);e.push(c)})}return a.api?c:this}})(jQuery);(function(f){f.tools=f.tools||{};f.tools.overlay={version:"1.1.2",addEffect:function(a,c,b){g[a]=[c,b]},conf:{top:"10%",left:"center",absolute:false,speed:"normal",closeSpeed:"fast",effect:"default",close:null,oneInstance:true,closeOnClick:true,closeOnEsc:true,api:false,expose:null,target:null}};var g={};f.tools.overlay.addEffect("default",function(a){this.getOverlay().fadeIn(this.getConf().speed,a)},function(a){this.getOverlay().fadeOut(this.getConf().closeSpeed,a)});var e=[];function h(b,t){var p=this,r=f(this),q=f(window),u,v,a,d=t.expose&&f.tools.expose.version;var c=t.target||b.attr("rel");v=c?f(c):null||b;if(!v.length){throw"Could not find Overlay: "+c}if(b&&b.index(v)==-1){b.click(function(i){p.load(i);return i.preventDefault()})}f.each(t,function(j,i){if(f.isFunction(i)){r.bind(j,i)}});f.extend(p,{load:function(j){if(p.isOpened()){return p}var m=g[t.effect];if(!m){throw'Overlay: cannot find effect : "'+t.effect+'"'}if(t.oneInstance){f.each(e,function(){this.close(j)})}j=j||f.Event();j.type="onBeforeLoad";r.trigger(j);if(j.isDefaultPrevented()){return p}a=true;if(d){v.expose().load(j)}var k=t.top;var l=t.left;var i=v.outerWidth({margin:true});var n=v.outerHeight({margin:true});if(typeof k=="string"){k=k=="center"?Math.max((q.height()-n)/2,0):parseInt(k,10)/100*q.height()}if(l=="center"){l=Math.max((q.width()-i)/2,0)}if(!t.absolute){k+=q.scrollTop();l+=q.scrollLeft()}v.css({top:k,left:l,position:"absolute"});j.type="onStart";r.trigger(j);m[0].call(p,function(){if(a){j.type="onLoad";r.trigger(j)}});if(t.closeOnClick){f(document).bind("click.overlay",function(o){if(!p.isOpened()){return}var x=f(o.target);if(x.parents(v).length>1){return}f.each(e,function(){this.close(o)})})}if(t.closeOnEsc){f(document).unbind("keydown.overlay").bind("keydown.overlay",function(o){if(o.keyCode==27){f.each(e,function(){this.close(o)})}})}return p},close:function(i){if(!p.isOpened()){return p}i=i||f.Event();i.type="onBeforeClose";r.trigger(i);if(i.isDefaultPrevented()){return}a=false;g[t.effect][1].call(p,function(){i.type="onClose";r.trigger(i)});var j=true;f.each(e,function(){if(this.isOpened()){j=false}});if(j){f(document).unbind("click.overlay").unbind("keydown.overlay")}return p},getContent:function(){return v},getOverlay:function(){return v},getTrigger:function(){return b},getClosers:function(){return u},isOpened:function(){return a},getConf:function(){return t},bind:function(j,i){r.bind(j,i);return p},unbind:function(i){r.unbind(i);return p}});f.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","),function(j,i){p[i]=function(k){return p.bind(i,k)}});if(d){if(typeof t.expose=="string"){t.expose={color:t.expose}}f.extend(t.expose,{api:true,closeOnClick:t.closeOnClick,closeOnEsc:false});var s=v.expose(t.expose);s.onBeforeClose(function(i){p.close(i)});p.onClose(function(i){s.close(i)})}u=v.find(t.close||".close");if(!u.length&&!t.close){u=f('<div class="close"></div>');v.prepend(u)}u.click(function(i){p.close(i)})}f.fn.overlay=function(a){var c=this.eq(typeof a=="number"?a:0).data("overlay");if(c){return c}if(f.isFunction(a)){a={onBeforeLoad:a}}var b=f.extend({},f.tools.overlay.conf);a=f.extend(true,b,a);this.each(function(){c=new h(f(this),a);e.push(c);f(this).data("overlay",c)});return a.api?c:this}})(jQuery);(function(f){var h=f.tools.overlay;h.effects=h.effects||{};h.effects.apple={version:"1.0.1"};f.extend(h.conf,{start:{absolute:true,top:null,left:null},fadeInSpeed:"fast",zIndex:9999});function g(b){var a=b.offset();return[a.top+b.height()/2,a.left+b.width()/2]}var j=function(v){var a=this.getOverlay(),p=this.getConf(),c=this.getTrigger(),t=this,s=a.outerWidth({margin:true}),w=a.data("img");if(!w){var x=a.css("backgroundImage");if(!x){throw"background-image CSS property not set for overlay"}x=x.substring(x.indexOf("(")+1,x.indexOf(")")).replace(/\"/g,"");a.css("backgroundImage","none");w=f('<img src="'+x+'"/>');w.css({border:0,position:"absolute",display:"none"}).width(s);f("body").append(w);a.data("img",w)}var u=f(window),b=p.start.top||Math.round(u.height()/2),d=p.start.left||Math.round(u.width()/2);if(c){var e=g(c);b=e[0];d=e[1]}if(!p.start.absolute){b+=u.scrollTop();d+=u.scrollLeft()}w.css({top:b,left:d,width:0,zIndex:p.zIndex}).show();w.animate({top:a.css("top"),left:a.css("left"),width:s},p.speed,function(){a.css("zIndex",p.zIndex+1).fadeIn(p.fadeInSpeed,function(){if(t.isOpened()&&!f(this).index(a)){v.call()}else{a.hide()}})})};var i=function(a){var d=this.getOverlay(),c=this.getConf(),m=this.getTrigger(),e=c.start.top,n=c.start.left;d.hide();if(m){var b=g(m);e=b[0];n=b[1]}d.data("img").animate({top:e,left:n,width:0},c.closeSpeed,a)};h.addEffect("apple",j,i)})(jQuery);(function(f){f.tools=f.tools||{};f.tools.expose={version:"1.0.5",conf:{maskId:null,loadSpeed:"slow",closeSpeed:"fast",closeOnClick:true,closeOnEsc:true,zIndex:9998,opacity:0.8,color:"#456",api:false}};function d(){if(f.browser.msie){var a=f(document).height(),b=f(window).height();return[window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,a-b<20?b:a]}return[f(window).width(),f(document).height()]}function e(a,c){var m=this,k=f(this),b=null,l=false,n=0;f.each(c,function(h,g){if(f.isFunction(g)){k.bind(h,g)}});f(window).resize(function(){m.fit()});f.extend(this,{getMask:function(){return b},getExposed:function(){return a},getConf:function(){return c},isLoaded:function(){return l},load:function(i){if(l){return m}n=a.eq(0).css("zIndex");if(c.maskId){b=f("#"+c.maskId)}if(!b||!b.length){var g=d();b=f("<div/>").css({position:"absolute",top:0,left:0,width:g[0],height:g[1],display:"none",opacity:0,zIndex:c.zIndex});if(c.maskId){b.attr("id",c.maskId)}f("body").append(b);var h=b.css("backgroundColor");if(!h||h=="transparent"||h=="rgba(0, 0, 0, 0)"){b.css("backgroundColor",c.color)}if(c.closeOnEsc){f(document).bind("keydown.unexpose",function(p){if(p.keyCode==27){m.close()}})}if(c.closeOnClick){b.bind("click.unexpose",function(p){m.close(p)})}}i=i||f.Event();i.type="onBeforeLoad";k.trigger(i);if(i.isDefaultPrevented()){return m}f.each(a,function(){var p=f(this);if(!/relative|absolute|fixed/i.test(p.css("position"))){p.css("position","relative")}});a.css({zIndex:Math.max(c.zIndex+1,n=="auto"?0:n)});var j=b.height();if(!this.isLoaded()){b.css({opacity:0,display:"block"}).fadeTo(c.loadSpeed,c.opacity,function(){if(b.height()!=j){b.css("height",j)}i.type="onLoad";k.trigger(i)})}l=true;return m},close:function(g){if(!l){return m}g=g||f.Event();g.type="onBeforeClose";k.trigger(g);if(g.isDefaultPrevented()){return m}b.fadeOut(c.closeSpeed,function(){g.type="onClose";k.trigger(g);a.css({zIndex:f.browser.msie?n:null})});l=false;return m},fit:function(){if(b){var g=d();b.css({width:g[0],height:g[1]})}},bind:function(h,g){k.bind(h,g);return m},unbind:function(g){k.unbind(g);return m}});f.each("onBeforeLoad,onLoad,onBeforeClose,onClose".split(","),function(h,g){m[g]=function(i){return m.bind(g,i)}})}f.fn.expose=function(a){var c=this.eq(typeof a=="number"?a:0).data("expose");if(c){return c}if(typeof a=="string"){a={color:a}}var b=f.extend({},f.tools.expose.conf);a=f.extend(b,a);this.each(function(){c=new e(f(this),a);f(this).data("expose",c)});return a.api?c:this}})(jQuery);var filters={requerido:function(a){return($(a).val()!="")}};$.extend({stop:function(a){if(a.preventDefault){a.preventDefault()}if(a.stopPropagation){a.stopPropagation()}}});$(document).ready(function(){$("form.validable").live("submit",function(d){if(typeof filters=="undefined"){return}$(this).find("input, textarea, select").each(function(f,e){if($(e).attr("className")!="undefined"){$(e).removeClass("error");$.each(new String($(e).attr("className")).split(" "),function(h,g){if($.isFunction(filters[g])){if(!filters[g](e)){$(e).addClass("error")}}})}});if($(this).find(".error").size()>0){$.stop(d||window.event);return false}return true});$("#NoHotel").click(function(){if($("#NoHotel:checked").val()!==undefined){$("#formHotel").val("Not Available");alert("We're Sorry!\nIf your hotel does not appear on this list, please call us toll free USA/CAN: 1-888-644-7803\nOr use our Live Chat!")}else{$("#formHotel").val("")}});$("#aDate, #aDate2, #dDate, #date").live("click", function () {var nomServ= $("#nomServ").val();if (nomServ == 'limousines'){$(this).datepicker({showOn: "focus",minDate: "+1d",showAnim: "slideDown",dateFormat: "MM d, yy"}).focus()}else{$(this).datepicker({showOn: "focus",minDate: "0d",showAnim: "slideDown",dateFormat: "MM d, yy"}).focus()}});$("#termsbox").live("click",function(){if($(this).is(":checked")){$("#AceptTerm").val("Continue").attr("disabled",false)}else{$("#AceptTerm").val("Please accept the Legal Terms & Policies").attr("disabled",true)}});$("#Rsame").live("click",function(){if($("#Rsame").attr("checked")){$("#roomName").val($("#rName").val())}else{$("#roomName").val("")}});$("#cSame").live("click",function(){if($("#cSame").attr("checked")){$("#cName").val($("#rName").val())}else{$("#cName").val("")}});$("#pax").autocompleteArray(["1 Passenger","2 Passengers","3 Passengers","4 Passengers","5 Passengers","6 Passengers","7 Passengers","8 Passengers","9 Passengers","10 Passengers"],{delay:100,autoFill:true,selectFirst:true});$("#Pax22").change(function(){$.post("vip-process.php?id=1",{ServiceType:$("#ServiceType").val(),Pax:$("#Pax22").val()},function(d){if($("#chkwal").is(":checked")){$.post("vip-process.php?id=2",{Hours:$("#hours").val()},function(e){$("#total22").html(e)});return}else{$("#total22").html(d)}})});$("#ServiceType").change(function(){if($("#Pax22").val()!=0){$.post("vip-process.php?id=1",{ServiceType:$("#ServiceType").val(),Pax:$("#Pax22").val()},function(d){if($("#chkwal").is(":checked")){$.post("vip-process.php?id=2",{Hours:$("#hours").val()},function(e){$("#total22").html(e)});return}else{$("#total22").html(d)}})}});$("#hours").change(function(){if($("#chkwal").is(":checked")){$.post("vip-process.php?id=2",{Hours:$("#hours").val()},function(d){$("#total22").html(d)})}});$("#chkwal").click(function(){if($(this).is(":checked")){$("#whours").slideDown("slow");if($("#hours").val()!="Select"){$.post("vip-process.php?id=2",{Hours:$("#hours").val()},function(d){$("#total22").html(d)})}}else{$("#whours").slideUp();$.post("vip-process.php?id=1",{ServiceType:$("#ServiceType").val(),Pax:$("#Pax22").val()},function(d){$("#total22").html(d)})}});$("#btnRes").click(function(d){d.preventDefault();$.post("vip-process.php?id=3",{ServiceType:$("#ServiceType").val(),HotelName:$("input[name=HotelName]:checked").val()},function(e){$("#tblRes").html(e)})});$(".makeRes").live("click",function(d){d.preventDefault();$.post("vip-process.php?id=4",{rName:$("#rName").val(),roomName:$("#roomName").val(),tTransfer:$("#tTransfer").val(),date:$("#date").val(),airline:$("#airline").val(),flight:$("#flight").val(),hour:$("#Hour").val(),minn:$("#Minutes").val(),format:$("#Ampm").val(),aDate:$("#aDate2").val(),aAirline:$("#aAirline").val(),aFlight:$("#aFlight").val(),aHour:$("#aHour").val(),aMin:$("#aMinutes").val(),aFormat:$("#aAmpm").val(),dDate:$("#dDate").val(),dAirline:$("#dAirline").val(),dFlight:$("#dFlight").val(),dHour:$("#dHour").val(),dMin:$("#dMinutes").val(),dFormat:$("#dAmpm").val(),cSeat:$("#cSeat").val(),bLuggage:$("#bLuggage").val(),sInst:$("#sInst").val(),cName:$("#cName").val(),cEmail:$("#cEmail").val(),cEmail2:$("#cEmail2").val(),cPhone:$("#cPhone").val(),cMphone:$("#cMphone").val(),cAdd1:$("#cAdd1").val(),cAdd2:$("#cAdd2").val(),cCountry:$("#cCountry").val(),cState:$("#cState").val(),cCity:$("#cCity").val(),cZip:$("#cZip").val()},function(e){$("#tblRes").html(e)})});$("#formHotel").autocomplete("ajax.php",{delay:100,minChars:2,cacheLength:15,matchContains:true,extraParams:{app:"hlist"},selectFirst:true,onItemSelect:b,onFindValue:c,formatItem:a});function c(e){if(e==null){var d="noID"}if(!!e.extra){var d=e.extra[0]}else{var d=e.selectValue}document.getElementById("hotID").value=d}function b(d){c(d)}function a(d){var e=document.getElementById("formHotel").value;return d[0].replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+e.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),'<strong class="ac_strong">$1</strong>')}});
