<!-- TA -->
<div class="mbottom30 TA_box">
    <div id="TA_selfserveprop869" class="TA_selfserveprop">
        <ul id="nIy5GW" class="TA_links mzjWpb">
            <li id="njsYKpl5CGUI" class="HvAhA1TDlL"><a target="_blank" href="https://www.tripadvisor.com/Attraction_Review-g294212-d4006739-Reviews-The_Trippest_Mini_Group_Tours-Beijing.html"><img src="https://www.tripadvisor.com/img/cdsi/img2/branding/v2/Tripadvisor_lockup_horizontal_secondary_registered-11900-2.svg" alt="TripAdvisor" width="150px" /></a></li>
        </ul>
    </div>
    <script async src="https://www.jscache.com/wejs?wtype=selfserveprop&amp;uniq=869&amp;locationId=4006739&amp;lang=en_US&amp;rating=true&amp;nreviews=4&amp;writereviewlink=true&amp;popIdx=true&amp;iswide=true&amp;border=true&amp;display_version=2" data-loadtrk onload="this.loadtrk=true"></script>
</div>
<!-- TA -->
<a id="inquirybutton"></a>
<div class="inquirybutton"><a href="#inquirybutton">Check Availability</a></div>

<div class="tmbottom margin-top80">
    <div>
        <div class="contactwechat"><img src="https://data.chinahighlights.com/image/daytrip/tpcode.jpg" alt="china highlights' wechat code" height="100px" style="opacity: 0; transition: opacity 0.5s ease-in-out 0s;" width="100px" />

            <div class="wechatinfo">For any questions please contact us via <br/> Mobile: <span class="wechatred">+86 18807734970</span><br/> WeChat: <span class="wechatred">trippest666</span><br/> Email: <span class="wechatred">niko@trippest.com</span></div>
        </div>

        <div class="pricefrom">Price from <strong>USD <?php echo $showPrice ?> </strong> p/p</div>

        <form action="" id="myform" method="post" name="myform">
            <input type="hidden" value="<?php echo $PagDetail->PAG_SN ?>" name="PAG_SN">
            <input type="hidden" value="<?php echo $PagDetail->PAG_Code ?>" name="PAG_Code">
            <input type="hidden" value="<?php echo $ic_title ?>" name="PAG_Name">
            <input type="hidden" value="<?php echo $PAG_SourceType ?>" name="destination">
            <input type="hidden" value="<?php echo $t_Type ?>" name="tType" id="tType">
            <div class="InquiryBox dayInquiry">
                <p><input autocomplete="off" class="hasDatepicker" id="Starting_Date" name="Starting_Date" placeholder="Your travel date" readonly="readonly" type="text" value="" /></p>
                <?php if (count($t_package) > 1) { ?>
                    <P>
                        <select name="Package" id="Package" class="fullwidth">
                            <?php
                            $num = count($t_package);
                            for ($i = 0; $i < $num; $i++) {
                                $arr_Item = explode(",", $t_package[$i]);
                                if ($i == 0) {
                                    $p_Value = "";
                                    $p_text = $arr_Item[0];
                                } else {
                                    $p_Value = $t_package[$i];
                                    $p_text = $arr_Item[0];
                                }
                            ?>
                                <option value="<?php echo $p_Value ?>"><?php echo $p_text ?></option>
                            <?php } ?>
                        </select>
                    </P>
                <?php } ?>

                <?php if (count($PagList) > 0) { ?>
                    <P>
                        <select name="PagList" id="PagList" class="fullwidth">
                            <option value="">Transfer Type</option>
                            <?php
                            foreach ($PagList as $PlRs) {
                                $Pl_name = $PlRs->PAG2_Name;
                                $Pl_value = $PlRs->PAG_SN . "|" . $PlRs->PAG_Code . "|" . $PlRs->PAG2_Attraction . "|" . $PlRs->PAG2_Name;
                            ?>
                                <option value="<?php echo $Pl_value ?>"><?php echo $Pl_name ?></option>
                            <?php } ?>
                        </select>
                    </P>
                <?php }
                if ($t_Type == "transfer") { ?>
                    <P>
                        <select name="Adults_Num" id="Adults_Num" class="fullwidth">
                            <option selected>No. of Travelers</option>

                            <option value="1">1</option>

                            <option value="2">2</option>

                            <option value="3">3</option>

                            <option value="4">4</option>

                            <option value="5">5</option>

                            <option value="6">6</option>

                            <option value="7">7</option>

                            <option value="8">8</option>

                            <option value="9">9</option>

                            <option value="10">10</option>

                            <option value="11">11</option>

                            <option value="12">12</option>

                            <option value="13">13</option>

                            <option value="14">14</option>

                            <option value="15">15</option>

                            <option value="16">16</option>

                            <option value="17">17</option>

                            <option value="18">18</option>

                            <option value="19">19</option>

                            <option value="20">20</option>

                        </select>
                    </P>
                <?php } else { ?>
                    <p>
                        <select name="Adults_Num" id="Adults_Num">
                            <option selected>Adult (age 12+)</option>
                            <option value="1">1</option>
                            <option value="2">2</option>
                            <option value="3">3</option>
                            <option value="4">4</option>
                            <option value="5">5</option>
                            <option value="6">6</option>
                            <option value="7">7</option>
                            <option value="8">8</option>
                            <option value="9">9</option>
                            <option value="10">10</option>
                            <option value="11">11</option>
                            <option value="12">12</option>
                            <option value="13">13</option>
                            <option value="14">14</option>
                            <option value="15">15</option>
                            <option value="16">16</option>
                            <option value="17">17</option>
                            <option value="18">18</option>
                            <option value="19">19</option>
                            <option value="20">20</option>
                        </select>
                        <select id="Child_Num" name="Child_Num">
                            <option selected="selected" value="0">Child (age 2-11)</option>
                            <option value="1">1</option>
                            <option value="2">2</option>
                            <option value="3">3</option>
                            <option value="4">4</option>
                            <option value="5">5</option>
                            <option value="6">6</option>
                            <option value="7">7</option>
                            <option value="8">8</option>
                            <option value="9">9</option>
                            <option value="10">10</option>
                            <option value="11">11</option>
                            <option value="12">12</option>
                            <option value="13">13</option>
                            <option value="14">14</option>
                            <option value="15">15</option>
                            <option value="16">16</option>
                            <option value="17">17</option>
                            <option value="18">18</option>
                            <option value="19">19</option>
                            <option value="20">20</option>
                        </select>
                    </p>
                <?php } ?>
                <div class="clear"> </div>
                <button class="sendButton" id="btn_submit" name="btn_submit" type="button">Book Now <i aria-hidden="true" class="fa fa-angle-right"></i></button>
            </div>
        </form>
    </div>
