(function(a){a.fn.hoverIntent=function(l,j){var k={sensitivity:7,interval:100,timeout:0};k=a.extend(k,j?{over:l,out:j}:l);var n,m,h,e;var d=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(e-m))<k.sensitivity){a(f).unbind("mousemove",d);f.hoverIntent_s=1;return k.over.apply(f,[g])}else{h=n;e=m;f.hoverIntent_t=setTimeout(function(){c(g,f)},k.interval)}};var i=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);f.hoverIntent_s=0;return k.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;e=g.pageY;a(f).bind("mousemove",d);if(f.hoverIntent_s!=1){f.hoverIntent_t=setTimeout(function(){c(g,f)},k.interval)}}else{a(f).unbind("mousemove",d);if(f.hoverIntent_s==1){f.hoverIntent_t=setTimeout(function(){i(g,f)},k.timeout)}}};return this.mouseover(b).mouseout(b)}})(jQuery);(function(c){var b=c.browser.msie&&parseInt(c.browser.version)==6&&typeof window.XMLHttpRequest!="object",d=null,a=[];c.modal=function(f,e){return c.modal.impl.init(f,e)};c.modal.close=function(){c.modal.impl.close()};c.fn.modal=function(e){return c.modal.impl.init(this,e)};c.modal.defaults={appendTo:"body",focus:true,opacity:50,overlayId:"simplemodal-overlay",overlayCss:{},containerId:"simplemodal-container",containerCss:{},dataId:"simplemodal-data",dataCss:{},minHeight:200,minWidth:300,maxHeight:null,maxWidth:null,autoResize:false,autoPosition:true,zIndex:1000,close:true,closeHTML:'<a class="modalCloseImg" title="Close"></a>',closeClass:"simplemodal-close",escClose:true,overlayClose:false,position:null,persist:false,onOpen:null,onShow:null,onClose:null};c.modal.impl={o:null,d:{},init:function(g,e){var f=this;if(f.d.data){return false}d=c.browser.msie&&!c.boxModel;f.o=c.extend({},c.modal.defaults,e);f.zIndex=f.o.zIndex;f.occb=false;if(typeof g=="object"){g=g instanceof jQuery?g:c(g);if(g.parent().parent().size()>0){f.d.parentNode=g.parent();if(!f.o.persist){f.d.orig=g.clone(true)}}}else{if(typeof g=="string"||typeof g=="number"){g=c("<div></div>").html(g)}else{alert("SimpleModal Error: Unsupported data type: "+typeof g);return f}}f.create(g);g=null;f.open();if(c.isFunction(f.o.onShow)){f.o.onShow.apply(f,[f.d])}return f},create:function(f){var e=this;a=e.getDimensions();if(b){e.d.iframe=c('<iframe src="javascript:false;"></iframe>').css(c.extend(e.o.iframeCss,{display:"none",opacity:0,position:"fixed",height:a[0],width:a[1],zIndex:e.o.zIndex,top:0,left:0})).appendTo(e.o.appendTo)}e.d.overlay=c("<div></div>").attr("id",e.o.overlayId).addClass("simplemodal-overlay").css(c.extend(e.o.overlayCss,{display:"none",opacity:e.o.opacity/100,height:a[0],width:a[1],position:"fixed",left:0,top:0,zIndex:e.o.zIndex+1})).appendTo(e.o.appendTo);e.d.container=c("<div></div>").attr("id",e.o.containerId).addClass("simplemodal-container").css(c.extend(e.o.containerCss,{display:"none",position:"fixed",zIndex:e.o.zIndex+2})).append(e.o.close&&e.o.closeHTML?c(e.o.closeHTML).addClass(e.o.closeClass):"").appendTo(e.o.appendTo);e.d.wrap=c("<div></div>").attr("tabIndex",-1).addClass("simplemodal-wrap").css({height:"100%",outline:0,width:"100%"}).appendTo(e.d.container);e.d.data=f.attr("id",f.attr("id")||e.o.dataId).addClass("simplemodal-data").css(c.extend(e.o.dataCss,{display:"none"})).appendTo("body");f=null;e.setContainerDimensions();e.d.data.appendTo(e.d.wrap);if(b||d){e.fixIE()}},bindEvents:function(){var e=this;c("."+e.o.closeClass).bind("click.simplemodal",function(f){f.preventDefault();e.close()});if(e.o.close&&e.o.overlayClose){e.d.overlay.bind("click.simplemodal",function(f){f.preventDefault();e.close()})}c(document).bind("keydown.simplemodal",function(f){if(e.o.focus&&f.keyCode==9){e.watchTab(f)}else{if((e.o.close&&e.o.escClose)&&f.keyCode==27){f.preventDefault();e.close()}}});c(window).bind("resize.simplemodal",function(){a=e.getDimensions();e.setContainerDimensions(true);if(b||d){e.fixIE()}else{e.d.iframe&&e.d.iframe.css({height:a[0],width:a[1]});e.d.overlay.css({height:a[0],width:a[1]})}})},unbindEvents:function(){c("."+this.o.closeClass).unbind("click.simplemodal");c(document).unbind("keydown.simplemodal");c(window).unbind("resize.simplemodal");this.d.overlay.unbind("click.simplemodal")},fixIE:function(){var e=this,f=e.o.position;c.each([e.d.iframe||null,e.d.overlay,e.d.container],function(r,k){if(k){var p="document.body.clientHeight",u="document.body.clientWidth",w="document.body.scrollHeight",t="document.body.scrollLeft",n="document.body.scrollTop",j="document.body.scrollWidth",h="document.documentElement.clientHeight",q="document.documentElement.clientWidth",o="document.documentElement.scrollLeft",x="document.documentElement.scrollTop",y=k[0].style;y.position="absolute";if(r<2){y.removeExpression("height");y.removeExpression("width");y.setExpression("height",""+w+" > "+p+" ? "+w+" : "+p+' + "px"');y.setExpression("width",""+j+" > "+u+" ? "+j+" : "+u+' + "px"')}else{var m,g;if(f&&f.constructor==Array){var v=f[0]?typeof f[0]=="number"?f[0].toString():f[0].replace(/px/,""):k.css("top").replace(/px/,"");m=v.indexOf("%")==-1?v+" + (t = "+x+" ? "+x+" : "+n+') + "px"':parseInt(v.replace(/%/,""))+" * (("+h+" || "+p+") / 100) + (t = "+x+" ? "+x+" : "+n+') + "px"';if(f[1]){var l=typeof f[1]=="number"?f[1].toString():f[1].replace(/px/,"");g=l.indexOf("%")==-1?l+" + (t = "+o+" ? "+o+" : "+t+') + "px"':parseInt(l.replace(/%/,""))+" * (("+q+" || "+u+") / 100) + (t = "+o+" ? "+o+" : "+t+') + "px"'}}else{m="("+h+" || "+p+") / 2 - (this.offsetHeight / 2) + (t = "+x+" ? "+x+" : "+n+') + "px"';g="("+q+" || "+u+") / 2 - (this.offsetWidth / 2) + (t = "+o+" ? "+o+" : "+t+') + "px"'}y.removeExpression("top");y.removeExpression("left");y.setExpression("top",m);y.setExpression("left",g)}}})},focus:function(h){var f=this,g=h||"first";var e=c(":input:enabled:visible:"+g,f.d.wrap);e.length>0?e.focus():f.d.wrap.focus()},getDimensions:function(){var f=c(window);var e=c.browser.opera&&c.browser.version>"9.5"&&c.fn.jquery<="1.2.6"?document.documentElement.clientHeight:c.browser.opera&&c.browser.version<"9.5"&&c.fn.jquery>"1.2.6"?window.innerHeight:f.height();return[e,f.width()]},getVal:function(e){return e=="auto"?0:e.indexOf("%")>0?e:parseInt(e.replace(/px/,""))},setContainerDimensions:function(h){var j=this;if(!h||(h&&j.o.autoResize)){var i=j.getVal(j.d.container.css("height")),e=j.getVal(j.d.container.css("width")),k=j.d.data.outerHeight(true),g=j.d.data.outerWidth(true);var f=j.o.maxHeight&&j.o.maxHeight<a[0]?j.o.maxHeight:a[0],l=j.o.maxWidth&&j.o.maxWidth<a[1]?j.o.maxWidth:a[1];if(!i){if(!k){i=j.o.minHeight}else{if(k>f){i=f}else{if(k<j.o.minHeight){i=j.o.minHeight}else{i=k}}}}else{i=i>f?f:i}if(!e){if(!g){e=j.o.minWidth}else{if(g>l){e=l}else{if(g<j.o.minWidth){e=j.o.minWidth}else{e=g}}}}else{e=e>l?l:e}j.d.container.css({height:i,width:e});if(k>i||g>e){j.d.wrap.css({overflow:"auto"})}}if(j.o.autoPosition){j.setPosition()}},setPosition:function(){var f=this,h,g,i=(a[0]/2)-(f.d.container.outerHeight(true)/2),e=(a[1]/2)-(f.d.container.outerWidth(true)/2);if(f.o.position&&Object.prototype.toString.call(f.o.position)==="[object Array]"){h=f.o.position[0]||i;g=f.o.position[1]||e}else{h=i;g=e}f.d.container.css({left:g,top:h})},watchTab:function(g){var f=this;if(c(g.target).parents(".simplemodal-container").length>0){f.inputs=c(":input:enabled:visible:first, :input:enabled:visible:last",f.d.data[0]);if((!g.shiftKey&&g.target==f.inputs[f.inputs.length-1])||(g.shiftKey&&g.target==f.inputs[0])||f.inputs.length==0){g.preventDefault();var h=g.shiftKey?"last":"first";setTimeout(function(){f.focus(h)},10)}}else{g.preventDefault();setTimeout(function(){f.focus()},10)}},open:function(){var e=this;e.d.iframe&&e.d.iframe.show();if(c.isFunction(e.o.onOpen)){e.o.onOpen.apply(e,[e.d])}else{e.d.overlay.show();e.d.container.show();e.d.data.show()}e.focus();e.bindEvents()},close:function(){var e=this;if(!e.d.data){return false}e.unbindEvents();if(c.isFunction(e.o.onClose)&&!e.occb){e.occb=true;e.o.onClose.apply(e,[e.d])}else{if(e.d.parentNode){if(e.o.persist){e.d.data.hide().appendTo(e.d.parentNode)}else{e.d.data.hide().remove();e.d.orig.appendTo(e.d.parentNode)}}else{e.d.data.hide().remove()}e.d.container.hide().remove();e.d.overlay.hide().remove();e.d.iframe&&e.d.iframe.hide().remove();e.d={}}}}})(jQuery);(function(b){b.fn.superfish=function(k){var h=b.fn.superfish,j=h.c,f=b(['<span class="',j.arrowClass,'"> &#187;</span>'].join("")),i=function(){var c=b(this),l=g(c);clearTimeout(l.sfTimer);c.showSuperfishUl().siblings().hideSuperfishUl()},e=function(){var c=b(this),m=g(c),l=h.op;clearTimeout(m.sfTimer);m.sfTimer=setTimeout(function(){l.retainPath=(b.inArray(c[0],l.$path)>-1);c.hideSuperfishUl();if(l.$path.length&&c.parents(["li.",l.hoverClass].join("")).length<1){i.call(l.$path)}},l.delay)},g=function(c){var l=c.parents(["ul.",j.menuClass,":first"].join(""))[0];h.op=h.o[l.serial];return l},d=function(c){c.addClass(j.anchorClass).append(f.clone())};return this.each(function(){var c=this.serial=h.o.length;var m=b.extend({},h.defaults,k);m.$path=b("li."+m.pathClass,this).slice(0,m.pathLevels).each(function(){b(this).addClass([m.hoverClass,j.bcClass].join(" ")).filter("li:has(ul)").removeClass(m.pathClass)});h.o[c]=h.op=m;b("li:has(ul)",this)[(b.fn.hoverIntent&&!m.disableHI)?"hoverIntent":"hover"](i,e).each(function(){if(m.autoArrows){d(b(">a:first-child",this))}}).not("."+j.bcClass).hideSuperfishUl();var l=b("a",this);l.each(function(n){var o=l.eq(n).parents("li");l.eq(n).focus(function(){i.call(o)}).blur(function(){e.call(o)})});m.onInit.call(this)}).each(function(){var c=[j.menuClass];if(h.op.dropShadows&&!(b.browser.msie&&b.browser.version<7)){c.push(j.shadowClass)}b(this).addClass(c.join(" "))})};var a=b.fn.superfish;a.o=[];a.op={};a.IE7fix=function(){var c=a.op;if(b.browser.msie&&b.browser.version>6&&c.dropShadows&&c.animation.opacity!=undefined){this.toggleClass(a.c.shadowClass+"-off")}};a.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator",shadowClass:"sf-shadow"};a.defaults={hoverClass:"sfHover",pathClass:"overideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},speed:"normal",autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};b.fn.extend({hideSuperfishUl:function(){var e=a.op,d=(e.retainPath===true)?e.$path:"";e.retainPath=false;var c=b(["li.",e.hoverClass].join(""),this).add(this).not(d).removeClass(e.hoverClass).find(">ul").hide().css("visibility","hidden");e.onHide.call(c);return this},showSuperfishUl:function(){var e=a.op,d=a.c.shadowClass+"-off",c=this.addClass(e.hoverClass).find(">ul:hidden").css("visibility","visible");a.IE7fix.call(c);e.onBeforeShow.call(c);c.animate(e.animation,e.speed,function(){a.IE7fix.call(c);e.onShow.call(c)});return this}})})(jQuery);$(document).ready(function(){$(".privacy").click(function(a){a.preventDefault();$.get("/privacy.html",function(b){$.modal(b,{opacity:"75",closeHTML:'<a href="" class="closeLink">close</a>',maxWidth:"450",maxHeight:"350"})})});$(".aboutcvb").click(function(a){a.preventDefault();$.get("/about.html",function(b){$.modal(b,{opacity:"75",closeHTML:'<a href="" class="closeLink">close</a>',maxWidth:"450",maxHeight:"550"})})});$(".linkto").click(function(a){a.preventDefault();$.get("/linktocvb.html",function(b){$.modal(b,{opacity:"75",closeHTML:'<a href="" class="closeLink">close</a>',maxWidth:"450",maxHeight:"350"})})})});$(document).ready(function(){$(".sf-navbar").superfish({autoArrows:false,delay:200,speed:0});$(".sf-navbar > li, .hover").hover(function(){var d=$(this).find("img:first");d.data("originalsrc",d.attr("src"));if(!d.attr("src").match(/-over/)){d.attr("src",d.attr("src").replace(/\./,"-over."))}},function(){var d=$(this).find("img:first");d.attr("src",d.data("originalsrc")).data("originalsrc",null)});$(".tabnav li a").click(function(g){g.preventDefault();var f=$(this);var d=f.attr("href").substring(1);f.closest(".tabnav").find("a").removeClass("active");f.addClass("active");f.closest(".tabs").find(".tabPanel").hide();$("#"+d).show()});$("#showRefine, .showRefine").click(function(d){d.preventDefault();$("#refineBox").slideToggle()});$.ajaxSetup({cache:false});$(".addSuitcase").click(function(d){d.preventDefault();$(this).nextAll(".suitcaseCommentForm").slideToggle()});$(".suitcaseForm").submit(function(d){d.preventDefault;$this=$(this);var g=$this.find("input[name=listing_id]").attr("value");var f=$this.serialize();$.post("/cgi-bin/listings/suitcase/suitcase.cgi","todo=add&"+f,function(h){if(h<0){alert("There was an error saving to your suitcase")}else{$this.parents(".suitcaseButtonContainer").find(".addSuitcase").hide();$this.parents(".suitcaseButtonContainer").find(".removeSuitcase").show();$("#suitcaseCount").html(h)}$this.parents(".suitcaseCommentForm").slideUp();var e=$this.parents(".listing").find(".listingName").html()+" ("+g+")";trackEvent("Interact With Businesses","Add to Suitcase",e,null)});return false});$(".removeSuitcase").click(function(d){d.preventDefault();$this=$(this);var f=$this.attr("href").substring(1);$.post("/cgi-bin/listings/suitcase/suitcase.cgi","todo=delete&listing_id="+f,function(e){if(e<0){alert("There was an error deleting from your suitcase")}else{$suitcaseButtonContainer=$this.parents(".suitcaseButtonContainer");$suitcaseButtonContainer.find(".removeSuitcase").hide();$suitcaseButtonContainer.find(".addSuitcase").show();$listing=$this.parents(".listing");$suitcaseComment=$listing.find(".suitcaseComment");$suitcaseComment.slideUp("fast",function(){$suitcaseComment.remove()});if($("#suitcase").length){$listing.slideUp("fast",function(){$listing.remove()});map.removeOverlay(gmarkers[f])}$("#suitcaseCount").html(e)}})});$(".cancelSuitcase").click(function(d){d.preventDefault();$(this).parents(".suitcaseCommentForm").slideUp()});$(".emailSuitcase").click(function(d){d.preventDefault();$(this).nextAll(".suitcaseEmailFormContainer").slideToggle()});$(".suitcaseEmailForm").submit(function(d){d.preventDefault;$this=$(this);if(!$this.find("input[name=to]").attr("value")){alert("Recipient's Email is required");return false}if(!$this.find("input[name=from_email]").attr("value")){alert("Your Email is required");return false}if(!$this.find("input[name=from_name]").attr("value")){alert("Your Name is required");return false}var f=$this.serialize();$.post("/cgi-bin/listings/suitcase/email_suitcase.cgi",f,function(e){var g=$this.parents(".suitcaseEmailFormContainer");if(e<0){alert("There was an error emailing to your suitcase");g.slideUp()}else{g.slideUp();g.after('<div id="emailSent" style="display : none; color : #5C8727; position : absolute;">Email has been sent.</div>');$("#emailSent").fadeIn();setTimeout(function(){$("#emailSent").fadeOut("slow",function(){$("#emailSent").remove()})},5000)}trackEvent("Interact With Businesses","Email Suitcase",null,null)});return false});$(".cancelSuitcaseEmail").click(function(d){d.preventDefault();$(this).parents(".suitcaseEmailFormContainer").slideUp()});var b={};var c={bgcolor:"#578699",wmode:"opaque"};var a=false;swfobject.embedSWF("/flash/tripplanner.swf","suitcaseBanner","125","45","6.0.0","",b,c,a)});window.onload=function(){$(".sf-navbar > li, .hover").each(function(){var a=$(this).find("img:first");if(!a.attr("src").match(/-over/)){$("<img>").attr("src",a.attr("src").replace(/\./,"-over."))}})};function track(a){firstTracker._trackPageview(a);secondTracker._trackPageview(a)}function trackEvent(c,a,b,d){firstTracker._trackEvent(c,a,b,d);secondTracker._trackEvent(c,a,b,d)};
