403Webshell
Server IP : 103.234.187.230  /  Your IP : 216.73.216.216
Web Server : Apache
System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/b2c.hellogtx.com/public/upload/veeklick/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/b2c.hellogtx.com/public/upload/veeklick/js/common-mansih.js
$(document).ready(function() {
    $('#partmanish').owlCarousel({
            loop: true,
            nav: true,
            margin: 10,
            responsiveClass: true,
            responsive: {
                0: {
                    items: 1,
                    dots: true,
                    nav: false
                },
                600: {
                    items: 1,
                    dots: true,
                    nav: false
                },
                1000: {
                    items: 2,
                    nav: true,
                    loop: false
                }
            }
    });
});

$('form').attr('autocomplete', 'off');
            $('input').attr('autocomplete', 'off');
            $(function() {
                $('.flightsearch').disableAutoFill();
            });


            function onSignIn(googleUser) {
                var profile = googleUser.getBasicProfile();

                var familyname = profile.getFamilyName();
                var name = profile.getName();
                var image = profile.getImageUrl();
                var email = profile.getEmail();
                var gid = profile.getId();

                $.ajax({
                    type: "POST",
                    url: "<?php echo $baseUrl; ?>customer/loginwith-google",
                    // dataType: 'html',
                    data: {
                        name: name,
                        email: email,
                    },
                    success: function(data) {
                        console.log(data);

                    }
                });


            }


            function signOut() {
                var auth2 = gapi.auth2.getAuthInstance();
                auth2.signOut().then(function() {
                    console.log('User signed out.');
                });
            }

            $(document).on('click', '.ViewDetails', function() {
                var TraceId = $(this).attr('data');
                var journeyType = $(this).attr('journeyType');
                $('#myModalViewDetails').modal('show');
                $.ajax({
                    type: "POST",
                    url: "<?php echo $baseUrl; ?>flight/view-details",
                    dataType: 'html',
                    data: {
                        TraceId: TraceId,
                        journeyType: journeyType,
                    },
                    beforeSend: function() {
                        $("#ViewDetailsLoad").html('<div style="text-align:center;padding-top:30px;"><img src="<?php echo $baseUrl; ?>public/images/loader.gif"/></div>');
                    },
                    success: function(data) {
                        //                                    console.log(data);
                        $("#ViewDetailsLoad").html(data);
                    }
                });

            });

            

            $(document).ready(function() {
                $('.flightsearch').on('submit', function(event) {
                    var paxHtm = $('#mobilecls').html();
                    $('#modalPaxvalues').html(paxHtm);
                    var source = $('.flightsearch input[name="source"]').val();
                    var mytrip_city_from = $('.flightsearch input[name="mytrip_city_from"]').val();
                    var mytrip_city_to = $('.flightsearch input[name="mytrip_city_to"]').val();
                    var destination = $('.flightsearch input[name="destination"]').val();
                    var source_city = $('.flightsearch input[name="source_city"]').val();
                    var destination_city = $('.flightsearch input[name="destination_city"]').val();
                    // alert(destination);
                    if (mytrip_city_from === '') {
                        alert('Please enter from city name');
                        $('input[name="mytrip_city_from"]').focus();
                        return false;
                    } else if (mytrip_city_to === '') {
                        alert('Please enter to city name');
                        $('input[name="mytrip_city_to"]').focus();
                        return false;
                    } else if (source === '') {
                        alert('Please enter from city name');
                        $('input[name="source"]').focus();
                        return false;
                    } else if (destination === '') {
                        alert('Please enter to city name');
                        $('input[name="destination"]').focus();
                        return false;
                    } else if (source_city === '') {
                        alert('Please enter valif from city name');
                        $('input[name="source"]').focus();
                        return false;
                    } else if (destination_city === '') {
                        alert('Please enter valif to city name');
                        $('input[name="destination"]').focus();
                        return false;
                    } else if (mytrip_city_from == mytrip_city_to) {
                        alert('Source and destination can not be same');
                        return false;
                    }

                });

                setTimeout(function() {


                    $('.select2').select2();

                    $.getJSON(SITEURL + 'flight/getsetcity', function(source) {

                        $(".airport_search").autocomplete({
                            minLength: 0,
                            autoFocus: true,
                            source: function(request, response) {
                                var term = $.ui.autocomplete.escapeRegex(request.term),
                                    startsWithMatcher = new RegExp("^" + term, "i"),
                                    startsWith = $.grep(source, function(value) {
                                        return startsWithMatcher.test(value.AirportCode || value.value || value);
                                    }),
                                    containsMatcher = new RegExp(term, "i"),
                                    contains = $.grep(source, function(value) {
                                        return $.inArray(value, startsWith) < 0 &&
                                            containsMatcher.test(value.label || value.value || value);
                                    });

                                response(startsWith.concat(contains).slice(0, 10));
                            },
                            response: function(e) {
                                //console.log(e);
                            },

                            select: function(event, ui) {
                                var index = $(this).attr('index');
                                var value = ui.item.value;

                                var dddd = value.split(',');
                                ui.item.value = dddd[0] + ' (' + ui.item.AirportCode + ')';
                                //alert(dddd[0]);
                                $('.apendn_' + index).val(dddd[0]);
                                $('.fromText_' + index).html(dddd[1]);
                                $('#mytrip_city_' + index).val(dddd[1]);
                                $('#FromToCIty_' + index).val(value);
                                $('#airport_search_' + index).val(ui.item.AirportCode);
                                $('#ContSysId_' + index).val(ui.item.ContSysId);
                                $(this).removeClass('extend_width');
                                $("#bannerslider").removeClass("ss");
                                $(".search-box").removeClass("extend_width2");
                                // $(".formullist").removeClass("extend_width_list");
                                // $(".flight-search-flight1").removeClass("extend_width_list");
                                $(".flight-search-flight2").removeClass("extend_width2");
                                $(".apendn_2").removeClass("showsecond");
                                $(".formtitlecls").removeClass("showsecond");
                                $(".formullist").removeClass("ss");
                                // $(".srch_form").removeClass("ss");
                                // $(".search-form-box").removeClass("extend_width");
                                // $(".formullist").removeClass("extend_width");
                                // $(".searchf1").removeClass("extend_width_input");
                                // $(".formtitlecls").removeClass("extend_width_formtitlecls");
                                $(".frmclose").removeClass("extend_width_frmclose");
                                // $(".ui-front").removeClass("extend_width_ui-front");
                                // $(".ui-front .ui-menu-item").removeClass("extend_width_ui-front_list");
                                // $(".formtitlecls").removeClass("extend_width_formtitlecls");
                                // $(".search-form-box").removeClass("extend_width_home-srch");
                                // $(".exchange_transfer").removeClass("frmhidesection");
                                $(".custom-nav").removeClass("frmhidesection");

                            }
                        }).focus(function() {
                            $(this).val('');
                            // debugger;
                            $(this).addClass("extend_width");
                            $("#bannerslider").addClass("ss");
                            $(".search-box").addClass("extend_width2");
                            // $(".formullist").addClass("extend_width_list");
                            // $(".flight-search-flight1").addClass("extend_width_list");
                            $(".flight-search-flight2").addClass("extend_width2");
                            $(".apendn_2").addClass("showsecond");
                            $(".formtitlecls").addClass("showsecond");
                            $(".formullist").addClass("ss");
                            // $(".srch_form").addClass("ss");
                            // $(".search-form-box").addClass("extend_width");
                            // $(".formullist").addClass("extend_width");
                            // $(".flight-search-flight1").addClass("extend_width_list");
                            // $(".searchf1").addClass("extend_width_input");
                            // $(".formtitlecls").addClass("extend_width_formtitlecls");
                            $(".frmclose").addClass("extend_width_frmclose");
                            // $(".ui-front").addClass("extend_width_ui-front");
                            // $(".ui-front .ui-menu-item").addClass("extend_width_ui-front_list");
                            // $(".formtitlecls").addClass("extend_width_formtitlecls");
                            // $(".search-form-box").addClass("extend_width_home-srch");
                            // $(".exchange_transfer").addClass("frmhidesection");
                            $(".custom-nav").addClass("frmhidesection");
                            // alert('manish');
                            $('html, body').animate({

                                scrollTop: $("#bannerslider").offset().top - 460
                            }, 200);


                            $(this).autocomplete('search');
                        });

                    });
                }, 1000);



                $('.frmclose').click(function() {
                    $(".frmclose").removeClass("extend_width_frmclose");
                    $("#mytrip_city_from").removeClass("extend_width");
                    $("#mytrip_city_to").removeClass("extend_width");
                    $("#bannerslider").removeClass("ss");
                    $(".search-box").removeClass("extend_width2");
                    $(".flight-search-flight2").removeClass("extend_width2");
                    $(".apendn_2").removeClass("showsecond");
                    $(".formtitlecls").removeClass("showsecond");
                    $(".formullist").removeClass("ss");
                    $(".custom-nav").removeClass("frmhidesection");


                });

                // $('.apendn_1').keyup(function(e) {
                //     var valofrom = $(this).val();
                //    if(valofrom.length >= 3){
                //         $('#sourcesjd').hide();
                //    }else{
                //     $('#sourcesjd').show();
                //    }
                // });

                // $('.apendn_2').keyup(function(e) {
                //     var valofrom = $(this).val();
                //    if(valofrom.length >= 3){
                //         $('#destinjd').hide();
                //    }else{
                //     $('#destinjd').show();
                //    }
                // });


                $('.frmclose').click(function() {

                    $('.flight-search-flight1').removeClass('mobile-as1');
                    $('.flight-search-flight2').removeClass('mobile-as1');
                    $('section.search-form-box').removeClass('mobile-asfrm');
                    $('.blackbar').removeClass('mobile_head1');
                    $('.custom-nav').removeClass('mobile_head1');
                    $('.frmclose').removeClass('frmcloseshow');
                });









                $("#from, #to").datepicker({
                    //defaultDate: "+1w",
                    changeMonth: false,
                    dateFormat: "d M yy",
                    numberOfMonths: 2,
                    minDate: 0,
                    buttonImage: true,
                    buttonImageOnly: true,
                    beforeShow: function() {
                        if (this.id == 'to') {
                            // debugger;
                            var dateMin = $('#from').datepicker("getDate");
                            var TodateMin = $('#to').datepicker("getDate");
                            if (TodateMin === null) {
                                TodateMin = dateMin;
                            }

                            var rMin = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 0); // Min Date = Selected + 1d
                            var rMax = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 180); // Max Date = Selected + 62d
                            var c_out_date = new Date(TodateMin.getFullYear(), TodateMin.getMonth(), TodateMin.getDate()); // Min Date = Selected + 1d
                            $('#to').datepicker("option", "minDate", rMin);
                            $('#to').datepicker("option", "maxDate", rMax);
                            $('#to').datepicker("setDate", c_out_date);
                            $('#RoundTrip').prop('checked', true);
                        }
                    },
                    onSelect: function(selectedDate, inst) {
                        var tripType = $('.tripType:checked').val(); // retrieve the value
                        if (this.id == 'from') {
                            var dateMin = $('#from').datepicker("getDate");

                            var rMin = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 0); // Min Date = Selected + 1d
                            var rMax = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 180); // Max Date = Selected + 62d
                            var c_out_date = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 0); // Min Date = Selected + 1d
                            var theDate = new Date(Date.parse($(this).datepicker('getDate')));
                            var dateFormatted = $.datepicker.formatDate('DD', theDate);
                            var FromFormatted = $.datepicker.formatDate('dd/mm/yy', theDate);
                            $('.Departure').html(dateFormatted);
                            $('#departure_date').val(FromFormatted);
                            if (parseInt(tripType) === 2) {
                                $('#to').datepicker("option", "minDate", rMin);
                                $('#to').datepicker("option", "maxDate", rMax);

                                $('#to').datepicker("setDate", c_out_date);
                                $('.Return').html(dateFormatted);

                            }
                            //                            console.log(c_out_date);

                            ///$('#to').focus();return false;
                        } else {
                            var dateMin = $('#to').datepicker("getDate");
                            var c_out_date = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 0);
                            var theDate = new Date(Date.parse(c_out_date));
                            var dateFormatted = $.datepicker.formatDate('DD', theDate);
                            var ToFormatted = $.datepicker.formatDate('dd/mm/yy', theDate);
                            $('.Return').html(dateFormatted);
                            $('#return_date').val(ToFormatted);
                            //                            console.log(ToFormatted);
                        }


                    }
                });
                var tripType = $('.SelectClass:checked').val();
                var htmlval = $('#optionsRadios' + tripType).attr('data'); // retrieve the html value
                $('.TravellersClass').html(htmlval);
                $(document).on('click', '.onewayflight', function() {
                    var index = $(this).attr('index');
                    $('div.SingleSelect').removeClass("mobile_roundflight_active");
                    $('#SingleSelect_' + index).addClass("mobile_roundflight_active");
                });
                $(document).on('click', '.twowayflight', function() {
                    var index = $(this).attr('index');
                    $('div.roundSelect').removeClass("mobile_roundflight_active");
                    $('#roundSelect_' + index).addClass("mobile_roundflight_active");
                });
                $(document).on('click', '.tripType', function() {

                    var tripType = $(this).val();
                    var from = $('#from').val();
                    if (tripType == 2) {

                        $('#to').val(from);
                        var dateMin = $('#from').datepicker("getDate");
                        var c_out_date = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 0);
                        var theDate = new Date(Date.parse(c_out_date));
                        var dateFormatted = $.datepicker.formatDate('DD', theDate);
                        var ToFormatted = $.datepicker.formatDate('dd/mm/yy', theDate);
                        $('.Return').html(dateFormatted);
                        $('#return_date').val(ToFormatted);
                        $("#to").removeAttr("readonly", "readonly");
                        $("#to").removeClass("disabledcls");
                    } else {
                        $('#to').val('');
                        $('.Return').html('');
                        $('#return_date').val('');
                        $("#to").attr("readonly", "readonly");
                        $("#to").addClass("disabledcls");
                    }

                });


                $(document).on('click', '.tripTypeRound', function() {
                    $("#to").removeClass("disabledcls"); //  debugger;
                    $("#to").datepicker("show");
                    $("#RoundTrip").prop('checked', true);
                });

                $(".SelectClass") // select the radio by its id
                    .change(function() { // bind a function to the change event
                        if ($(this).is(":checked")) { // check if the radio is checked
                            var val = $(this).val(); // retrieve the value
                            var htmlval = $(this).attr('data'); // retrieve the html value
                            $('.TravellersClass').html(htmlval);
                        }
                    });

                function openSearch() {
                    document.getElementById("mySidenavsearch").style.width = "100%";
                }

                function closeSearch() {
                    document.getElementById("mySidenavsearch").style.width = "0";
                }

                $('.exchange_transfer,.exchange_transfer_searchflight').on('click', function() {
                    var mytrip_city_from = $('#mytrip_city_from').val();
                    var mytrip_city_to = $('#mytrip_city_to').val();
                    $('#mytrip_city_from').val(mytrip_city_to);
                    $('#mytrip_city_to').val(mytrip_city_from);

                    var fromText_1 = $('.fromText_1').text();
                    var fromText_2 = $('.fromText_2').text();
                    $('.fromText_1').html(fromText_2);
                    $('.fromText_2').html(fromText_1);

                    var airport_search_1 = $('#airport_search_1').val();
                    var airport_search_2 = $('#airport_search_2').val();
                    $('#airport_search_1').val(airport_search_2);
                    $('#airport_search_2').val(airport_search_1);

                    var ContSysId_1 = $('#ContSysId_1').val();
                    var ContSysId_2 = $('#ContSysId_2').val();
                    $('#ContSysId_1').val(ContSysId_2);
                    $('#ContSysId_2').val(ContSysId_1);

                    var FromToCIty_1 = $('#FromToCIty_1').val();
                    var FromToCIty_2 = $('#FromToCIty_2').val();
                    $('#FromToCIty_1').val(FromToCIty_2);
                    $('#FromToCIty_2').val(FromToCIty_1);

                    var mytrip_city_1 = $('#mytrip_city_1').val();
                    var mytrip_city_2 = $('#mytrip_city_2').val();
                    $('#mytrip_city_1').val(mytrip_city_2);
                    $('#mytrip_city_2').val(mytrip_city_1);
                });
            });

            function SetPaxData() {

                if ($('#modalPaxvalues').length > 0) {
                    // debugger;
                    $('#modalPaxvalues').html('');
                    var paxHtm = $('#mobilecls').html();


                    $('#modalPaxvalues').html(paxHtm);

                    $('#mobilecls').html('');


                    $('#mobilecls').show();
                    //alert("Adult 3: "+$('input[name="adults"]').val());
                }


            }


            


           


            $(document).ready(function() {

                $('.sorting').click(function() {
                    $(this).children('i').toggleClass('icon-angle-up icon-angle-down');
                });

                $('.sortingRound').click(function() {
                    $(this).children('i').toggleClass('icon-angle-up icon-angle-down');
                });



                $("#datepicker, #datepicker_return").datepicker({
                    //defaultDate: "+1w",
                    changeMonth: false,
                    dateFormat: "d M yy",
                    numberOfMonths: 2,
                    minDate: 0,
                    buttonImage: true,
                    buttonImageOnly: true,
                    beforeShow: function() {
                        if (this.id == 'datepicker') {
                            var dateMin = $('#datepicker').datepicker("getDate");
                            var TodateMin = $('#datepicker_return').datepicker("getDate");

                            var rMin = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 0); // Min Date = Selected + 1d
                            var rMax = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 180); // Max Date = Selected + 62d
                            var c_out_date = new Date(TodateMin.getFullYear(), TodateMin.getMonth(), TodateMin.getDate()); // Min Date = Selected + 1d
                            $('#datepicker_return').datepicker("option", "minDate", rMin);
                            $('#datepicker_return').datepicker("option", "maxDate", rMax);
                            $('#datepicker_return').datepicker("setDate", c_out_date);
                        }
                    },
                    onSelect: function(selectedDate, inst) {
                        var tripType = $('.tripType:checked').val(); // retrieve the value
                        if (this.id == 'datepicker') {
                            var dateMin = $('#datepicker').datepicker("getDate");

                            var rMin = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 0); // Min Date = Selected + 1d
                            var rMax = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 180); // Max Date = Selected + 62d
                            var c_out_date = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 0); // Min Date = Selected + 1d
                            var theDate = new Date(Date.parse($(this).datepicker('getDate')));
                            var dateFormatted = $.datepicker.formatDate('DD', theDate);
                            var FromFormatted = $.datepicker.formatDate('dd/mm/yy', theDate);
                            $('.Departure').html(dateFormatted);
                            $('#departure_date').val(FromFormatted);
                            if (parseInt(tripType) === 2) {
                                $('#datepicker_return').datepicker("option", "minDate", rMin);
                                $('#datepicker_return').datepicker("option", "maxDate", rMax);

                                $('#datepicker_return').datepicker("setDate", c_out_date);
                                $('.date-parent').html(dateFormatted);

                            }
                            //                            console.log(c_out_date);

                            ///$('#to').focus();return false;
                        } else {
                            var dateMin = $('#datepicker_return').datepicker("getDate");
                            var c_out_date = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 0);
                            var theDate = new Date(Date.parse(c_out_date));
                            var dateFormatted = $.datepicker.formatDate('DD', theDate);
                            var ToFormatted = $.datepicker.formatDate('dd/mm/yy', theDate);
                            $('.date-parent').html(dateFormatted);
                            $('#return_date').val(ToFormatted);
                            //                            console.log(ToFormatted);
                        }


                    }
                });
                var tripType = $('.SelectClass:checked').val();
                var htmlval = $('#optionsRadios' + tripType).attr('data'); // retrieve the html value
                $('.TravellersClass').html(htmlval);
                $(document).on('click', '.onewayflight', function() {
                    var index = $(this).attr('index');
                    $('div.SingleSelect').removeClass("mobile_roundflight_active");
                    $('#SingleSelect_' + index).addClass("mobile_roundflight_active");
                });
                $(document).on('click', '.twowayflight', function() {
                    var index = $(this).attr('index');
                    $('div.roundSelect').removeClass("mobile_roundflight_active");
                    $('#roundSelect_' + index).addClass("mobile_roundflight_active");
                });




                // $(document).ready(function(){
                //     $('.down_count-cls1').click(function(e){
                //         var button_classes, value = +$('.counter1').val();
                //         button_classes = $(e.currentTarget).prop('class');
                //         if(button_classes.indexOf('up_count') !== -1){
                //             value = (value) + 1;
                //         } else {
                //             value = (value) - 1;
                //         }
                //         value = value < 1 ? 1 : value;
                //         $('.counter1').val(value);
                //     });
                //     $('.counter1, .counter2, .counter3').click(function(){
                //         $(this).focus().select();
                //     });
                // });

                // $(document).ready(function(){
                //     $('.down_count-cls2').click(function(e){
                //         var button_classes, value = +$('.counter2').val();
                //         button_classes = $(e.currentTarget).prop('class');
                //         if(button_classes.indexOf('up_count') !== -1){
                //             value = (value) + 1;
                //         } else {
                //             value = (value) - 1;
                //         }
                //         value = value < 0 ? 0 : value;
                //         $('.counter2').val(value);
                //     });
                //     $('.counter2').click(function(){
                //         $(this).focus().select();
                //     });
                // });

                // $(document).ready(function(){
                //     $('.down_count-cls3').click(function(e){
                //         var button_classes, value = +$('.counter3').val();
                //         button_classes = $(e.currentTarget).prop('class');
                //         if(button_classes.indexOf('up_count') !== -1){
                //             value = (value) + 1;
                //         } else {
                //             value = (value) - 1;
                //         }
                //         value = value < 0 ? 0 : value;
                //         $('.counter3').val(value);
                //     });
                //     $('.counter3').click(function(){
                //         $(this).focus().select();
                //     });
                // });



                $('.ddSpinnerPlus').click(function() {
                    //var totalpass = $('.TotalTravellers').html();
                    var adult = $('.counter1').val();
                    var child = $('.counter2').val();
                    var totalpass = parseInt(adult) + parseInt(child);
                    if (totalpass < 9) {
                        if ($(this).prev().val() < 9) {
                            $(this).prev().val(+$(this).prev().val() + 1);
                            $('.counter1').val(+$(this).prev().val());
                            $('.counter1').attr('value', +$(this).prev().val());
                        }
                        SumTravellers();
                    } else {
                        alert('Total Passanger (Adult and Child) Can not be more than 9');
                    }
                });

                $('.ddSpinnerMinus').click(function() {
                    var infants = $('#infants').val();
                    var adult = $(this).next().val();
                    if (infants > 1) {
                        if (parseInt(infants) >= adult) {
                            $('#infants').val(infants - 1)
                        }
                    }

                    if ($('#adults').val() > 1) {
                        $(this).next().val(+$(this).next().val() - 1);
                        $('.counter1').val(+$(this).next().val());
                        $('.counter1').attr('value', +$(this).next().val());
                        $('.counter-int').attr('value', +$(this).next().val());
                    }
                    SumTravellers();
                });

                $('.chSpinnerPlus').click(function() {
                    var adult = $('.counter1').val();
                    var child = $('.counter2').val();
                    var totalpass = parseInt(adult) + parseInt(child);
                    if (totalpass < 9) {
                        if ($(this).prev().val() < 9) {
                            $(this).prev().val(+$(this).prev().val() + 1);
                            $('.counter2').val(+$(this).prev().val());
                            $('.counter2').attr('value', +$(this).prev().val());
                        }
                        SumTravellers();
                    } else {
                        alert('Total Passanger (Adult and Child) Can not be more than 9');
                    }
                });

                $('.chSpinnerMinus').click(function() {

                    //alert($(this).val());
                    if ($(this).next().val() > 0) {
                        if ($(this).next().val() > 0)
                            $(this).next().val(+$(this).next().val() - 1);
                        $('.counter2').val(+$(this).next().val());
                        $('.counter2').attr('value', +$(this).next().val());
                    }
                    SumTravellers();
                });

                $('.infSpinnerPlus').click(function() {
                    // var adult = $('.counter1').val();

                    var adults = $('#adults').val();

                    if (parseInt(adults) <= parseInt($(this).prev().val())) {
                        alert('Number of infant can not be greater than adult');
                        return false;
                    } else {
                        $(this).prev().val(+$(this).prev().val() + 1);
                        $('.counter3').val(+$(this).prev().val());
                        $('.counter3').attr('value', +$(this).prev().val());
                        SumTravellers();
                    }
                });
                $('.infSpinnerMinus').click(function() {

                    if ($(this).next().val() > 0) {
                        if ($(this).next().val() > 0)
                            $(this).next().val(+$(this).next().val() - 1);
                        $('.counter3').val(+$(this).next().val());
                        $('.counter3').attr('value', +$(this).next().val());
                    }
                    SumTravellers();
                });

                function SumTravellers() {
                    var a = 0;
                    $(".quantity").each(function() {
                        a += parseInt($(this).val());
                    });
                    $('.TotalTravellers').html(a);
                    return a;
                }

                function ValidateInfant() {
                    var a = 0;
                    $(".quantity").each(function() {
                        a += parseInt($(this).val());
                    });
                    $('.TotalTravellers').html(a);
                    return a;
                }


                $(".SelectClass") // select the radio by its id
                    .change(function() { // bind a function to the change event
                        if ($(this).is(":checked")) { // check if the radio is checked
                            var val = $(this).val(); // retrieve the value
                            var htmlval = $(this).attr('data'); // retrieve the html value
                            $('.TravellersClass').html(htmlval);
                        }
                    });

                $(document).mouseup(function(e) {
                    if ($(e.target).closest(".hotelrooombox_main").length ===
                        0) {
                        $(".hotelrooombox_main").hide();
                    }
                });



                function openSearch() {
                    document.getElementById("mySidenavsearch").style.width = "100%";
                }

                function closeSearch() {
                    document.getElementById("mySidenavsearch").style.width = "0";
                }

                $('.exchange_transfer,.exchange_transfer_searchflight').on('click', function() {
                    var mytrip_city_from = $('#mytrip_city_from').val();
                    var mytrip_city_to = $('#mytrip_city_to').val();
                    $('#mytrip_city_from').val(mytrip_city_to);
                    $('#mytrip_city_to').val(mytrip_city_from);

                    var fromText_1 = $('.fromText_1').text();
                    var fromText_2 = $('.fromText_2').text();
                    $('.fromText_1').html(fromText_2);
                    $('.fromText_2').html(fromText_1);

                    var airport_search_1 = $('#airport_search_1').val();
                    var airport_search_2 = $('#airport_search_2').val();
                    $('#airport_search_1').val(airport_search_2);
                    $('#airport_search_2').val(airport_search_1);

                    var ContSysId_1 = $('#ContSysId_1').val();
                    var ContSysId_2 = $('#ContSysId_2').val();
                    $('#ContSysId_1').val(ContSysId_2);
                    $('#ContSysId_2').val(ContSysId_1);

                    var FromToCIty_1 = $('#FromToCIty_1').val();
                    var FromToCIty_2 = $('#FromToCIty_2').val();
                    $('#FromToCIty_1').val(FromToCIty_2);
                    $('#FromToCIty_2').val(FromToCIty_1);

                    var mytrip_city_1 = $('#mytrip_city_1').val();
                    var mytrip_city_2 = $('#mytrip_city_2').val();
                    $('#mytrip_city_1').val(mytrip_city_2);
                    $('#mytrip_city_2').val(mytrip_city_1);
                });


            });

              // $("#car-Start_Date, #car-end-Date").datepicker({
            //     //defaultDate: "+1w",
            //     changeMonth: false,
            //     dateFormat: "d-M-yy",
            //     numberOfMonths: 2,
            //     minDate: 0,
            //     buttonImage: true,
            //     buttonImageOnly: true,
            //     beforeShow: function() {
            //         if (this.id == 'car-end-Date') {
            //             var dateMin = $('#car-Start_Date').datepicker("getDate");
            //             var TodateMin = $('#car-end-Date').datepicker("getDate");

            //             var rMin = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 0); // Min Date = Selected + 1d
            //             var rMax = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 180); // Max Date = Selected + 62d
            //             var c_out_date = new Date(TodateMin.getFullYear(), TodateMin.getMonth(), TodateMin.getDate()); // Min Date = Selected + 1d
            //             $('#car-end-Date').datepicker("option", "minDate", rMin);
            //             $('#car-end-Date').datepicker("option", "maxDate", rMax);
            //             $('#car-end-Date').datepicker("setDate", c_out_date);
            //         }
            //     },
            //     onSelect: function(selectedDate, inst) {
            //         var tripType = $('.tripType:checked').val(); // retrieve the value
            //         if (this.id == 'car-Start_Date') {
            //             var dateMin = $('#car-Start_Date').datepicker("getDate");

            //             var rMin = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 0); // Min Date = Selected + 1d
            //             var rMax = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 180); // Max Date = Selected + 62d
            //             var c_out_date = new Date(dateMin.getFullYear(), dateMin.getMonth(), dateMin.getDate() + 0); // Min Date = Selected + 1d
            //             var theDate = new Date(Date.parse($(this).datepicker('getDate')));
            //             var dateFormatted = $.datepicker.formatDate('DD', theDate);
            //             var FromFormatted = $.datepicker.formatDate('dd/mm/yy', theDate);
            //             $('.Departure').html(dateFormatted);
            //             $('#departure_date').val(FromFormatted);
            //             $('#car-end-Date').datepicker("option", "minDate", rMin);
            //             $('#car-end-Date').datepicker("option", "maxDate", rMax);

            //             $('#car-end-Date').datepicker("setDate", c_out_date);
            //             $('.Return').html(dateFormatted);
            //         }
            //     }
            // });

Youez - 2016 - github.com/yon3zu
LinuXploit