</div>
<link type="text/css" rel="stylesheet" href="https://proxy-data.chinahighlights.com/css/tour-detail-former.css">
<style type="text/css">.red{ color: #a31022} .tourDatesBJ .red{ margin-right: 10px; color: #a31022} ul.note, ul.tours-list, ol{ padding: 10px 0; display: table; margin: 0 15px;} ul.note li, ul.tours-list li{ background: url(https://data.chinahighlights.com/pic/guide/info-page-list-bg.png) no-repeat 0 .5em; list-style: none; font-size: 20px; margin-bottom: 10px; padding-left: 20px; line-height: 25px; background-size: 6px;} ol{ margin-bottom: 20px;} ol li{ font-size: 20px; margin-bottom: 10px; line-height: 25px;} .daytrips-list{ position: relative; margin-bottom: 25px; border: solid 1px #d8d8d8; border-radius: 4px;} .daytrips-title{ background: #f7f7f7; border-radius: 4px; padding: 15px; padding-right: 45px; font-size: 22px; font-family: 'Goudy Old Style'; font-weight: 600; position: relative; cursor: pointer} .daytrips-title p{ margin-bottom: 0;} .daytrips-title i.fa{ display: none;} .daytrips-title::after{ content: "+"; color: #a31022; font-family: Arial, "sans-serif"; font-size: 24px; position: absolute; top: 15px; right: 5px; width: 24px; height: 24px;} .daytrips-title .red{ margin-right: 10px;} .daytrips-title:hover{ color: #a31022;} .daytrips-list.active .daytrips-title{ border-radius: 4px 4px 0 0;} .daytrips-list.active .daytrips-title::after{ content: "--"; letter-spacing: -3px;} .daytrips-info{ display: none;} .daytrips-list.active .daytrips-info{ padding: 20px 25px; display: block} .daytrips-info img{ border-radius: 4px;} #expandAll{ margin-top: -30px;} .dayimg-txt{ display: block; font-size: 15px; margin-top: 5px; font-style: italic; color: #777;} .dayimg-txt{ font-size: 18px; color: #999; display: block; border-left: 3px solid #b8b8b8; padding-left: 15px; margin-top: 10px; line-height: 18px; margin-bottom: 30px;} .pricecludes{ margin-bottom: 70px;} .pricecludes h3:first-child{ padding-top: 0} .pricecludes ul{ padding: 10px 0; display: table; margin: 0 15px} .pricecludes li{ position: relative; list-style: none; font-size: 20px; margin-bottom: 10px; padding-left: 30px; line-height: 25px;} .pricecludes li::before{ content: ""; left: 3px; top: 0px; font-size: 18px; position: absolute;} .price-includes li::before{ content: "✔"; color: #029B0B;} .price-exclude li::before{ content: "✘"; color: #a31022;} .pricefrom{ margin-bottom: 20px;} .faqs-list{ position: relative;} .faqs-title{ background: #fff; border-radius: 4px; padding: 15px 45px 15px 0; border-bottom: solid 1px #eee; font-size: 24px; font-family: 'Goudy Old Style'; margin-top: 0; font-weight: bold; cursor: pointer} .faqs-info{ display: none;} .faqs-list.active .faqs-info{ padding: 20px 0; display: block} .faqs-title::after{ content: "+"; color: #a31022; font-family: Arial, "sans-serif"; font-size: 24px; position: absolute; top: 15px; right: 5px; width: 24px; height: 24px;} .faqs-list.active .faqs-title::after{ content: "--"; letter-spacing: -3px;} .margin-top80{ margin-top: 80px;} .price-form{ margin: 25px 30px 15px 30px; border-left: dashed 1px #ccc; padding-left: 30px;} .form-list{ position: relative; padding-bottom: 25px; line-height: 42px; min-height: 42px;} .form-list:last-child{ padding-bottom: 0; margin-bottom: -10px;} .form-list i{ position: absolute; left: -50px; top: 0px; font-size: 20px; width: 40px; height: 40px; line-height: 40px; background: #fff; text-align: center;} .form-list:last-child i{ font-size: 24px; width: 42px; height: 42px; line-height: 42px;} .red-price{ color: #a31022; font-size: 24px;} button{ border: medium none;} button.btn-red{ font-size: 18px; padding: 0px 12px; display: block; width: 100%; text-align: center;} .dayInquiry{ padding: 0 40px;} .InquiryBox input{ border-radius: 4px; width: 100%; padding-left: 15px; background-color: #fff;} .dayInquiry select{ background-color: #fff; border-radius: 4px; color: #333; font-size: 18px; height: 47px; line-height: 47px; margin-left: -5px; padding: 0; border: 1px solid #d1d1d1; margin-top: -1px; width: calc(50% - 5px); margin-right: 10px; box-shadow: 0 0 0px #fff; padding-left: 15px;} .dayInquiry select:last-child{ margin-right: 0;} .hasDatepicker{ background: url(https://data.chinahighlights.com/pic/top10/tour-calendar.png) no-repeat 98% center;} #CDSWIDSSP{ width: 100% !important; z-index: 0;} .fullwidth{width: 100% !important;} .wechatinfo {padding: 0px !important;} .sendButton{cursor: pointer;} #CDSWIDSSP .widSSPClickWrap{width: 0px !important; height: 0px !important;} .tmbottom{padding-bottom: 90px !important;}.contactwechat {width: 480px;}.contactwechat img{margin-right: 20px}@media (max-width: 750px){.daytrips-box,.faqs-list  {padding:0 15px} .daytrips-box p,.faqs-list p{padding: 0 0px 20px 0px} .table-responsive { margin: 0 15px}ol {margin: 0 15px 0 35px;}.TA_box {margin:0 15px}.pricecludes{padding: 15px 0;}.wechatinfo {font-size: 20px; font-weight: normal; text-align: left; } .contactwechat{ width: auto;}}
</style>
<script src="https://data.chinahighlights.com/js/min.php?f=/js/train-mobile/zepto.min.js,/js/flatpickr-4.6.1.min.js"></script>
<script>
    $(function() {
        $(".daytrips-box .daytrips-list").children("div.daytrips-title").click(function() {
            if ($(this).parent("div.daytrips-list").hasClass("active")) {
                $(this).parent("div.daytrips-list").removeClass("active");
                $(this).find("i").removeClass("fa-angle-up");
                $(this).find("i").addClass("fa-angle-down");
            } else {
                $(this).parent("div.daytrips-list").addClass("active");
                $(this).find("i").removeClass("fa-angle-down");
                $(this).find("i").addClass("fa-angle-up");
            }
        });

        $("#expandAll").click(function() {
            if ($("#expandAll .expandAllText").html() == "Close All") {
                $(".daytrips-box .daytrips-list").removeClass("active");
                $(".daytrips-box .daytrips-list").children("div.daytrips-title").find("i").removeClass("fa-angle-up");
                $(".daytrips-box .daytrips-list").children("div.daytrips-title").find("i").addClass("fa-angle-down");
                $("#expandAll .expandAllText").html("Open All");
            } else {
                $(".daytrips-box .daytrips-list").addClass("active");
                $(".daytrips-box .daytrips-list").children("div.daytrips-title").find("i").removeClass("fa-angle-down");
                $(".daytrips-box .daytrips-list").children("div.daytrips-title").find("i").addClass("fa-angle-up");
                $("#expandAll .expandAllText").html("Close All");
            }

        });

        $(".faqs-list").children("div.faqs-title").click(function() {
            if ($(this).parent("div.faqs-list").hasClass("active")) {
                $(this).parent("div.faqs-list").removeClass("active");
                $(this).find("i").removeClass("fa-angle-up");
                $(this).find("i").addClass("fa-angle-down");
            } else {
                $(this).parent("div.faqs-list").addClass("active");
                $(this).find("i").removeClass("fa-angle-down");
                $(this).find("i").addClass("fa-angle-up");
            }
        });


        var t_excludedate = '<?php echo $t_excludedate ?>';
        var t_includedate = '<?php echo $t_includedate ?>';
        var t_excludemonth = '<?php echo $t_excludemonth ?>';
        var t_PAG_Scheme = '<?php echo $PAG_Scheme ?>';

        function dateFilter(_date, _u) {
            var date_w = _date.getDay(); //星期
            var date_d = _date.getDate(); //月份日期
            var date_m = _date.getMonth(); //月份
            var date_y = _date.getFullYear(); //年份

            var excludedate = t_excludedate.replace(/-+/g, "/").split(",");
            var includedate = t_includedate.replace(/-+/g, "/").split(",");
            var excludemonth = t_excludemonth;
            var my_filter_date = _date.toLocaleDateString();

            if (includedate.indexOf(my_filter_date) !== -1) {
                return false;
            }

            if (excludedate.indexOf(my_filter_date) !== -1) {
                return true;
            }

            if (excludemonth.indexOf(Number(date_m) + 1) !== -1) {
                return true;
            }


            var PAG_Scheme = t_PAG_Scheme;
            if (date_w == 0) {
                date_w = 7
            };
            if (PAG_Scheme == "") {
                return false;
            } else if (PAG_Scheme.indexOf(date_w) != -1) {
                return false;
            } else {
                return true;
            }


        }


        //日期
        flatpickr("#Starting_Date", {
            altFormat: "F j, Y",
            dateFormat: "Y-m-d",
            disable: [function(date) {
                return dateFilter(date);
            }],

            minDate: new Date().fp_incr(3),
            maxDate: new Date().fp_incr(540),
            defaultDate: new Date().fp_incr(3)
        });

        //日期结束

        $("#btn_submit").click(function(e) {
            if (CheckSubmit()) {
                var tType = $("#tType").val();
                var postUrl = "";
                if (tType == "gg") {
                    postUrl = "https://www.chinahighlights.com/forms/destination-form-gg.asp";
                } else if (tType == "transfer") {
                    postUrl = "https://www.chinahighlights.com/forms/destination-form-transfer.asp";
                } else {
                    postUrl = "https://www.chinahighlights.com/forms/destination-form-general.asp";
                }
                $("#myform").attr("action", postUrl);
                $("#myform").submit();
            } else {
                return false;
            }
        });

    })

    function CheckSubmit(){
	
        if ($("#Starting_Date").val()==""){
            alert("Please select the travel date.");
            $("#Starting_Date").focus();
            return false;
        }
        
        if (isNaN($("#Adults_Num").val())){
            alert("Need an adults at least.");
            $("#Adults_Num").focus();
            return false;	
        }
        
        if ($("#Package").length>0) {
            if ($("#Package").val()==""){			
                alert("Please select "+$("#Package option:first").html());
                $("#Package").focus();
                return false;
            }
            
        }

        var LimitPerson = '<?php echo $t_limitperson ?>';
        if (parseInt(LimitPerson)>1){
            if (parseInt(LimitPerson) > parseInt($("#Adults_Num").val())){
                alert("Sorry but this tour requires at least "+LimitPerson+" adults.");
                $("#Adults_Num").focus();
                return false;	
            }
        }else{
            var LimitP = $("input[name='PAG_Code']").val();
            if (LimitP=="BJSIC-44" || LimitP=="CDSIC-6" || LimitP=="ZJJALC-10" || LimitP=="ZJJALC-09"){
                if ($("#Adults_Num").val()=="1"){
                    alert("Sorry but this tour requires at least 2 adults.");
                    $("#Adults_Num").focus();
                    return false;	
                }
            }
            
        }

        
        if ($("#PagList").length>0){
            if ($("#PagList").val()==""){
                alert("Please select "+$("#PagList option:first").html());
                $("#PagList").focus();
                return false;	
            }
            
        }
        

        return true;	
            
    }
</script>