/*---------------------------------------------------------------------*/
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);	
;(function($){
/*---------------------------------------------------------------------*/
$(document).ready( function(){
/*---------------------------------------------------------------------*/	
checkWindow();
    if($('#Testslider .item').length > 1){
		 $("#Testslider").owlCarousel({
		animateOut: '',
	autoplay:true,
   autoplayTimeout:5000,
       loop:true,
	   nav:true,
	   dots:false,
    margin:0,
    items:1  
		});
	
	   }
				
				if($('.covidSlider .item').length > 1){
		 $(".covidSlider").owlCarousel({
	autoplay:true,
   autoplayTimeout:20000,
			loop:true,
	   nav:true,
	   dots:false,
    margin:0,
    items:1  
		});
	}
	
	
	if($('.singleImgSlider').length){
		 $('.singleImgSlider').owlCarousel({
	//animateOut: 'fadeOut',
	autoplay:7000,
     loop:true,
	 dots:false,
	 stagePadding:0,
	 merge:true,
	 nav:false,
    margin:0,
    items:1
	
})
	}
	
	if($('.testimonialSlider').length){
		 $('.testimonialSlider').owlCarousel({
	//animateOut: 'fadeOut',
	autoplay:7000,
     loop:true,
	 dots:false,
	 stagePadding:0,
	 merge:true,
	 nav:false,
    margin:0,
    items:1
	
})
	}
if($('.testimaonialSlidersingle .item').length){
$(".testimaonialSlidersingle").owlCarousel({
autoplay:5000,
loop:true,
margin:0,
dots:false,
nav:false,
items:1
});	
}
if($('.photovideoslider').length){
		 $('.photovideoslider').owlCarousel({
	//animateOut: 'fadeOut',
	autoplay:7000,
     loop:true,
	 dots:true,
	 stagePadding:0,
	 responsive:false,
	 merge:true,
	 nav:true,
    margin:0,
    items:1
	
})
	}
	
	if($('.serviceSlider .item').length){
 $('.serviceSlider').owlCarousel({
 //animateOut: 'fadeOut',
 autoplay:true,
 autoplayTimeout:4000,
 loop:true,
 dots:false,
  nav:true,
 autoHeight:true,
 margin:30,
  items:3, 
  responsive : {
  // breakpoint from 0 up
   0 : {
   items:1
    },
   768 : {
   items:2
   },
   900 : {
   items:2
    },
  1023 : {
  items:3
  }
  }
 });	
 }
	
	
	if($('.ReviewsSlider .item').length){
			
		 $('.ReviewsSlider').owlCarousel({
	//animateOut: 'fadeOut',
	autoplay:true,
    autoplayTimeout:4000,
   loop:true,
	 dots:false,
	 nav:false,
	 autoHeight:true,
   margin:30,
   items:3, 
  responsive : {
  // breakpoint from 0 up
    0 : {
     items:1
    },
   
    768 : {
    items:2
    },
	900 : {
    items:2
    },
	 1023 : {
    items:3
    }
}
		});	
 
}
if($(".tableShowhideBtn").length){
	$(".tableShowhideBtn").on("click", function(event){
			event.preventDefault();
 $(this).toggleClass("active");
 $(".showHideCont").slideToggle("slow");
 });
 }	
if($(".readMoreReview").length){
    $(".readMoreReview").parent().addClass("readMoreWrap");
    $(".readMoreReview").on("click",function(e){
        	e.preventDefault();
    if($(this).hasClass("active")){
     $(this).removeClass("active"); 
     $(this).parent().prev("p").removeClass("active");
     $(this).text("Read More");
    }else{
      $(this).addClass("active");    
       $(this).parent().prev("p").addClass("active"); 
        $(this).text("Read Less");
    }    
    })  
}
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
	     e.target // newly activated tab
        e.relatedTarget // previous active tab
	setTimeout(function(){
        $(".ReviewsSlider").trigger('refresh.owl.carousel');			
			},2000);
			
      });
	
	if($('.videoBtn').length){
		$(".videoBtn").click(function(event){	
			event.preventDefault();
			$(this).parent().next(".videoWrap").slideToggle();
		});
	}	
	if($('.mainCategory').length){
		$(".mainCategory a").click(function(event){	
			event.preventDefault();
			$(".mainCategory a").removeClass("active");	
	$(".lastCategoryDiv").fadeOut();
	$(".ChristianToursCategoryDiv").fadeOut();
		});
	}	
	if($('.mainCategory').length){		
		$(".mainCategory .filterLink").click(function(event){	
			event.preventDefault();
	var hash = $(this).attr("href");		
	var res = hash.split('#')[1];			
	$(".mainCategory .filterLink").removeClass("active");		
	$(this).addClass("active");		
	$(".subCategoryWrap .showHideFilter").fadeOut();
	$(".subCategoryWrap").find("."+res).fadeIn();	
			$('html, body').animate({
        scrollTop: parseInt($(".subCategoryWrap").offset().top - 50)
    }, 1000);
		});
	}
	/*if($('.subCategoryWrap').length){
		$(".subCategoryWrap a").click(function(event){	
			event.preventDefault();
			$(".subCategoryWrap a").removeClass("active");	
	$(".lastCategoryDiv").fadeOut();
	$(".ChristianToursCategoryDiv").fadeOut();		
		});
		$(".subCategoryWrap .filterLink").click(function(event){	
			event.preventDefault();
	var hash = $(this).attr("href");		
	var res = hash.split('#')[1];
		
	$(".subCategoryWrap .filterLink").removeClass("active");		
	$(this).addClass("active");	
	$(".lastCategoryDiv").fadeIn();		
	$(".lastCategoryDiv .showHideFilter").fadeOut();
	$(".lastCategoryDiv").find("."+res).fadeIn();	
				$('html, body').animate({
        scrollTop: parseInt($(".lastCategoryDiv").offset().top - 50)
    }, 1000);
		});
		
	}*/
	
	if($('.lastCategoryDiv').length){
		$(".lastCategoryDiv a").click(function(event){	
			event.preventDefault();
			$(".lastCategoryDiv a").removeClass("active");	
	$(".ChristianToursCategoryDiv").fadeOut();	
		});
		$(".lastCategoryDiv .filterLink").click(function(event){	
			event.preventDefault();
	var hash = $(this).attr("href");		
	var res = hash.split('#')[1];			
	$(".lastCategoryDiv .filterLink").removeClass("active");		
	$(this).addClass("active");	
	$(".ChristianToursCategoryDiv").fadeIn();		
	$(".ChristianToursCategoryDiv .showHideFilter").fadeOut();
	$(".ChristianToursCategoryDiv").find("."+res).fadeIn();		
			$('html, body').animate({
        scrollTop: parseInt($(".ChristianToursCategoryDiv").offset().top - 50)
    }, 1000);
		});
		
	}
		/*---------------------------------------------------------------------*/
		
	if($(".viewAllExpand").length){
	$(".viewAllExpand").click(function(event){
		event.preventDefault();
		if($(this).hasClass("active")){	
		$(this).removeClass("active").text("More Services");
		$(this).parent().prev(".hideContentDiv").slideUp();			
			}
		else{		
		$(this).addClass("active").text("View Less");	
		$(this).parent().prev(".hideContentDiv").slideDown();		
			}
		
		});
	}
	if($(".viewAllExpand1").length){
	$(".viewAllExpand1").click(function(event){
		event.preventDefault();
		if($(this).hasClass("active")){	
		$(this).removeClass("active").text("View More");
		$(this).parent().prev(".hideContentDiv").hide();			
			}
		else{		
		$(this).addClass("active").text("View Less");	
		$(this).parent().prev(".hideContentDiv").show();		
			}
		});
	}
	if($(".readMoreExpandDiv").length){
	$(".readMoreExpandDiv").click(function(event){
		event.preventDefault();
		if($(this).hasClass("active")){	
		$(this).removeClass("active").text("Read More");
		$(this).parent().prev(".hideContentDiv").slideUp();			
			}
		else{		
		$(this).addClass("active").text("View Less");	
		$(this).parent().prev(".hideContentDiv").slideDown();		
			}
		
		});
	}
	
	
	if($(".readMoreExpand").length){
	$(".readMoreExpand").click(function(event){
		event.preventDefault();
		if($(this).hasClass("active")){	
		$(this).removeClass("active").text("read more");
		$(this).parent().prev(".expandDiv").removeClass("active");			
			}
		else{		
		$(this).addClass("active").text("read less");	
		$(this).parent().prev(".expandDiv").addClass("active");	
			}
		
		});
	}
	
	
	if($(".CheckMoreDealsExpand").length){
	$(".CheckMoreDealsExpand").click(function(event){
		event.preventDefault();
		if($(this).hasClass("active")){	
		$(this).removeClass("active").text("Check more deals");
		$(this).parent().prev(".hideContentDiv").slideUp();			
			}
		else{		
		$(this).addClass("active").text("Check more deals");	
		$(this).parent().prev(".hideContentDiv").slideDown();		
			}
		
		});
	}	
	
	
	
	if($(".modal a[data-toggle='modal']").length){
	     $(".modal a[data-toggle='modal']").click(function(){
			 $(this).parents(".modal").hide();
			  $("body").find(".modal-backdrop").hide();
		 });
		}
		if($("#formAddressModal .popupFormDetailsWrap").length){	
		$(".nextBtn").click(function(event){
			event.preventDefault();
			$(this).parents(".steps").fadeOut();
			$(this).parents(".steps").next().fadeIn();
			setTimeout(function(){
				backBtn();	
				},500)	
			});
		$("#formAddressModal .backBtn").click(function(event){
			event.preventDefault();
			var stepId = $(this).attr("href");
			if($(this).parent().next().find(".steps:first").is(":visible")){
					$(this).parents(".modal").fadeOut();	
					$(".modal-backdrop").fadeOut();	
					$("body").removeClass("modal-open").css("padding-right","0px");	
					$(this).parent().next().find(".steps").fadeOut();
					$(this).parent().next().find("#steps01").fadeIn();	
				}else{					
					$(this).parent().next().find(".steps").fadeOut();
					$(this).parent().next().find(stepId).fadeIn();					
					}
				setTimeout(function(){
				backBtn();	
				},500)	
			});	
		$(".stpesBtn").click(function(event){	
			event.preventDefault();
			var stepId = $(this).attr("href");
			$(this).parents(".steps").fadeOut();
			$(this).parents(".modal").find(stepId).fadeIn();
			setTimeout(function(){
				backBtn();	
				},500)	
		});		
		$("#steps3 .getCarBtn").click(function(event){
			event.preventDefault();
			$(this).parents(".steps").removeClass("updateDropoff preBooking").fadeOut();
			$(this).parents(".popupFormDetailsWrap").find("#steps4").addClass("dropOff").fadeIn();
			setTimeout(function(){
				backBtn();	
				},500)	
			});
			$("#steps5 .getCarBtn").click(function(event){
			event.preventDefault();
			$(this).parents(".steps").removeClass("dropOff preBooking").fadeOut();
			$(this).parents(".popupFormDetailsWrap").find("#steps4").addClass("updateDropoff").fadeIn();
			setTimeout(function(){
				backBtn();	
				},500)	
			});
			$("#steps6 .getCarBtn").click(function(event){
			event.preventDefault();
			$(this).parents(".steps").removeClass("dropOff updateDropoff").fadeOut();
			$(this).parents(".popupFormDetailsWrap").find("#steps4").addClass("preBooking").fadeIn();
			setTimeout(function(){
				backBtn();	
				},500)	
			});
		}
		if($("#fromAirportModal .popupFormDetailsWrap").length){	
		$(".nextBtn").click(function(event){
			event.preventDefault();
			$(this).parents(".steps").fadeOut();
			$(this).parents(".steps").next().fadeIn();
			setTimeout(function(){
				backBtn1();	
				},500)	
			});
		$("#fromAirportModal .backBtn").click(function(event){
			event.preventDefault();
			var stepId = $(this).attr("href");
			if($(this).parent().next().find(".steps:first").is(":visible")){
					$(this).parents(".modal").fadeOut();	
					$(".modal-backdrop").fadeOut();	
					$("body").removeClass("modal-open").css("padding-right","0px");	
					$(this).parent().next().find(".steps").fadeOut();
					$(this).parent().next().find("#airPortStep01").fadeIn();	
				}else{					
					$(this).parent().next().find(".steps").fadeOut();
					$(this).parent().next().find(stepId).fadeIn();					
					}
				setTimeout(function(){
				backBtn1();	
				},500)	
			});	
		$(".stpesBtn").click(function(event){	
			event.preventDefault();
			var stepId = $(this).attr("href");
			$(this).parents(".steps").fadeOut();
			$(this).parents(".modal").find(stepId).fadeIn();
			setTimeout(function(){
				backBtn1();	
				},500)	
		});		
		$("#airPortStep4 .getCarBtn").click(function(event){
			event.preventDefault();
			$(this).parents(".steps").removeClass("updateDropoff preBooking").fadeOut();
			$(this).parents(".popupFormDetailsWrap").find("#airPortStep5").addClass("dropOff").fadeIn();
			setTimeout(function(){
				backBtn1();
				},500)	
			});
			$("#airPortStep6 .getCarBtn").click(function(event){
			event.preventDefault();
			$(this).parents(".steps").removeClass("dropOff preBooking").fadeOut();
			$(this).parents(".popupFormDetailsWrap").find("#airPortStep5").addClass("updateDropoff").fadeIn();
			setTimeout(function(){
				backBtn1();	
				},500)	
			});
			$("#airPortStep7 .getCarBtn").click(function(event){
			event.preventDefault();
			$(this).parents(".steps").removeClass("dropOff updateDropoff").fadeOut();
			$(this).parents(".popupFormDetailsWrap").find("#airPortStep5").addClass("preBooking").fadeIn();
			setTimeout(function(){
				backBtn1();	
				},500)	
			});
		}
		
		
		
		function backBtn(){
	if($("#steps1").is(":visible")){
		$("#formAddressModal .backBtn").attr("href","#steps01");
	}
	if($("#steps2").is(":visible")){
		$("#formAddressModal .backBtn").attr("href","#steps1");
	}
	if($("#steps3").is(":visible")){
		$("#formAddressModal .backBtn").attr("href","#steps2");
	}
	if($("#steps5").is(":visible")){
		$("#formAddressModal .backBtn").attr("href","#steps2");
	}
	if($("#steps6").is(":visible")){
		$("#formAddressModal .backBtn").attr("href","#steps2");
	}
	if($("#steps4.dropOff").is(":visible")){
		$("#formAddressModal .backBtn").attr("href","#steps3");
	}
	if($("#steps4.updateDropoff").is(":visible")){
		$("#formAddressModal .backBtn").attr("href","#steps5");
	}
	if($("#steps4.preBooking").is(":visible")){
		$("#formAddressModal .backBtn").attr("href","#steps6");
	}
	if($("#steps7").is(":visible")){
		$("#formAddressModal .backBtn").attr("href","#steps4");
	}
	if($("#steps8, #steps9, #steps10").is(":visible")){
		$("#formAddressModal .backBtn").attr("href","#steps7");
	}
	}   
function backBtn1(){
	if($("#airPortStep1").is(":visible")){
		$("#fromAirportModal .backBtn").attr("href","#airPortStep01");
	}
	if($("#airPortStep2").is(":visible")){
		$("#fromAirportModal .backBtn").attr("href","#airPortStep1");
	}
	if($("#airPortStep3").is(":visible")){
		$("#fromAirportModal .backBtn").attr("href","#airPortStep2");
	}
	if($("#airPortStep4").is(":visible")){
		$("#fromAirportModal .backBtn").attr("href","#airPortStep3");
	}
	if($("#airPortStep6").is(":visible")){
		$("#fromAirportModal .backBtn").attr("href","#airPortStep3");
	}
	if($("#airPortStep5.dropOff").is(":visible")){
		$("#fromAirportModal .backBtn").attr("href","#airPortStep4");
	}
	if($("#airPortStep5.updateDropoff").is(":visible")){
		$("#fromAirportModal .backBtn").attr("href","#airPortStep6");
	}
	if($("#airPortStep5.preBooking").is(":visible")){
		$("#fromAirportModal .backBtn").attr("href","#airPortStep7");
	}
	if($("#airPortStep7").is(":visible")){
		$("#fromAirportModal .backBtn").attr("href","#airPortStep5");
	}
	if($("#airPortStep8").is(":visible")){
		$("#fromAirportModal .backBtn").attr("href","#airPortStep5");
	}
	if($("#airPortStep9, #airPortStep10, #airPortStep11").is(":visible")){
		$("#fromAirportModal .backBtn").attr("href","#airPortStep8");
	}
	}   
	
	
	
	
	
	$(document).ready(function(){
    $(".filter-button").click(function(){
        var value = $(this).attr('data-filter');
        
        if(value == "all")
        {
            //$('.filter').removeClass('hidden');
            $('.filter').show('1000');
        }
        else
        {
//            $('.filter[filter-item="'+value+'"]').removeClass('hidden');
//            $(".filter").not('.filter[filter-item="'+value+'"]').addClass('hidden');
            $(".filter").not('.'+value).hide('3000');
            $('.filter').filter('.'+value).show('3000');
            
        }
    });
    
    if ($(".filter-button").removeClass("active")) {
$(this).removeClass("active");
}
$(this).addClass("active");
if($(".navbar-nav").length){
	$(".navbar-nav .menu-item-has-children").each(function(){
		$(this).append('<span class="menuIcon"><i class="fa fa-plus"></i></span>');
		});
	$(".menuIcon").on("click", function(){
		$(this).toggleClass("active");
		$(this).find(".fa").toggleClass("fa-minus");
		$(this).prev().slideToggle();
		
		})	
	}
if($(".selectPerhour").length){
		
	$(".selectPerhour").on("change",function(){		
	var valueFeild  = $(this).val();
		var textVal = $(this).find('option:selected').text();
		setTimeout(function(){
		if(valueFeild == 1001){
                        $(".fillFormWrapAirport").removeClass("fillFormWrapService ");
			$(".PickupAddress").attr("placeholder","Pickup: Address, Airport name, or Airport code").removeClass("bgImgNone");
			$(".DropoffAddress").attr("placeholder","Drop-off: Address, city, or zip-code");
			$(".justDriveFeild, .hideDiv, .otherServShow").hide();
			$(".DropoffAddress, .otherServHidden, .commonTopForm").show();
			$(".otherSevChangePlace").attr("placeholder","Pickup Time");
			}
		if(valueFeild == 1000){
                        $(".fillFormWrapAirport").removeClass("fillFormWrapService ");
			$(".PickupAddress").attr("placeholder","Pickup: Address, city, or zip-code").removeClass("bgImgNone");	
			$(".DropoffAddress").attr("placeholder","Drop-off: Address, Airport name, or Airport code");
			$(".justDriveFeild, .hideDiv, .otherServShow").hide();
			$(".DropoffAddress, .otherServHidden, .commonTopForm").show();
			$(".otherSevChangePlace").attr("placeholder","Pickup Time");
			}
		if(valueFeild == 1002){
                        $(".fillFormWrapAirport").removeClass("fillFormWrapService ");
			$(".PickupAddress").attr("placeholder"," Pickup: Address, city, or zip-code").removeClass("bgImgNone");
			$(".DropoffAddress").attr("placeholder","Drop-off: Address, city, or zip-code");
			$(".justDriveFeild, .hideDiv, .otherServShow").hide();
			$(".DropoffAddress, .otherServHidden, .commonTopForm").show();
			$(".otherSevChangePlace").attr("placeholder","Pickup Time");
			}	
		if(valueFeild == 1003){
                        $(".fillFormWrapAirport").addClass("fillFormWrapService ");
			$(".PickupAddress").removeClass("bgImgNone");
			$(".justDriveFeild, .hideDiv, .topServicesAppend, .justDriveHidden input, .commonTopForm").show();
			$(".DropoffAddress, .otherServHidden, .otherServShow").hide();
			$(".otherSevChangePlace").attr("placeholder","Drop-off Time");
			
			$('#no_of_hrs').val(04);
			}	
		if(valueFeild == 27 || valueFeild == 25 || valueFeild == 24 || valueFeild == 3 || valueFeild == 12 || valueFeild == 11 || valueFeild == 10 || valueFeild == 102 || valueFeild == 30 || valueFeild == 7 || valueFeild == 31){
			$('#no_of_hrs').val(04);
			
            $(".fillFormWrapAirport").addClass("fillFormWrapService ");
			$(".PickupAddress").addClass("bgImgNone");
			$(".hideDiv, .otherServShow").show();
			$(".DropoffAddress, .otherServHidden, .justDriveFeild, .bgImgNone").hide();
			$(".otherSevChangePlace").attr("placeholder","Drop-off Time");
			
			}	
		
		},100);
		})
	}
if($(".selectRideMain").length){
		
	$(".selectRideMain").on("change",function(){	
$(".roundTripOptionWrap .round-trip-status").text("No");
 $(".showSelect, .roundTripOptionWrap, .checkListBox, .mob-location .departingTitleMob, .mob-location .dropAddress, .mob-location .returnTripDiv").hide();
$(".fullWidthDiv").removeClass("col-sm-12");
  $(".topLocation").attr("placeholder","Pickup: Address, City, or Zip"); 
 $(".dropTime").hide();
	var valueFeild  = $(this).val();
		var textVal = $(this).find('option:selected').text();
		setTimeout(function(){
		if(valueFeild == 1000){
			$(".fullWidthDiv").removeClass("col-sm-12");
              $(".showSelect, .roundTripOptionWrap, .checkListBox, .mob-location .departingTitleMob, .mob-location .dropAddress, .mob-location .returnTripDiv").show();
			  $(".dropTime").hide();			  
			  $(".topLocation").attr("placeholder","Pickup: Address, city, or zip-code");  
				$(".showSelect").find(".form-control").attr("placeholder","Drop-off: Airport Name, Code or City");  
     
			}
		if(valueFeild == 1001){
			$(".fullWidthDiv").removeClass("col-sm-12");
			   $(".showSelect, .roundTripOptionWrap, .checkListBox, .mob-location .departingTitleMob, .mob-location .dropAddress, .mob-location .returnTripDiv").show();
			   $(".dropTime").hide();
				 $(".topLocation").attr("placeholder","Pickup: Airport Name, Code or City");  
				$(".showSelect").find(".form-control").attr("placeholder","Drop-off: Address, city, or zip-code"); 
               
			}
		if(valueFeild == 1002){
			 $(".showSelect, .checkListBox").show();
			$(".roundTripOptionWrap, .dropTime, .mob-location .departingTitleMob, .mob-location .returnTripDiv").hide();
			$(".fullWidthDiv").removeClass("col-sm-12");
			 $(".topLocation").attr("placeholder","Pickup: Address, City, or Zip");  
			$(".showSelect").find(".form-control").attr("placeholder","Drop-off: Address, City, or Zip"); 				
       
			}	
		if(valueFeild == 1003){
			$(".showSelect").show();
			$(".dropTime, .checkListBox").show();
			$(".roundTripOptionWrap, .mob-location .departingTitleMob, .mob-location .dropAddress, .mob-location .returnTripDiv").hide();
			$(".fullWidthDiv").addClass("col-sm-12");
			 $(".topLocation").attr("placeholder","Pickup: Address, City, or Zip");  
				$(".showSelect").hide(); 
                     		
			}
			if(valueFeild == 30){
			 $(".showSelect").show();
			$(".roundTripOptionWrap, .dropTime, .checkListBox, .mob-location .departingTitleMob, .mob-location .dropAddress, .mob-location .returnTripDiv").hide();
			$(".fullWidthDiv").removeClass("col-sm-12");
			$(".topLocation").attr("placeholder","Pickup: Cruiseport Name or City");  
			$(".showSelect").find(".form-control").attr("placeholder","Drop-off: Address, City, or Zip"); 				
       
			}	
				
		if(valueFeild == 27 || valueFeild == 25 || valueFeild == 24 || valueFeild == 3 || valueFeild == 12 || valueFeild == 11 || valueFeild == 10 || valueFeild == 7 || valueFeild == 31){
				$(".showSelect, .checkListBox, .mob-location .departingTitleMob, .mob-location .dropAddress, .mob-location .returnTripDiv").hide(); 
				$(".dropTime").show();				
                $(".fullWidthDiv").addClass("col-sm-12");      
			}	
		
		},100);
		})
	}		
	
if($(".selectYourVeRideMain").length){		
	$(".selectYourVeRideMain").on("change",function(){	
 $(".dropOffAddressText, .dropoffAddressFeild").hide();
	var valueFeild  = $(this).val();
		var textVal = $(this).find('option:selected').text();
			//$("#searchFiltersWrap .pickDataTime").insertAfter("#searchFiltersWrap .pickAddress");
              $(".dropTime1, .rentalPeriodFeild, .dropTime1, .dropTime2, .rentalPeriod1").show();
			  $(".dropOffTimeText, .rentalPeriodText, .dropOffTime, .rentalPeriod").css("display","inline-block");
			  $(".dropoffAddressFeild, .dropOffAddressText, .rentalPeriodFeild, .roundTripDiv, .allTripsDiv, .derpartingTrip, .returnTrip, .dipatingTripTitle, .returnTripTitle").hide();	
			   $(".PickuplistSelection").removeClass("changeWidth");
		setTimeout(function(){
		if(valueFeild == 1000){
			//$("#searchFiltersWrap .pickDataTime").insertBefore("#searchFiltersWrap .pickAddress");
              $(".dropoffAddressFeild, .allTripsDiv, .derpartingTrip, .returnTrip, .dipatingTripTitle, .returnTripTitle").show();
			   $(".dropOffAddressText, .rentalPeriodText").css("display","inline-block");
			 $(".dropOffTimeText, .rentalPeriodFeild, .rentalPeriodText, .roundTripDiv, .dropOffTime,  .rentalPeriod, .dropTime1, .dropTime2, .rentalPeriod1").hide();		 
			 $(".PickuplistSelection").addClass("changeWidth"); 
			}
		if(valueFeild == 1001){
			//$("#searchFiltersWrap .pickDataTime").insertBefore("#searchFiltersWrap .pickAddress");
              $(".dropoffAddressFeild, .allTripsDiv, .derpartingTrip, .returnTrip, .dipatingTripTitle, .returnTripTitle").show();
			   $(".dropOffAddressText, .rentalPeriodText").css("display","inline-block");
			  $(" .dropOffTimeText, .rentalPeriodFeild, .rentalPeriodText, .roundTripDiv, .dropOffTime, .rentalPeriod, .dropTime1, .dropTime2, .rentalPeriod1").hide();	
			   $(".PickuplistSelection").addClass("changeWidth");
			}
		if(valueFeild == 1002){
			//$("#searchFiltersWrap .pickDataTime").insertBefore("#searchFiltersWrap .pickAddress");
              $(".dropoffAddressFeild, .dropTime1, .dropTime2, .rentalPeriod1").show();
			   $(".dropOffAddressText, .dropOffTime, .rentalPeriod").css("display","inline-block");
			  $(".dropOffTimeText, .rentalPeriodFeild, .rentalPeriodText, .roundTripDiv, .allTripsDiv, .returnTrip, .dipatingTripTitle, .returnTripTitle").hide();		
			   $(".PickuplistSelection").addClass("changeWidth");
			}
				if(valueFeild == 300){
		$(".roundTripDiv").show();
				}
		if(valueFeild == 27 || valueFeild == 25 || valueFeild == 24 || valueFeild == 3 || valueFeild == 12 || valueFeild == 11 || valueFeild == 10 || valueFeild == 7 || valueFeild == 31 || valueFeild == 30 ||  valueFeild == 1003){
				//$("#searchFiltersWrap .pickDataTime").insertAfter("#searchFiltersWrap .pickAddress");
              $(".dropTime1, .rentalPeriodFeild, .dropTime1, .dropTime2, .rentalPeriod1").show();
			  $(".dropoffAddressFeild, .dropOffAddressText, .roundTripDiv, .allTripsDiv, .returnTrip, .dipatingTripTitle, .returnTripTitle").hide();
			    $(".dropOffTimeText, .rentalPeriodText, .dropOffTime,  .rentalPeriod").css("display","inline-block");		
				 $(".vehicle-fields").removeClass("changeWidth");
			}	
		
		},100);
		})
	}		
if($("#switcher").length){
$("#is_round_trip, .rt_savings_title").on("click", function(){
  if($(this).is(":checked")){
$(".roundTripOption").show();
$(".roundTripOptionWrap .round-trip-status").text("Yes");  
  }else{
  $(".roundTripOption").hide();
$(".roundTripOptionWrap .round-trip-status").text("No");
  }
});
}
if($(".datepicker").length){
	 $( ".datepicker" ).datepicker({
		  minDate: 0,		 
		onSelect: function(date) {
        	//alert(date);
			$('.datepicker').css("border", "2px solid #009933");
		 }			 
	 });
	}
	if($(".dateTimePicker").length){
	 $('.dateTimePicker').datetimepicker({
                    format: 'LT'
                });
	}
});
		
		
/*****************new js added****************/
	if($(".viewAllExpandCo").length){
	$(".viewAllExpandCo").click(function(event){
		event.preventDefault();
		if($(this).hasClass("active")){	
		$(this).removeClass("active").text("View More");
		$(this).parent().prev(".hideContentDiv").hide();			
			}
		else{		
		$(this).addClass("active").text("View Less");	
		$(this).parent().prev(".hideContentDiv").show();		
			}
		});
	}
	
	if($(".ListIteamBx").length){
	$(".ListIteamBx li").each(function(){
		if($(this).find("ul").length){
		$(this).append('<i class="menuIcon"></i>');
		}
		});
	$(".menuIcon").on("click", function(){
		$(this).toggleClass("active");
		$(this).parent().toggleClass("active");
		$(this).prev().slideToggle();
		})	
	}
	if($(".selectChange").length){
		$(".selectChange").on("change",function(){
		var valueFeild  = $(this).val();
		if(valueFeild == "1"){
			$(".privateSection").show();
			$(".hideDIvPrivate").hide();
			}
		if(valueFeild == "2"){			
			$(".corporateDiv, .hideDIvPrivate").show();
			$(".hideDiv, .privateSection").hide();
			}
		if(valueFeild == "3"){			
			$(".travelAgent, .hideDIvPrivate").show();
			$(".corporateDiv, .privateSection").hide();
			}		
		});
	}
  $(".navTogglebtn").click(function(){
	$(".ListIteamBx").slideToggle("slow");
	});
	
if($(".contetnTabsBtn").length){		
	$(".contetnTabsBtn").on("click", function(event){		
		event.preventDefault();
		var tabId = $(this).attr("href");
		$(".contetnTabsBtn").removeClass("active");
		$(this).addClass("active");
		$(".showHideCont").fadeOut();
		$(tabId).fadeIn("fast");
		});		
}
	
	
	/*if($(".BtnsBookNow").length){
		$(".BtnsBookNow").each(function(){
		$(this).on("click",function(event){
				event.preventDefault();
			if($(this).parents(".InnerTabConts").find(".bookNowDivWrap").is(":visible")){
				$(this).parents(".InnerTabConts").find(".bookNowDivWrap").slideUp();		
				$(this).parents(".reviewRow").find(".mainTitle").text("Quotes List");
				$(this).parents(".reviewRow").find(".mainSubTitle").text('Upcoming Quotes 10');
				}else{
				$(this).parents(".InnerTabConts").find(".bookNowDivWrap").slideDown();	
				$(this).parents(".reviewRow").find(".CustomerInfoWrapSec").hide();	
				var textTitle = $(this).parents(".FillResevationWrap").find("h5").text();
				$(this).parents(".reviewRow").find(".mainTitle").text(textTitle);
				$(this).parents(".reviewRow").find(".mainSubTitle").text('(Complete info below to book)');
					}
			});
			});
		}*/
		
		if($(".signContract").length){
		$(".signContract").each(function(){
		$(this).on("click",function(event){
				event.preventDefault();
			if($(this).parents(".InnerTabConts").find(".bookNowDivWrap").is(":visible")){
				$(this).parents(".InnerTabConts").find(".bookNowDivWrap").slideUp();		
				$(this).parents(".reviewRow").find(".mainTitle2").text("Reservations List");
				$(this).parents(".reviewRow").find(".mainSubTitle").hide();	
				}else{
				$(this).parents(".InnerTabConts").find(".bookNowDivWrap").slideDown();	
				$(this).parents(".reviewRow").find(".CustomerInfoWrapSec").hide();	
				var textTitle = $(this).parents(".FillResevationWrap").find("h5").text();
				$(this).parents(".reviewRow").find(".mainTitle2").text(textTitle);
				$(this).parents(".reviewRow").find(".mainSubTitle").text('(Scroll down to sign)').show();
					}
			});
			});
		}
		
		if($(".bookBactBtn").length){
			$(".bookBactBtn").on("click",function(event){
				event.preventDefault();
			$(this).parent().hide();
			$(this).parents(".reviewRow").find(".CustomerInfoWrapSec").show();	
			$(".mainTitle").text("Existing Quotes");
			$(".mainTitle").text("Quotes List").show();
			$(".mainTitle2").text("Reservations List");
			$(".mainSubTitle").show();
			$("#quotesCont").find(".mainSubTitle").text('Upcoming Quotes 10');
			$("#reservationsCont").find(".mainSubTitle").hide();
			});
			}
 $(function() {
                $('.reviewSideMenu a.contetnTabsBtn, .commentNav a.contetnTabsBtn').bind('click',function(event){
                    var $anchor = $(this);
					setTimeout(function(){
                    $('html, body').stop().animate({
                        scrollTop: $($anchor.attr('href')).offset().top
                    }, 2000,'easeInOutExpo');
					},500);
                });
            }); 
		
		if($(".Txtchangesearch").length){
	$(".Txtchangesearch a").click(function(){
		$(this).toggleClass("active");
		$("#searchFiltersWrap").slideToggle();
		});
	}
	
	if($('.imgSlider .item').length){
		 $(".imgSlider").owlCarousel({
		animateOut: '',
	autoplay:true,
   autoplayTimeout:3000,
       loop:true,
	   nav:true,
	    mouseDrag:true,
	   dots:false,
	   stagePadding:10,
    margin:10,
    items:1  
		});
	}	
	
if($(".filterBtn").length){
$(".filterBtn").on("click",function(){
$(".mobileFilterWrap").addClass("active");	
$("body").addClass("overFlowhidden");
});	
}
if($(".closeBtn").length){
$(".closeBtn").on("click",function(){
$(".mobileFilterWrap, .infoPopup").removeClass("active");	
$("body").removeClass("overFlowhidden");
});	
}
if($(".loceditBtn").length){
$(".loceditBtn").on("click",function(){
$(".mobileFormWrap").addClass("active");	
$("body").addClass("overFlowhidden");
});	
}
if($(".closeBtn").length){
$(".closeBtn").on("click",function(){
$(".mobileFormWrap, .infoPopup").removeClass("active");	
$("body").removeClass("overFlowhidden");
});	
}
if($(".txtViewVehicleinfo").length){
$(".txtViewVehicleinfo").on("click",function(event){
	event.preventDefault();	
	$(this).parents(".row").find(".slideSection").toggleClass("active");
	if($(this).parents(".row").find(".slideSection").hasClass("active")){
	$(this).parents(".row").find(".txtViewVehicleinfo").text("Close Vehicle Information");
	}else{
	$(this).parents(".row").find(".txtViewVehicleinfo").text("View Vehicle Information");	
	}
});
}
if($(".slideSection .slideImg, .slideSection .slideContent").length){
$(".slideSection .slideContent").on("click",function(event){
	event.preventDefault();	
	$(this).parent().toggleClass("active");
	if($(this).parent().hasClass("active")){
	$(this).parents(".row").find(".txtViewVehicleinfo").text("Close Vehicle Information");
	}else{
	$(this).parents(".row").find(".txtViewVehicleinfo").text("View Vehicle Information");	
	}
});	
	}
	
	if($(".VehicleinfoIcon").length){
	$(".VehicleinfoIcon").on("click",function(event){
		event.preventDefault();	
$(".infoPopup").addClass("active");	
$("body").addClass("overFlowhidden");
});	
	}
	
	if($(".infoIcondes").length){
$(".infoIcondes").on("click",function(e){
e.preventDefault();	
$(this).parents(".btncaption").find(".infoSmallPopupWrap").slideToggle();	
});
	$(".smallCloseBtn").on("click",function(e){
		e.preventDefault();	
	$(this).parent().slideToggle();	
	});
}
if($(".smallCloseBtn").length){
	$(".smallCloseBtn").on("click",function(e){
		e.preventDefault();	
	$(".covidfixtbtn").hide();
	});
	}
	
	if($(".backBtnclose").length){
	$(".backBtnclose").on("click",function(e){
		e.preventDefault();	
	$(".mobileFormWrap").hide();
	});
	}
	
	
if($(".infoIcondes").length){
	$(".infoIcondes").on("click",function(e){
		e.preventDefault();	
	$(this).parents("li").find(".infoSmallPopupWrap").slideToggle();	
	});
	}
	
	if($(".securewebsitetx").length){
	$(".securewebsitetx").on("click",function(e){
		e.preventDefault();	
	$(this).parents("li").find(".infoSmallPopupsw").slideToggle();	
	});
	}
if($(".infoIcondes").length){
	$(".infoIcondes").on("click",function(e){
		e.preventDefault();	
	$(this).parents(".exitpopupform").find(".infoSmallPopupWrap").slideToggle();	
	});
	}
	
	if($(".infoIcondes").length){
	$(".infoIcondes").on("click",function(e){
		e.preventDefault();	
	$(this).parents(".pickupsec, .drop-offsec").find(".infoSmallPopupWrap").slideToggle("fast", function() {
    // Animation complete.
  });	
	});
	}
	if($(".infoIcondes").length){
	$(".infoIcondes").on("click",function(e){
		e.preventDefault();	
	$(this).parents(".infopopupwrapbx").find(".infoSmallPopupWrap").slideToggle();	
	});
	}
	
 if($(".infoIcondespop").length){
	$(".infoIcondespop").on("click",function(e){
		e.preventDefault();	
	$(this).parents(".infopopupwrapbx").find(".infoSmallPopupWrap").slideToggle();	
	});
	}
	
	
	 if($(".txtViewVideo").length){
	$(".txtViewVideo").on("click",function(e){
		e.preventDefault();
		var videourl = $(this).attr("href");
$(".videopopupModal").find("iframe").attr("src",videourl);
	});
	}
	
	if($(".close").length){
	$(".close").on("click",function(e){
		e.preventDefault();		
$(".videopopupModal").find("iframe").attr("src","");
	});
	}
	
		if($(".divDealOfTheDayTRow").length){
$(window).scroll(function(){
      if ($(this).scrollTop() > 135) {
          $('.divDealOfTheDayTRow').addClass('fixed');
      } else {
          $('.divDealOfTheDayTRow').removeClass('fixed');
      }
  });
}
$(".bookbuttonscroll").click(function() {
    		$('html, body').animate({
       		 	scrollTop: $("#ContactInfoId").offset().top
    			}, 2000);
			
    		});
						
						$(".bookbuttonscrollB").click(function() {
    		$('html, body').animate({
       		 	scrollBottom: $("#ContactInfoId").offset().bottom
    			}, 500);
			
    		});
	
	
	if($(".divButtonTRow").length){
$(window).scroll(function(){
      if ($(this).scrollTop() > 135) {
          $('.divButtonTRow').addClass('fixed');
      } else {
          $('.divButtonTRow').removeClass('fixed');
      }
  });
}
	
/*if($(".datepicker").length){
	 $( ".datepicker" ).datepicker({
		  minDate: 0		 
	 });
	}*/		
if($(".timeList").length){
	$(".timeList input").on("click", function(){
	if($(this).hasClass("active")){
	$(this).removeClass("active");	
	$(this).next().slideUp();	
	}else{
	$(this).addClass("active");	
	$(this).next().slideDown();		
	}
	});
	}	
	
	if($(".showFormLink").length){
	
	$(".showFormLink").on("click", function(e){
	e.preventDefault();
	var targetLink	= $(this).attr("href");
	$(".showHideForm").removeClass("active");		
	$(targetLink).addClass("active");	
	});
	}
	
if($(".ddlList").length){
$(".ddlList li").on("click",function(){
	var inputText = $(this).text();
	$(this).parents(".timeList").find("input").val(inputText);
	$(this).siblings().removeClass("selected");
	$(this).addClass("selected");
	$(this).parent().slideUp();
	$(".timeList input").removeClass("active");
	});
}
$(document).bind('mousedown touchstart', function(e) {
			//if (ww < 767) {
				if ($(e.target).closest('.ddlList').length === 0) {
					$(".timeList input").removeClass("active");
	$(".ddlList").slideUp();
				}
			//}
		});		
		
});
$(window).resize(function() {
	checkWindow();	
		if($(".mobileFilterWrap").length){	
filterCheckBox();
}
});
})(jQuery);
function checkWindow(){
	if($(window).width() > 767){
		$("body").removeClass("mobile").addClass("desktop");
		//$(".searchFromWrap").insertBefore("#banner .col-sm-7").removeClass("mobileShow cf");	
	}
	else {
		$("body").removeClass("desktop").addClass("mobile");	
		//$(".searchFromWrap").insertAfter("#banner").addClass("mobileShow cf");
	}
	if($(window).width() > 767 && $(window).width() < 1024){
		$("body").addClass("ipad");	
	}
	else {
		$("body").removeClass("ipad");	
	}
}
function tabActive(){
	if($(window).width() > 767){
				
		setTimeout(function(){
		$(".commentNav.DivMobileSizeHide li:first .contetnTabsBtn").trigger("click");
		},500);
	}
	else {
		
		
		setTimeout(function(){
		$(".commentNav.MobileSizeshow li:first .contetnTabsBtn").trigger("click");
		},500);
	}
	}
          
 function filterCheckBox(){
if($(".mobileFilterWrap").length){
	if($(window).width() < 768){
		$(".vehicle_list").appendTo(".mobileFilterWrap .filterWrap");
		}else{
		$(".vehicle_list").appendTo(".vehicle-type-section");	
			}
	}	
	
} 
function cloneDiv(){
if($("#mega-menu-top").length){
$(".welcomText").clone().appendTo("#mega-menu-top").addClass("mobileShow mega-align-bottom-left mega-menu-flyout").removeAttr("id");
$("#mega-menu-top .welcomText a").addClass("mega-menu-link");
$("#mega-menu-top .welcomText").insertBefore("#mega-menu-top > li:first-child");
if($(".logoutBtn").length){
$(".logoutBtn").clone().appendTo("#mega-menu-top").addClass("mobileShow mega-align-bottom-left mega-menu-flyout").removeAttr("id");
$("#mega-menu-top .logoutBtn a").addClass("mega-menu-link");
}
if($(".logoutBtn").length){
$(".signInBtn").clone().appendTo("#mega-menu-top").addClass("mobileShow mega-align-bottom-left mega-menu-flyout").removeAttr("id");
$("#mega-menu-top .signInBtn a").addClass("mega-menu-link");
}
}	
}        
             
         
	