$(document).foundation();$(function(){function f(n){$(n.sliderObject).parent().find(".dots .dot").removeClass("current");$(n.sliderObject).parent().find(".dots .dot:eq("+(n.currentSlideNumber-1)+")").addClass("current")}function e(n){$(n.sliderObject).parent().find(".dots .dot").removeClass("current");$(n.sliderObject).parent().find(".dots .dot:eq("+(n.currentSlideNumber-1)+")").addClass("current")}function h(n){$(n.sliderObject).closest(".vehicle-specs").find(".thumbs .thumb").removeClass("current");$(n.sliderObject).closest(".vehicle-specs").find(".thumbs .thumb:eq("+(n.currentSlideNumber-1)+")").addClass("current")}function c(n){$(n.sliderObject).closest(".vehicle-specs").find(".thumbs .thumb").removeClass("current");$(n.sliderObject).closest(".vehicle-specs").find(".thumbs .thumb:eq("+(n.currentSlideNumber-1)+")").addClass("current")}function o(n){$(".trip-planner .trip-step-complete.step1").stop().slideUp(300);$(".trip-planner .trip-step-complete.step2").stop().slideUp(300);$(".trip-planner .trip-step.step1").stop().slideUp(300);$(".trip-planner .trip-step.step2").stop().slideUp(300);$(".trip-planner .trip-step.step3").stop().slideUp(300);$(".trip-planner-map .map-step.step1").stop().fadeOut(300);$(".trip-planner-map .map-step.step2").stop().fadeOut(300);$(".trip-planner-map .map-step.step3").stop().fadeOut(300);n=="step1"?($(".trip-planner .trip-step.step1").stop().slideDown(300),$(".trip-planner-map .map-step.step1").stop().delay(300).fadeIn(300)):n=="step2"?($(".trip-planner .trip-step-complete.step1").stop().slideDown(300),$(".trip-planner .trip-step.step2").stop().delay(300).slideDown(300),$(".trip-planner-map .map-step.step2").stop().delay(300).fadeIn(300)):n=="step3"&&($(".trip-planner .trip-step-complete.step1").stop().slideDown(300),$(".trip-planner .trip-step-complete.step2").stop().slideDown(300),$(".trip-planner .trip-step.step3").stop().delay(300).slideDown(300),$(".trip-planner-map .map-step.step3").stop().delay(300).fadeIn(300),$(".trip-planner .trip-step.step3 .alert").stop().delay(600).fadeIn(200))}function l(n){$(".insurance-table th, .insurance-table td").removeClass("selected");$(".insurance-table").find(n).addClass("selected");n==".opt3"?$(".alert.opt3").slideDown(200):$(".alert.opt3").slideUp(200)}function a(n){$(".insurance-mobile .option").removeClass("selected");$(".insurance-mobile").find(n).addClass("selected");n==".opt3"?$(".alert.opt3").slideDown(200):$(".alert.opt3").slideUp(200)}var i,u,r,t,n,s;Modernizr.Detectizr.detect({detectDeviceModel:!1,detectScreen:!1,detectOS:!0,detectBrowser:!0,detectPlugins:!1});i=$("body");i.addClass(Modernizr.Detectizr.device.browser+" "+Modernizr.Detectizr.device.os+" "+Modernizr.Detectizr.device.type);u=navigator.userAgent.match(/iPad/i)!=null;u==!0&&i.addClass("ipad");r=768;$(window).bind("resize",function(){resizePage()});$viewport=$("meta[name=viewport]");$isMobile=/iphone|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase());$isMobile&&$(window).width()<r&&$viewport.attr("content","width=device-width, user-scalable=no");$(".nav li").not(".mobile .nav li").not(".touch .nav li").hover(function(){$(this).addClass("open");$(this).find("ul.drop").stop().delay(150).slideDown(100)},function(){$(this).removeClass("open");$(this).find("ul.drop").stop().slideUp(100)});$(".touch .nav > li > a").not(".touch .mobile .nav > li > a").on("click",function(){return $(this).closest(".nav > li").hasClass("open")?($("ul.drop").stop().slideUp(100),!0):($(".nav > li").removeClass("open"),$("ul.drop").stop().slideUp(100),$(this).parent().addClass("open"),$(this).parent().find("ul.drop").stop().slideDown(100),!1)});$(".mobile-menu > a, .mobile-account > a").on("touchstart click",function(n){n.stopPropagation();n.preventDefault();$(".mobile-group-menu").removeClass("open");$(".mobile-group-menu").find("ul.mobile-drop").attr("style","display:none");$(this).parent().toggleClass("open");$(this).parent().hasClass("open")?$(this).parent().find("ul.mobile-drop").slideDown(100):$(this).parent().find("ul.mobile-drop").slideUp(100)});$("body").click(function(){$(".mobile-group-menu").removeClass("open");$(".mobile-drop").slideUp(100)});$(".review-sidebar .review-slider").each(function(){$(this).iosSlider({snapToChildren:!0,desktopClickDrag:!0,navSlideSelector:$(this).find(".dots .dot"),infiniteSlider:!0,onSliderLoaded:f,onSlideChange:e})});$(".review-panel .review-slider").iosSlider({snapToChildren:!0,desktopClickDrag:!0,navSlideSelector:$(".review-panel .dots .dot"),infiniteSlider:!0,responsiveSlideContainer:!1,responsiveSlides:!1,autoSlide:!0,autoSlideTimer:5e3,autoSlideTransTimer:1e3,autoSlideHoverPause:!0,onSliderLoaded:f,onSlideChange:e});$(".vehicle-box .images").iosSlider({snapToChildren:!0,desktopClickDrag:!0,navSlideSelector:$(".thumbs .thumb"),infiniteSlider:!0,responsiveSlideContainer:!1,responsiveSlides:!1,onSliderLoaded:h,onSlideChange:c});$(".vehicle-box .thumb").click(function(){return!1});t=$("#thumb-prev");n=$("#thumb-next");t.add(n).addClass("disabled");n.removeClass("disabled");$(".thumb-slider").serialScroll({items:"a.thumb",prev:"#thumb-prev",next:"#thumb-next",start:0,step:1,exclude:0,duration:200,stop:!0,lock:!1,force:!0,easing:"easeOutQuad",cycle:!1,axis:"x",offset:{left:0,top:0},jump:!1,onBefore:function(i,r,u,f,e){t.add(n).removeClass("disabled");e==0?t.addClass("disabled"):e>=f.length-5&&n.addClass("disabled")}});$(".clearDefault").focus(function(){this.value==this.defaultValue&&(this.value="")}).blur(function(){this.value.length||(this.value=this.defaultValue)});$("input.icheck").iCheck();(Modernizr.Detectizr.device.type=="tablet"||Modernizr.Detectizr.device.type=="mobile")&&$("select.time-picker").prop("type","time");$("select.replace").not(".dynamic").selectBoxIt({dynamicPositioning:!0});$("a.promo").not(".disabled a.promo").click(function(){return $(this).closest("form").find("fieldset.promo").show(),$(this).hide(),$(".disabled a.promo").hide(),!1});$("#divVDQuote").find("a.promo").not(".disabled a.promo").click(function(){return $("#divVDQuote").find("fieldset.promo").not(".disabled fieldset.promo").show(),$(this).hide(),$("#divVDQuote").find(".disabled a.promo").hide(),!1});$("#divBYDQuote").find("a.promo").not(".disabled a.promo").click(function(){return $("#divBYDQuote").find("fieldset.promo").not(".disabled fieldset.promo").show(),$(this).hide(),$("#divBYDQuote").find(".disabled a.promo").hide(),!1});$(".itin-closed a.btn").click(function(){return $itin=$(this).closest(".itin-container").find(".form.itin"),$itin.removeClass("mobile-hide").css("display","none"),$itin.slideDown(100),$(".itin-closed").removeClass("mobile-only").css("display","block"),$(".itin-closed").slideUp(100),$(".itin-container").addClass("open"),!1});$(".itin-closed a.btn").click(function(){return $itin=$(this).closest(".pink-box").find(".form.itin"),$itin.removeClass("mobile-hide").css("display","none"),$itin.slideDown(100),$(".itin-closed").removeClass("mobile-only").css("display","block"),$(".itin-closed").slideUp(100),$(".itin-container").addClass("open"),!1});$(".contact-phone").click(function(){return $(this).closest(".contact-phone-container").find(".contact-phone-popup").show(),!1});$(".popup .x").click(function(){return $(this).closest(".popup").hide(),!1});$(".vehicle-view a").click(function(){return $view=$(this).attr("data-view"),$("input[id$=HidVehicleView]").val($view),$notView=$(".vehicle-view a").not(this).attr("data-view"),$(".vehicles").addClass($view).removeClass($notView),$(".vehicle-view a").not(this).removeClass("current"),$(this).addClass("current"),!1});$(".vehicle-view-new a").click(function(){if($view=$(this).attr("data-view"),$("input[id$=HidVehicleView]").val($view),$notView=$(".vehicle-view-new a").not(this).attr("data-view"),$(".vehicles-new").addClass($view).removeClass($notView),$("#vehicle-loader").addClass($view).removeClass($notView),$(".vehicle-view-new a").not(this).removeClass("current"),$(this).addClass("current"),$view==="grid"){$(".vehicles-new > .vehicle .info").css("height","auto");$(".vehicles-new > .vehicle .pricing").css("height","auto");var n=0;$(".vehicles-new > .vehicle .pricing").each(function(t,i){var r=$(i).outerHeight();r>n&&(n=r)});$(".vehicles-new > .vehicle .pricing").css("height",n+"px")}else $(".vehicles-new > .vehicle .info").css("height","auto"),$(".vehicles-new > .vehicle .pricing").css("height","auto"),$(".vehicles-new > .vehicle").each(function(n,t){vehicleColHeights(t)});return!1});$(".vehicles.vehicles-new-layout .vehicle .i").hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")});$(".vehicles.vehicles-new-layout .vehicle .bubble").hover(function(){$priceExpand=$(this).closest(".summary, .info").find(".price-expand");$priceExpand.show()},function(){$priceExpand=$(this).closest(".summary, .info").find(".price-expand");$priceExpand.hide()});$(".vehicles.vehicles-new-layout .vehicle .i, .vehicles.vehicles-new-layout .vehicle .bubble").click(function(){return $priceExpand=$(this).closest(".summary, .info").find(".price-expand"),$priceExpand.toggle(),!1});$(".slider-range-seats").slider({range:!0,min:4,max:8,step:1,values:[4,8]});$(".slider-range-bag").slider({range:!0,min:1,max:5,step:1,values:[1,5]});$(".slider-range-engine").slider({range:!0,min:1.4,max:3,step:.2,values:[1.4,3]});$(".slider-range-fuel").slider({range:!0,min:1,max:6,step:1,values:[1,6]});$(".quote-options .edit, .vehicle-quote footer .btn-white.open-popover, .btn.open-popover, a.open-popover").click(function(){return $popover=$(this).attr("href"),$fieldset=$(this).closest("fieldset"),$(".popover").hide(),$($popover).slideDown(150),$("body").hasClass("mobile")&&!$($popover).hasClass("form")&&$fieldset.slideUp(150),!1});$(".popover > header .x, .popover .done, .popover .cancel").click(function(){return $popover=$(this).closest(".popover"),$popover.slideUp(150),$("body").hasClass("mobile")&&!$popover.hasClass("form")&&$popover.prev("fieldset").slideDown(150),!1});$(".form a#share").click(function(){return $("#share-quote").show(),$(this).hide(),!1});$("#check-avail").click(function(){return $("#cal-avail").show(),$(this).hide(),!1});$("a.swap-nums-landline").click(function(){return $(".mobile-phone").hide(),$(".landline-phone").show(),!1});$("a.swap-nums-mobile").click(function(){return $(".mobile-phone").show(),$(".landline-phone").hide(),!1});$(".driver .edit").click(function(){return $(this).hide(),$(this).closest(".driver").find(".val").hide(),$(this).closest(".driver").find(".change-age").addClass("show"),!1});$("#showCVV").click(function(){return $("#cvv").show(),!1});$("#cvv .x").click(function(){return $("#cvv").hide(),!1});$(".vehicle-summary.closed .view-vehicle").click(function(){return $(".vehicle-summary").removeClass("closed").addClass("open"),!1});$(".booking-summary.closed .view-summary").click(function(){return $(".booking-summary").removeClass("closed").addClass("open"),!1});$("body").on("click",".trip-planner-map .btn",function(){return goto=$(this).attr("data-trip-step"),o(goto),!1});$(".trip-planner .trip-step.step1 input, .trip-planner .trip-step.step2 input").change(function(){goto=$(this).closest(".trip-step").attr("data-trip-step");o(goto)});layoutActivities=function(){$("body").hasClass("mobile")||$(".go-play-act").isotope({itemSelector:"div.activity",masonry:{columnWidth:330,gutter:20},animationEngine:"css",transformsEnabled:!1})};layoutActivities();$(".go-play-act").imagesLoaded(function(){layoutActivities()});$(".video, .video-body").fitVids();$("html.no-touch .tooltip").tooltip({position:{my:"left+5 bottom-7",at:"left top"},show:100,hide:100});$(".vehicle .select input").change(function(){return $(this).closest(".vehicle").toggleClass("selected"),!1});$(".test-start a.more").click(function(){return $(this).hide(),$(this).closest(".test-box").find(".test-expand").slideDown(200),!1});$(".faq-answer").hide();$(".faq-link").click(function(){return $(this).toggleClass("open"),$(this).parent().next(".faq-answer").slideToggle(200),!1});$(".team li").not(".mobile .team li").hover(function(){$(this).find(".team-pop").fadeIn(100)},function(){$(this).find(".team-pop").fadeOut(100)});$(".team li .team-pop img").not(".mobile .team li .team-pop img").hover(function(){},function(){$(this).parent().fadeOut(100)});$(".touch .team li .team-pop").click(function(){$(this).closest(".team-pop").fadeOut(100)});$(".browser-update .close").click(function(){return $(".browser-update").slideUp(200),!1});$("#drivesafe a.x").click(function(){return $(this).parent().slideUp(200),!1});s={lines:11,length:3,width:3,radius:5,corners:1,rotate:0,direction:1,color:"#fff",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spin",zIndex:2e9,top:"auto",left:"auto"};$("a.btn.disable-on-submit").click(function(){var n=$(this).width(),t=$(this).html();$(this).css({width:n});$(this).addClass("disabled");$(this).html("");$(this).spin(s)});$("a.btn.disabled").click(function(){return!1});$(".updown").spinner({min:0});$(".updown.min").spinner({min:1});$(".updown.disabled").spinner({disabled:!0});$(window).scroll(function(){if($(".itin-horz").removeClass("is-sticky"),!($(".sticky-search-holder").length===0)&&$(window).width()>=r){var n=$(window).scrollTop(),t=$(".sticky-search-holder").offset().top;n>t?$(".itin-horz").addClass("is-sticky"):$(".itin-horz").removeClass("is-sticky")}});$("#TOC a").click(function(){var n=$(this).attr("href");return $.scrollTo(n,500,{easing:"easeOutQuad",offset:{left:0,top:-30}}),!1});$(".demo-error").click(function(){return $(".alert.search-error").fadeIn(100),!1});$(".search-error .x").click(function(){return $(this).parent().hide(),!1});$("a.btn.processing").click(function(){$("#processing").foundation("reveal","open");return $(".spin-container").spin({lines:11,length:10,width:4,radius:10,corners:1,rotate:0,direction:1,color:"#ec008c",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spin",zIndex:2e9,top:"6",left:"6"}),!1});$(".checkin .add-driver").click(function(){return $("#extra-driver-1").slideDown(200),!1});$(".remove-driver").click(function(){return $parent=$(this).closest(".driver"),$parent.slideUp(200),!1});$(".insurance-table input[type=radio]").on("ifChecked",function(){col=$(this).attr("data-col");l(col)});$(".insurance-table th.option").click(function(){$(this).find("input[type=radio]")[0].disabled||$(this).find("input[type=radio]").iCheck("check")});$(".insurance-mobile .option input[type=radio]").on("ifChecked",function(){opt=$(this).attr("data-opt");a(opt)});$(".insurance-mobile .option").click(function(){$(this).find("input[type=radio]")[0].disabled||$(this).find("input[type=radio]").iCheck("check")})});$(function(){var n=$(':hidden[id="__GR_SessionExpired"]').val();n||__grHelpers.sessionTimeout.start();$(".loading-panel").showDefaultSpinner(!0)})