Skip to content
  • Explore
  • Wishlist
Property owners log in

Sign In

  • Explore
  • Wishlist
  • Property owners log in
Menu
  • Property owners log in

Location

Check In - Check Out

Adults

Children

  • Where are you going?
  • Search
Filters

Filters

×
Price Range
Min:
Max:

Availability

Property Type
Studio
One Bedroom
Two Bedroom
Three Bedroom
Four Bedroom
Villa
Specialised
Five Bedroom

Bedrooms
1 bedrooms
2 bedrooms
3 bedrooms
4 bedrooms
5 bedrooms

Amenities
Parking
Terrace
Pets Allowed
Elevator
Television
Air Conditioning
Laundry
Satellite Television
Sea View
Non-Smoking
DVD Player
HiFi
Washer/Dryer
Dishwasher
Children Welcome
Garden
Internet
Disabled Person's Facilities
Telephone
Swimming Pool
Parking Terrace Pets Allowed Elevator Television Air Conditioning Laundry Satellite Television Sea View Non-Smoking DVD Player HiFi Washer/Dryer Dishwasher Children Welcome Garden Internet Disabled Person's Facilities Telephone Swimming Pool

Mary's Cosy Studio

  • Norton, Zimbabwe

    Cosy studio with kitchenette in Norton

    US$ 269.00
  • Vine 1 Mount Pleasant Heights

  • Harare, Zimbabwe

    1 bed apartment in Mount Pleasant Heights

    US$ 274.00
  • Magnificent Unit 8

  • Johannesburg, South Africa

    One bed unit nestled in the prime of Sandton

    US$ 300.00
  • Villa Thabiso Twin Bed

  • Bulawayo, Zimbabwe

    Villa Thabiso twin room with pool access

    US$ 378.00
  • Villa Thabiso Standard Room

  • Bulawayo, Zimbabwe

    Standard room with a queen sized bed

    US$ 378.00
  • Cycad Lodge Double bed 1

  • Bulawayo, Zimbabwe

    Standard room in Morningside guesthouse

    US$ 378.00
  • Granite Park Double Lodge #2

  • Bulawayo, Zimbabwe

    Double Lodge in Natural African Bush

    US$ 378.00
  • Granite Park Double Lodge #4

  • Bulawayo, Zimbabwe

    Double Lodge in Natural African Bush

    US$ 378.00
  • The Comfy Private Place

  • Harare, Zimbabwe

    Welcome to our charming apartment, where the buzz of city life meets the tranquility of suburban living. This is the perfect spot for those seeking a vacation rental that combines the charm of the town with the comfort of home.

    US$ 383.00
  • Norm's Nest

  • Nyanga, Zimbabwe

    Three bedroomed house in Juliasdale

    US$ 388.00
  • Dudu's Place

  • Harare, Zimbabwe

    Cozy, Modern Retreat in the Heart of Town

    US$ 424.00
  • Five on Binton

  • Harare, Zimbabwe

    Pristine 1 bed cottage in the Northern suburbs

    US$ 427.00
  • Padombo Mount Pleasant

  • Harare, Zimbabwe

    Cosy 3 bedroom cottage

    US$ 450.00
  • Bing’s Rustic Retreat

  • Harare, Zimbabwe

    Rustic Charm in the Heart of Harare: Your Cozy Home Away From Home

    US$ 450.00
  • Lynn's Place

  • Harare, Zimbabwe

    2 bed condo in the lovely Avenues area

    US$ 465.00
  • Ashleys Guest Cottage

  • Harare, Zimbabwe

    Neat and cosy cottage with pool

    US$ 470.00
  • Villa Thabiso Deluxe

  • Bulawayo, Zimbabwe

    Villa Thabiso deluxe room with outdoor pool

    US$ 480.00
  • Olive Grove

  • Bulawayo, Zimbabwe

    Exquisite one bedroomed apartment

    US$ 492.00
  • Cycad Palm King bed 2

  • Bulawayo, Zimbabwe

    Neat one bedroom in Morningside guesthouse

    US$ 492.00
  • Pass Mews

  • Mutare, Zimbabwe

    Lovely 4 bed in Mutare

    US$ 498.00
  • 12 Fleetwood Lodge Standard Room 11

  • Harare, Zimbabwe

    A boutique lodge situated in a serene environment.

    US$ 542.00
  • Cycad Palm King bed 1

  • Bulawayo, Zimbabwe

    Luxurious guesthouse in Morningside

    US$ 564.00
  • Sky Apartments Limpopo Room 1

  • Harare, Zimbabwe

    2 bedroomed apartment with en-suite and kitchenette

    US$ 600.00
  • Sky Apartments Limpopo Room 2

  • Harare, Zimbabwe

    2 bedroomed apartment with en-suite and kitchenette

    US$ 600.00
  • Sky Apartments Gwai Room 3

  • Harare, Zimbabwe

    2 bedroomed apartment with en-suite and kitchenette

    US$ 600.00
  • Sky Apartments Gwai room 4

  • Harare, Zimbabwe

    2 bedroomed apartment with en-suite and kitchenette.

    US$ 600.00
  • Sky Apartments Gwai Room 5

  • Harare, Zimbabwe

    2 bedroomed apartment with en-suite and kitchenette.

    US$ 600.00
  • Sky Apartments Zambezi Room 7

  • Harare, Zimbabwe

    2 bedroomed apartment with en-suite and kitchenette.

    US$ 600.00
  • Sky Apartments Zambezi Room 8

  • Harare, Zimbabwe

    2 bedroomed apartment with en-suite and kitchenette

    US$ 600.00
  • Granite Park Family Lodge #3

  • Bulawayo, Zimbabwe

    Family Lodge in Natural African Bush

    US$ 600.00
  • Hwirikwiri Cottage

  • Nyanga, Zimbabwe

    Lovely 3 bed house in Juliasdale

    US$ 600.00
  • Phomolo Safari Lodge - 1 bed Chalet 1

  • Figtree, Zimbabwe

    1 bedroomed Chalet with dam view

    US$ 620.00
  • Phomolo Safari Lodge - Honeymoon

  • Bulawayo, Zimbabwe

    Thakgalo Honeymoon Suite

    US$ 698.00
  • Ten On Brooke Boutique Hotel - Standard Room 1

  • Bulawayo, Zimbabwe

    Stunning Lotshe suite

    US$ 714.00
  • Gisela 2.0

  • Cannes, France

    This is a lovely, ground floor studio apartment with a garden, in a secure and well maintained block very close to the Center of Cannes.

    € 637.32
  • Studio Green

  • Mandelieu-la-Napoule, France

    Recently re decorated studio in a well kept residence with a shared pool and open views.

    € 674.32
  • Lundi Park Guesthouse

  • Gweru, Zimbabwe

    Cozy Homestay for Groups & Travelers

    US$ 770.00
  • Cosy Room in Crondall, United Kingdom

  • Farnham, United Kingdom

    € 702.21
  • Cezanne VH

  • Cannes, France

    This is a large, light studio apartment on the first floor with a generous balcony. It is well situated directly behind the Hotel Martinez, a block from the famous Croisette and beaches of Cannes.

    € 702.32
  • Rue Antibes 117

  • Cannes, France

    This studio is situated right on the Rue d'Antibes, Cannes main shopping street and is modern and light with all mod cons

    € 714.32
  • Fauvettes Studio

  • Cannes, France

    A bright and spacious studio with a lovely terrace, in the heart of Cannes, just under a 15 min walk from the Palais des Festivals.

    € 807.32
  • Ten On Brooke Boutique Hotel - Executive 1

  • Bulawayo, Zimbabwe

    Luxurious Mangethe Suite

    US$ 942.00
  • Fleuris Purple

  • Cannes, France

    Fleuris Purple is a lovely 44m2 one bedroom, one bathroom apartment located in the centre of Cannes. Just off the Croisette and close to the beaches, it is perfect for congress attendees and holiday makers alike.

    € 841.32
  • Hoche 2 Cannes

  • Cannes, France

    The newly refurbished two bedroom, one bathroom (with separate W.C) apartment is a modern, light and airy property perfectly situated on the Rue Hoche, a pedestrian street which runs parallel to the Rue d'Antibes.

    € 870.32
  • Chataigners 3A

  • Cannes, France

    One bedroom apartment just above the main center of Cannes within an easy walk from the Palais des Festivals and the main beach strip.

    € 874.32
  • Jeanne

  • Cannes, France

    This high quality one bedroom apartment suite is perfectly situated in a very quiet street just behind the Martinez hotel. It is a calm spot, just yards from all the main attractions of Cannes, such as the Palais des Festivals, the Rue d'Antibes and the m

    € 925.32
  • Phomolo Safari Lodge - Moloko Family Lodge

  • Bulawayo, Zimbabwe

    2 bed Moloko family lodge with kitchen

    US$ 1,070.00
  • Studio Port

  • Cannes, France

    Studio port is a very well maintained and charming studio with one bathroom and open views over the port. It is ideal for those attending congresses as the Palais des Festivals is a 7 minute walk away. This light and bright studio is furnished with

    € 954.32
  • Parc Alexandre

  • Cannes, France

    Pleasant and quiet two bedroom, one bathroom apartment close to the Palm Beach area. Well located with shops only a few meters from the building and bus stop close by, to get to the center of Cannes, for those who do not appreciate walking.

    € 990.32
  • Yanai Cottage

  • Nyanga, Zimbabwe

    Lovely 3 bed Troutbeck cottage

    US$ 1,128.00
  • Fowey Villa

  • Harare, Zimbabwe

    5 bed villa in the heart of Vainona

    US$ 1,148.00
  • Velasquez Combo 1

  • Cannes, France

    A small studio in a quiet residential area, a very short walk to the Croisette beaches and the Martinez Hotel.

    € 1,038.32
  • Impasse de la Bergerie

  • Cannes, France

    This one bedroom, one bathroom apartment is excellently located just off the pedestrian Rue Meynadier in Cannes centre. It is just a few minutes walk to the beaches, the Palais des Festivals, and the famous Croisette.

    € 1,058.32
  • Golf Juan (long term rental)

  • Golfe-Juan, France

    X

    € 1,066.32
  • Panga Holiday Homes

  • Wedza, Zimbabwe

    Rustic Luxury Farm Cabin

    US$ 1,256.47
  • Little Outlook Family Room

  • Victoria Falls, Zimbabwe

    2 bed apartment with pool

    US$ 1,260.00
  • Croisette 81

  • Cannes, France

    Modern One bedroom apartment on the Boulevard de la Croisette with a beautiful sea view from the living room and the terrace.

    € 1,114.32
  • Cotton

  • Cannes, France

    This is a very nice and well kept one bedroom apartment right by the Carlton Hotel.

    € 1,119.32
  • Louis Perissol

  • Cannes, France

    This is a nice 2 bedroom, 1 bathroom apartment on the second floor of an older Cannois building (without a lift) right in the heart of the old town of Cannes, set on an attractive street typical of the area, which leads up to the Museum of Le Suquet.

    € 1,138.32
  • Main Cottage

  • Nyanga, Zimbabwe

    Victorian style cottage in Nyanga

    US$ 1,353.00
  • Pradignac 2

  • Cannes, France

    A bright and sunny two bedroom apartment on the 3rd floor of a Bourgeois building in the heart of the famous Carre d or area, the vibrant central heart of Cannes.

    € 1,206.32
  • Ferrie 12

  • Cannes, France

    Large one bedroom apartment in the heart of Cannes with an en-suite shower room and a nice terrace. Situated between the Martinez and the Carlton hotels, and just a few steps from the Croisette Beach front.

    € 1,251.32
  • Mandarines

  • Cannes, France

    This is a lovely 3 bedroom, 3 bathroom apartment, located just above the old town of Cannes, in a secure building. There is no elevator and the apartment is on the third floor. Recently renovated and redecorated, the apartment is fully equipped

    € 1,304.32
  • GlenValley Holiday Home

  • Victoria Falls, Zimbabwe

    Unwind at this stunning modern villa located in the plush Victoria Falls Estate. Morden 3 bedroomed self catering holiday home in a secure gated community in Victoria Falls’ upmarket estate. Very private, comfortable and flexible if travelling for holid

    US$ 1,500.00
  • Vautrin Top Floor

  • Cannes, France

    Two bedroom apartment in the center of Cannes, on a high floor and only a few minutes walk to the Croisette beaches and the Martinez Hotel.

    € 1,329.32
  • Palazzio One bedroom

  • Cannes, France

    One bedroom apartment in the heart of Cannes in an outstanding building a very easy walk to the Palais des Festivals and the main beach front on the Croisette.

    € 1,434.32
  • Secret Garden 302

  • Cannes, France

    Whether you are traveling for business or leisure, this apartment is ideal. This city apartment is tastefully decorated and set in a brand new building, completed in 2017.

    € 1,444.32
  • Constantin

  • Cannes, France

    This 3 bedroom, 2 bathroom apartment, right in the centre of Cannes is truly ideal for congresses and holiday rentals. Located just off the famous Rue d'Antibes shopping street and minutes from the Croisette and the Palais des Festivals.

    € 1,504.32
  • Aerodrome Guesthouse

  • Victoria Falls, Zimbabwe

    Beautiful guesthouse with pool and solar.

    US$ 1,767.00
  • Mazvikadei Villa

  • Banket, Zimbabwe

    Spacious 5 bed with spacious living area + Dam View

    US$ 1,800.00
  • Villa Romance 2

  • Cannes, France

    Two bedroom apartment with a terrace in Cannes within walking distance to the Croisette beaches and the Palais des Festivals.

    € 1,684.32
  • Mougins Village Townhouse

  • Mougins, France

    Two bedroom townhouse set in Mougins village, famous for it's Michelin star restaurants and art galleries.

    € 1,688.32
  • Highworth Apartment 6A

  • Cape Town, South Africa

    Lovely 3 bed with splash pool in Seapoint

    US$ 1,918.41
  • Bristol Park Terrace

  • Cannes, France

    Penthouse in the centre of Cannes. Two bedrooms, two bathrooms, a large terrace and views over the city of Cannes. Bristol Penthouse is located in a well kept building. The apartment is located on the fourth floor.

    € 1,710.32
  • Miombo Mews

  • Victoria Falls, Zimbabwe

    Contemporary 2 bed apartment

    US$ 2,160.00
  • Chatsworth House

  • Harare, Zimbabwe

    Contemporary, spacious guesthouse surrounded with green garden and pool in Mount Pleasant

    US$ 2,250.00
  • Old Town Chic

  • Cannes, France

    This is a fabulously modern and well decorated, two bedroom, one bathroom apartment right in the heart of the Old Town of Cannes, just a stone's throw from the Palais des Festivals, Rue St Antoine, Rue d'Antibes and all of Cannes' other great attractions.

    € 2,072.32
  • Royal Palm 218

  • Cannes, France

    Stunning two bedroom, two bathroom apartment on the sea front. Only a few minutes drive to the Palais... you can enjoy your stay in Cannes by staying in a luxurious apartment with panoramic sea views and top quality furnishings.

    € 2,623.32
  • Villa Bel Horizon

  • Cabris, France

    Beautiful two bedroom villa on the hills above the village of Cabris, within walking distance to the village.

    € 2,670.32
  • Secret Garden 3

  • Cannes, France

    Beautiful 3/4 bedroom apartment with a great terrace and only a few minutes walk to the sandy beaches in Cannes.

    € 2,862.32
  • Loft Deluxe

  • Cannes, France

    This is a 4 bedroom, 3 bathroom apartment located in the quiet area of Petit Juas whilst still only ten minutes from the Palais and Croisette. Modern interiors refurbished recently. This large apartment is located just outside the heart of Cannes and has

    € 3,006.32
  • Houseboats on Kariba - Sundowner

  • Kariba, Zimbabwe

    Houseboat with aircon and splash pool

    US$ 3,751.00
  • Velasquez Vert

  • Cannes, France

    A bright and spacious three bedroom, two bathroom apartment with a large terrace situated in central Cannes, on the 1st floor of a well kept and secure building.

    € 3,610.32
  • Casa Nova 3

  • Cannes, France

    Stunning three bedroom, three bathroom apartment in the centre of Cannes, just off Rue d'Antibes and a couple of minutes from the Palais, the epitome of luxury.

    € 4,287.32
  • Villa des Collines

  • Pégomas, France

    Spacious 4 bedroom villa with a pool and amazing open views, set on a hill above the lovely village of Pegomas in the south of France.

    € 5,519.32
  • Villa Esterel Mer

  • Theoule-sur-mer, France

    Panoramic sea view villa with a pool on the ancient red rock hills of Theoule sur Mer, a nice sea front drive to Cannes and surrounding towns.

    € 6,315.32
  • Villa du Ruisseau

  • Cannes, France

    This modern villa is a unique and luxurious space to spend a holiday or to visit Cannes on business. Villa du Ruisseau has five bedrooms and plenty of space to entertain or relax including a gorgeous garden with a swimming pool and jacuzzi.

    € 7,450.32
  • Pre Suquet

  • Cannes, France

    Two bedroom apartment in the heart of Cannes, an easy walk to the beaches and the Palais des Festivals.

    € 8,268.32
  • Helping you find your next stay

    UK Office

    • 10 Harvey Road
    • Redhill, Surrey
    • RHI4EA

    Zimbabwe Office

    • 4 York Road
    • Greendale, Harare
    Facebook-f Linkedin Instagram

    Quick links

    • Explore
    • Wishlist

    Save time, save money!

    • Sign up and we'll send the best deals to you
    * indicates required
    • Privacy Policy
    • Terms & Conditions
    Copyright © 2025 All rights reserved.

    Location

    Check In - Check Out

    Adults

    Children

    Sign in
    Sign Up
    Sign in

    [ultimatemember form_id=”332″]

    Sign Up

    [ultimatemember form_id=”331″]

    or connect with

    [TheChamp-Login]
    				
    					<?php
    
    /**
     * View for individual listing
     *
     * @param [List of objects] $data
     * @return void
     */
    function display_single_listing()
    {
        $current_url = $_GET['id'];
        $type_home = $_GET['type'];
        $get_currency = isset($_GET['currency']) ? $_GET['currency'] : YB_DEFAULT_CURRENCY;
        //$domain = "https://yourbookng.com/wordpress/images/amenities/";
    
        //$properties = array();
    
        //die($property_detail_call);
        //die("Listing " . json_encode($data->result->properties->property));
    
        // foreach($data as $listing){
        //     if($listing->pid == $current_url){
    
    
        //Is the property in the wishlist
        $user_id = apply_filters('determine_current_user', false);
        wp_set_current_user($user_id);
    
        $user_id = get_current_user_id();
    
        $get_properties_in_wishlist = get_user_meta($user_id, YB_SESSION . $user_id, true) ?: array();//die(json_encode($get_properties_in_wishlist));
        $property_in_wishlist = in_array($current_url, $get_properties_in_wishlist);
    
        //Availability calendar data
        //$api_aval_dates = YB_AVAILABILITY . '&pid=' . $current_url . '&start=' . date("Y-m-d") . '&month=' . 12;
        $available_dates = ApiCalls::apiCall(YB_AVAILABILITY . '&pid=' . $current_url . '&start=' . date("Y-m-d") . '&months=' . 12);
    
        $availability_dates = $minimum_stays_per_given_dates = array();
    
        //echo "Available day " . $api_aval_dates . "<br>" . json_encode($available_dates->result->days->day[0]);
    
        foreach ($available_dates->result->days->day as $day) {
            //sdie("Date available " . json_encode($day->avail));
            if ($day->avail == "1" && $day->booked == "0.0") {
                $date_aval = (array) $day->date;
                array_push($availability_dates, $date_aval[0]);
                array_push($minimum_stays_per_given_dates, $day->min_days);
                //die("Availability " . json_encode($date_aval));
            }
        }
    
        //Run an API call to get the min number of guests
        $get_min_guests = ApiCalls::apiCall(YB_PROPERTY_DETAILS . '&pid=' . $current_url);
        $min_guest_per_property = $get_min_guests->result->properties->property->sleeps->min;
        $checkout_date_given = !empty($type_home) ? $minimum_stays_per_given_dates[0] : 1;
    
        $checkout_date = date('Y-m-d', strtotime($availability_dates[0] . ' + '. $minimum_stays_per_given_dates[0].' days'));
        
        $property_detail_call = YB_PROPERTY_DETAILS . '&pid=' . $current_url . '&arrival_date=' . $availability_dates[0] . '&departure_date=' . $checkout_date . '&guests=' . $min_guest_per_property;
        $data = ApiCalls::apiCall($property_detail_call);
        //die("Start date " . $availability_dates[0] . " End date " . $availability_dates[1] . " Data is ". json_encode($data->result->properties->property));
        $listing = $data->result->properties->property;
    
        //die("Availability " . json_encode($availability_dates));
        wp_enqueue_script('additional-js', plugins_url('calendar.js', __FILE__));
        wp_localize_script('additional-js', 'availability_dates', $availability_dates);
        //die("Available dates " . json_encode($availability_dates));
        /*if(!empty($availability_data)){
                    foreach($availability_data as $aval_data){
                        if($aval_data->pid == $current_url){
                            $availability_dates = array();
                            foreach($aval_data->dates->date as $date){
                                
                                $dates = (array)$date;
                                $availability_date = array($dates["@attributes"]["value"]);
                                $availability_dates = array_merge($availability_dates, $availability_date);
    
                            }
                            wp_enqueue_script( 'additional-js', plugins_url('calendar.js', __FILE__) );
                            wp_localize_script( 'additional-js', 'availability_dates', $availability_dates );
                            break;
                        }
                    }
                }*/
        //End availability calendar
    
    ?>
    
        <div class="azp_element azp-element-azp-zvmeb6m1tr azp_row_section azp_row_section-default azp_row_section-15-gap pad-top-50">
            <div class="azp_container">
                <div class="azp_row azp_row-wrap">
                    <div class="azp_element azp-element-azp-c1r6whtz4ki azp_col azp-col-66 list-single-main-wrapper">
                        <div></div>
                        <div class="azp_element lheadinfo azp-element-azp-ww8wcqb4j8">
                            <div class="lsingle-block-boxex lheadinfo-block">
                                <div class="lheadinfo-top-left">
    
                                </div>
                                <div class="lheadinfo-left-bot fl-wrap">
    
                                </div>
                            </div>
                        </div>
    
                        <!-- code ye slider -->
                        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.css"/>
    
                        <div class="azp_element lslider azp-element-azp-t5s8f37xyr authplan-hide-false">
    
                        <div class="yb_main_section">
                                <div class="yb_left_section">
                                <section id="image-carousel" class="splide" aria-label="Beautiful Images">
                                <div class="splide__track">
                                    <ul class="splide__list">
                                        <?php $img_default_size = YB_IMAGE_QUALITY; $track_image = 1; foreach($listing->images->image as $image): if($track_image < 30): ?>
                                        <li class="splide__slide">
                                        <img class="splide__list_img" src="<?= ($image->url_large) ? $image->url_large : $image->url_large; ?>">
                                        </li>
                                        <?php endif; $track_image++; endforeach; ?>
                                    </ul>
                                </div>
                                </section>
                        <section id="yb_property_gallery">
    
    
    
    
    
    
    
    
    
    
    
    
                            <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@splidejs/splide@4.0.7/dist/css/splide-core.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@splidejs/splide@4.0.7/dist/css/splide.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@splidejs/splide@4.0.7/dist/css/themes/splide-default.min.css">
    <!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@splidejs/splide@4.0.7/dist/css/themes/splide-sea-green.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@splidejs/splide@4.0.7/dist/css/themes/splide-skyblue.min.css"> -->
        <style type="text/css">
    #thumb .splide__list {
    /* 
    on small screens thumbs get cut off
    how to fix?
    */
    justify-content: center;
    }
    .popup_btn{
        width: 100%;
        background-color: #1f2d48 !important;
        color: #ffffff !important;
        font-size: 14px;
        font-family: 'Galano Bold';
        border-color: #1f2d48;
        margin-bottom: 20px;
    }
    .button-bar {
    padding: 2rem;
    background: #fff;
    border-top: 1px solid gray;
    position: fixed;
    bottom: 0 !important;
    width: 100vw;
    left:0;
    display: none;
    }
    .input_popups{
        border: 1px solid gray !important;
        margin-top: 10px;
        margin-right: 10px;
        border-radius: 5px !important;
    }
    .wrapper {
    max-width: 1200px;
    margin: 0 auto;
    }
    .splide__pagination__page{display: none;}
    
    .splide__list_img {
    width: 100%;
    object-fit: contain !important;
    
    }
    .yb_min_stay {color: red !important;}
    #thumb .splide__slide {
    opacity: 0.3;
    }
    
    #thumb .splide__slide.is-active {
    opacity: 1;
    }
    
    .wrapper{
        display: flex;
        flex-direction: row;
    }
    
    .splide___thumbnail{
        display: flex;
        flex-direction: column;
    }
    .checkincheckout_popup{
        display: flex;
        justify-content: space-between;
        margin-top:20px;
    }   
    .checkin-dates-popup{
        width: 49%;
        
    }
    /* .yb_mobile_view{
        display: none !important;
    } */
    .yb_guest_max_num,.yb_guest_max_num{
        display: flex;
        justify-content: space-between;
    }
        </style>
    
    <!-- 
    <div class="wrapper">
    <div class="splide " id="gallery">
        <div class="splide__track">
        <ul class="splide__list">
        <?php $img_default_size = YB_IMAGE_QUALITY; $track_image = 1; foreach($listing->images->image as $image): if($track_image < 9): ?>
            <li class="splide__slide">
            <img class="splide__list_img" src="<?= ($image->url_large) ? $image->url_large : $image->url_large; ?>">
            </li>
            <?php endif; $track_image++; endforeach; ?>
        </ul>
        </div>
    </div>
    <div id="thumb" class="splide">
        <div class="splide__track">
        <ul class="splide__list splide___thumbnail">
        <?php $track_image = 1; foreach($listing->images->image as $image): if($track_image < 9): ?>
            <li class="splide__slide">
            <img class="splide__list_img" src="<?= ($image->url_large) ? $image->url_large : $image->url_large; ?>">
            </li>
            <?php endif; $track_image++; endforeach; ?>
        </ul>
        </div>
    </div>
    </div> -->
    
        <script src="https://cdn.jsdelivr.net/npm/@splidejs/splide@4.0.7/dist/js/splide.min.js"></script>
    
    
        <script type="text/javascript">
            // import Splide from "https://cdn.skypack.dev/@splidejs/splide@3.6.12";
            document.addEventListener( 'DOMContentLoaded', function () {
                new Splide( '#image-carousel' ).mount();
                new Splide( '#image-carousel' ).mount();
                document.addEventListener( 'DOMContentLoaded', function () {
            new Splide( '#image-carousel', {
                heightRatio: 0.5,
            } ).mount();
            } );
    } );
    
    // var gallery = new Splide("#gallery", {
    //   rewind: true,
    //   pagination: false
    // });
    
    // var thumb = new Splide("#thumb", {
    //   fixedWidth: 64,
    //   fixedHeight: 64,
    //   gap: 10,
    //   rewind: true,
    //   pagination: false,
    //   //focus: 'center',
    //   arrows: false,
    //   isNavigation: true
    // });
    
    // gallery.sync(thumb);
    // gallery.mount();
    
    
        </script>
    
    
    
    
    
    
    
    
    
    
    
                                    </section>
    
                                    <!-- <script src="https://cdn.jsdelivr.net/npm/swiper/swiper-bundle.min.js"></script> -->
    
    <!-- Initialize Swiper -->
    <!-- <script>
    var swiper = new Swiper(".mySwiper", {
        navigation: {
        nextEl: ".swiper-button-next",
        prevEl: ".swiper-button-prev",
        },
    });
    </script> -->
    
                                    <section>
    
                                        <div class="leftsection">
                                        <div class="property_title_header yb_mobile_view">
                                                            <div class="property_title">
                                                                <h1 class="lhead-title"><?= $listing->name ?></h1>
                                                                <!-- <div class="geodir-category-location dis-flex-wrap">
                                                                    <a href="https://www.google.com/maps/search/?api=1&query=<?= $listing->coords ?>">
                                                                        <li class="fas fa-map-marker-alt"></li>
                                                                        <?= $listing->address; ?>
                                                                    </a>
                                                                </div> -->
                                                            </div>
    
                                                        </div>
                                            <h3 id="yb_overview_title">Overview</h3>
                                            <div id=yb_property_description>
                                                <?php 
                                                    $real_text = breakLongText($listing->description->long, 400);
    
                                                    foreach($real_text as $text){
                                                        echo $text . "<br><br>";
                                                ?>
    
                                                <?php
                                                    }
                                                ?>
                                            </div>
    
                                            <div class="amenities">
                                                <div class="amenity">
                                                    <div>
                                                        <h3>Popular Amenities</h3>
                                                    </div>
                                                    <div class="amenities_details">
                                                        <div id="amenity">
                                                            <?php $track = 1;
                                                            foreach ($listing->amenities->amenity as $amenity) : ?>
                                                                <?php if ($track == 3) : echo "</tr><tr>";
                                                                    $track = 1;
                                                                endif; ?>
                                                                <div class="single_amenity">
                                                                    <img src="<?= YB_AMENITY_ROOT . strtolower(str_replace(array(' ', '/'), '-', $amenity->name)) . '.png' ?>" width="30" height="30" alt="<?= $amenity->name ?>">
                                                                    <span><?= $amenity->name ?></span>
                                                                </div>
                                                            <?php $track++;
                                                            endforeach; ?>
                                                        </div>
                                                    </div>
                                                </div>
    
                                            </div>
    
                                    </section>
    
                                    <section>
                                        <div style="width:100%">
                                            <div>
                                                <?php
                                                $cords = explode(',', $listing->coords);
                                                //echo $cords[0] . " " . $cords[1];
                                                ?>
                                                <div id="map22"></div>
                                            </div>
                                        </div>
                                    </section>
    
    
                                    <h3>Availability Calendar</h3>
                                    <div id='calendar'></div>
                                    <div class="yb-listing-summary">
                                        <div class="available_calendar"></div>
                                        Available
                                    </div>
                                    <div class="yb-listing-summary">
                                        <div class="unavailable_calendar"></div>
                                        Unavailable
                                    </div>
                                    <!-- Calendar End -->
                                    <?php if (!empty($listing->feedback->entry)) : ?>
    
                                        <!-- Feedback Start -->
                                        <div class="yb_review_title_section">
                                            <div class="yb_review_title">
                                                <h3>Clients' thoughts on <?= $listing->name ?> </h3>
                                            </div>
                                            <svg style="display: none">
                                                <symbol id="icon-bubble" viewBox="0 0 32 32">
                                                    <title>speech bubble</title>
                                                    <path class="path1" d="M16 2c8.837 0 16 5.82 16 13s-7.163 13-16 13c-0.849 0-1.682-0.054-2.495-0.158-3.437 3.437-7.539 4.053-11.505 4.144v-0.841c2.142-1.049 4-2.961 4-5.145 0-0.305-0.024-0.604-0.068-0.897-3.619-2.383-5.932-6.024-5.932-10.103 0-7.18 7.163-13 16-13z"></path>
                                                </symbol>
                                            </svg>
                                        </div>
    
    
                                        <div class="yb_reviews">
                                            <?php foreach ($listing->feedback->entry as $feed) : ?>
                                                <div class="yb_single_review">
                                                    <div class="yb_user_info">
                                                        <div class="yb_user_icon">
                                                            <img src="https://secure.gravatar.com/avatar/bb90dcb0ceabfc8bf10c550f1ee95ee7?s=48&d=mm&r=g">
                                                        </div>
                                                        <div class="nameanddate">
                                                            <span class="yb_user_name"><?= $feed->author ?></span>
                                                            <time datetime="2016-05-12T12:00" class="c-article-tile__date" itemprop="datePublished">
                                                                <?= $feed->stay ?>
                                                            </time>
                                                        </div>
                                                    </div>
                                                    <div class="review_stars">
                                                        <!-- <?php foreach ($listing->feedback->entry as $listing_var) : ?>
                                                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" width="15">
                                                                <path d="M381.2 150.3L524.9 171.5C536.8 173.2 546.8 181.6 550.6 193.1C554.4 204.7 551.3 217.3 542.7 225.9L438.5 328.1L463.1 474.7C465.1 486.7 460.2 498.9 450.2 506C440.3 513.1 427.2 514 416.5 508.3L288.1 439.8L159.8 508.3C149 514 135.9 513.1 126 506C116.1 498.9 111.1 486.7 113.2 474.7L137.8 328.1L33.58 225.9C24.97 217.3 21.91 204.7 25.69 193.1C29.46 181.6 39.43 173.2 51.42 171.5L195 150.3L259.4 17.97C264.7 6.954 275.9-.0391 288.1-.0391C300.4-.0391 311.6 6.954 316.9 17.97L381.2 150.3z" />
                                                            </svg>
                                                        <?php endforeach; ?> -->
                                                        ( <?= count($listing->feedback->entry) ?> reviews)
                                                    </div>
    
                                                    <div class="c-article-tile__body">
                                                        <p class="c-article-tile__title" itemprop="headline">
                                                            <?= $feed->feedback ?>
                                                        </p>
                                                    </div>
                                                </div>
                                            <?php endforeach; ?>
    
                                        </div>
    
                                    <?php endif; ?>
                                </div>
                                <div class="yb_right_section parent-sticky">
                                    <div class="yb inner titlesticky">
                                        <div class="yb_top_right">
                                                <div class="yb_title_section">
                                                        <div class="property_title_header">
                                                            <div class="property_title">
                                                                <h1 class="lhead-title"><?= $listing->name ?></h1>
                                                                <!-- <div class="geodir-category-location dis-flex-wrap">
                                                                    <a href="https://www.google.com/maps/search/?api=1&query=<?= $listing->coords ?>">
                                                                        <li class="fas fa-map-marker-alt"></li>
                                                                        <?= $listing->address; ?>
                                                                    </a>
                                                                </div> -->
                                                            </div>
                                                            <div class="property_annemities">
                                                                <div class="yb_3buttons">
                                                                    <span class="spanshare">
                                                                        <li class="fas fa-share"></li>
                                                                    </span>
                                                                
                                                                    <span class="spanwishlist">
                                                                        <?php if($property_in_wishlist){ ?>
                                                                            <i class="fas fa-heart yb_wishlist" data-pid="<?= $listing->pid ?>" data-method="remove"  id="remove_from_wishlist"></i>
                                                                        <?php }else {?>
                                                                            <li class="far fa-heart yb_wishlist" data-pid="<?= $listing->pid ?>" data-method="add" id="yb_wishlist"></li>
                                                                        <?php } ?>
                                                                    </span>
                                                                </div>
                                                                <div class="yb_socialshare">
                                                                    <a href="https://www.facebook.com/sharer/sharer.php?u=<?= YB_MAIN_DOMAIN . "/property/?id=" . $current_url; ?>" target="_blank" class="yb_fbshare yb_default_fontcolor">
                                                                        <i class="fab fa-facebook-f"></i>
                                                                    </a>
                                                                    
                                                                    <a href="https://api.whatsapp.com/send?text=<?= YB_MAIN_DOMAIN . "/property/?id=" . $current_url; ?>" target="_blank"  class="yb_fbshare yb_default_fontcolor">
                                                                        <i class="fab fa-whatsapp"></i>
                                                                    </a>
    
                                                                    <a href="<?= YB_MAIN_DOMAIN . "/property/?id=" . $current_url; ?>" class="yb_fbshare yb_default_fontcolor">
                                                                        <i class="fab fa-linkedin-in"></i>
                                                                    </a>
    
                                                                    <a href="mailto:?&subject=&body=<?= YB_MAIN_DOMAIN . "/property/?id=" . $current_url; ?>"target="_blank"  class="yb_fbshare yb_default_fontcolor">
                                                                        <i class="fas fa-envelope"></i>
                                                                    </a>
                                                                </div>
                                                            </div>
                                                        </div>
    
                                                        <section class="top_amenities_list">
                                                            <div class="yb_top_amenities">
                                                                <div class="yb_appartment">
                                                                    <span class="yb_appartment_icon"><i aria-hidden="true" class="fas fa-house-user yb_default_fontcolor"></i></span>
                                                                    <span class="yb_appartment_name yb_default_textsize yb_bold_text yb_default_textcolor"><?= $listing->property_type->name?></span>
                                                                </div>
                                                                <div class="yb_bedroom">
                                                                    <span class="yb_bedroom_icon"><i aria-hidden="true" class="fas fa-couch yb_default_fontcolor"></i></span>
                                                                    <span class="yb_bedroom_number yb_default_textsize yb_bold_text yb_default_textcolor"><?= $listing->bedrooms ?> Bedrooms</span>
                                                                </div>
                                                                <div class="yb_bed">
                                                                    <span class="yb_bedroom_icon"><i aria-hidden="true" class="fas fa-bed yb_default_fontcolor"></i></span>
                                                                    <span class="yb_bedroom_number yb_default_textsize yb_bold_text yb_default_textcolor"><?= $listing->beds ?> Bed</span>
                                                                </div>
                                                                <div class="yb_bath">
                                                                    <span class="yb_bedroom_icon"><i aria-hidden="true" class="fas fa-shower yb_default_fontcolor"></i></span>
                                                                    <span class="yb_bedroom_number yb_default_textsize yb_bold_text yb_default_textcolor"><?= $listing->baths ?> Bathroom</span>
                                                                </div>
                                                            </div>
                                                        </section>
    
                                                        <section>
                                                            <div class="review_stars">
                                                                <?php if($listing->feedback->entry > 0){ foreach ($listing->feedback->entry as $listing_var) : ?>
                                                                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" width="15">
                                                                        <path d="M381.2 150.3L524.9 171.5C536.8 173.2 546.8 181.6 550.6 193.1C554.4 204.7 551.3 217.3 542.7 225.9L438.5 328.1L463.1 474.7C465.1 486.7 460.2 498.9 450.2 506C440.3 513.1 427.2 514 416.5 508.3L288.1 439.8L159.8 508.3C149 514 135.9 513.1 126 506C116.1 498.9 111.1 486.7 113.2 474.7L137.8 328.1L33.58 225.9C24.97 217.3 21.91 204.7 25.69 193.1C29.46 181.6 39.43 173.2 51.42 171.5L195 150.3L259.4 17.97C264.7 6.954 275.9-.0391 288.1-.0391C300.4-.0391 311.6 6.954 316.9 17.97L381.2 150.3z" />
                                                                    </svg>
                                                                <?php endforeach; ?>
                                                                ( <?= count($listing->feedback->entry) ?> reviews) <?php } ?>
                                                            </div>
                            
                                                        </section>
                                                </div>
                                                <form class="reservation">
                                                    <?php
                                                    $currency = $get_currency;
                                                    $price =  $listing->price->$get_currency;
                                                    $min_stay = $minimum_stays_per_given_dates[0];
    
                                                    //$price_per_night = !empty($checkout) ? ($price / $min_stay) : $price;
    
                                                    $price_per_night = $price;
    
                                                    //$new_date = date('Y-m-d', strtotime($availability_dates[0] . ' + '. $minimum_stays_per_given_dates[0].' days'));
    
                                                    // $date = strtotime("+" . $listing->sleeps->min . " day", $availability_dates[0]);
                                                    // echo date('M d, Y', $date);
    
                                                    //$new_max_date = date('Y-m-d', strtotime($new_date . ' + 8 days'));
                                                    ?>
    
                                                    <div>
                                                        <label>Check-In</label>
                                                        <input type="date" value="<?= !empty($checkin) ? $checkin : $availability_dates[0] ?>" name="checkin" id="checkin" class="bookingDates">
                                                    </div>
                                                    <div>
                                                        <label>Check-Out</label>
                                                        <input type="date" value="<?= $checkout_date ?>" name="checkout" id="checkout" class="bookingDates">
                                                    </div>
                                                    <div>
                                                        <label>Guests</label>
                                                        <input type="number" min="1" class="bookingDates" max="<?= $listing->sleeps->max ?>" value="<?= !empty($guests) ? $guests : "1" ?>" data-max="<?= $listing->sleeps->max ?>" onkeyup="checkMax(this)" name="guests" id="guests">
                                                    </div>
                                                    <div class="yb_min_stay yb_guest_max_num">
                                                        Minimum number of stay
                                                        <span>: <?= $minimum_stays_per_given_dates[0] ?> days</span>
                                                    </div>
                                                    <div class="yb_guest_max_num">
                                                        Maximum number of guests 
                                                        <span>: <?= $listing->sleeps->max ?></span>
                                                    </div>
                                                    <div class="yb_bottom_prices">
                                                        <div class="yb_net_fee">
                                                            <span class="yb_cf_word">Accommodation Fee</span>&nbsp;
                                                            <span class="yb_cf_price">
                                                                <span id="yb_currency">
                                                                    <?= $get_currency == "gbp" ? "£" : "€"; ?> 
                                                                </span>
                                                                <span id="price" class="yb_total_bookng_price">
                                                                    <?= round($price_per_night, 2, PHP_ROUND_HALF_UP ) ?>
                                                                </span>
                                                            </span>
                                                            
                                                        </div>
                                                        
                                                    </div>
                                                    <div class="yb_price_footer">
    
                                                        <div class="yb_reser_total">
                                                            <span>Total</span>&nbsp;&nbsp;
                                                            <span class="yb_price_floatright">
                                                                <?= $get_currency == "gbp" ? "£" : "€" ?>
                                                                <span id="yb_total_bookng_price">
                                                                    <?= round($price_per_night, 2, PHP_ROUND_HALF_UP ) ?>
                                                                <span>
                                                            </span>
                                                            
                                                        </div>
                                                        <div class="yb_reserve_btn">
                                                            <button class="reserve">Reserve</button>
                                                        </div>
                                                    </div>
                                                    <input type="hidden" name="total" id="total" class="yb_total_bookng_price" value="<?= round($price_per_night, 2, PHP_ROUND_HALF_UP ) ?>">
                                                    <input type="hidden" name="pid" id="pid" value="<?= $listing->pid ?>">
                                                </form>
                                        </div>
                                        <div class="yb_contact">
                                            <h4 class="yb_contact_title">For enquries contact us</h4>
                                            <hr>
                                            <div class="yb_email">
                                                <i aria-hidden="true" class="fas fa-envelope"></i>
                                                <div class="yb_email_details">
                                                    <span class="yb_email">help@yourbookng.com</span>
                                                    <span class="yb_email_word">Email</span>
                                                </div>
                                            </div>
                                            <!-- <div class="yb_phone">
    
                                                <i aria-hidden="true" class="fas fa-phone-alt"></i>
                                                <div class="yb_email_details">
                                                    <span class="yb_phone">+44 7805 540047</span>
                                                    <span class="yb_phone_word">Phone</span>
                                                </div>
                                            </div> -->
                                        </div>
                                    </div>
    
    
                                    </div>
                                </div>                                                                
                            </div>
                    </div>
                </div>
            </div>
            <div class="button-bar">
                <div class="bottom_bar_yb" style="display:flex; justify-content:space-between">
                    <div class="yb_bottom_price">
                        <span style="font-weight: bold !important; font-size:24px !important;">
                            <?= $get_currency == "gbp" ? "£" : "€" ?>
                            <span id="yb_total_bookng_price" >
                                <?= round($price_per_night, 2, PHP_ROUND_HALF_UP ) ?>
                            <span>
                        </span>
                        <span class="yb_bookingdates" style="display: block;font-size:16px !important;">12/9/2022-18/9/2022</span>
                    </div>
                    <button class="reserve2" data-toggle="modal" data-target="#myModal">Reserve</button>
                </div>
                
            </div>
        </div>
    
        <style>
            td .fc-daygrid-day{
                height: 20px !important;
            }
        </style>
    
        <script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js" integrity="sha256-/H4YS+7aYb9kJ5OKhFYPUjSJdrtV6AeyJOtTkw6X72o=" crossorigin="anonymous"></script>
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
        <script>
            
            jQuery(function(){
                let clientHeight = jQuery('.yb_top_right').height();
            
                //console.log(clientHeight);
                jQuery('.splide__list_img').height(clientHeight);
                //console.log("ndikuclickika1");
                jQuery(".yb-social").click(function(e){
                    //console.log("ndikuclickika2");
                    jQuery('.results').css('background-color', 'red');
                });
    
            });
            function initMap2() {
                // The location of Uluru
                //console.log("1 " + <?= $cords[0] ?> + "2 " + <?= $cords[1] ?>);
                const uluru = {
                    lat: <?= $cords[0] ?>,
                    lng: <?= $cords[1] ?>
                };
                // The map, centered at Uluru
                const map = new google.maps.Map(document.getElementById("map22"), {
                    zoom: 12,
                    center: uluru,
                });
    
                const marker = new google.maps.Marker({
                    position: uluru,
                    map: map,
                });
            }
    
            function checkMax(sender) {
                var inputVar = parseInt(sender.value);
                var max = parseInt(sender.dataset.max);
    
                if (inputVar > max) {
                    sender.value = max;
                }
    
            }
    
    
            jQuery(function() {
                jQuery(".bookingDates").change(function(){
                    var checkin = jQuery("#checkin").val();
                    var checkout = jQuery("#checkout").val();
                    var guests = jQuery("#guests").val();
                    var pid = jQuery("#pid").val();
                    var currency = "<?= $get_currency ?>";
    
                    var forms = {
                        "pid": pid,
                        "checkin": checkin,
                        "checkout": checkout,
                        "guests": guests,
                        "currency": currency,
                    };
    
                    jQuery.post(window.cart.checkinDatesChanged, forms,
                        (data) => {
                            jQuery("#yb_total_bookng_price").html(data.<?= $get_currency ?>);
                            jQuery(".yb_total_bookng_price").html(data.<?= $get_currency ?>);
                            //console.log("Response back " + JSON.stringify(data));
                            //console.log("Currency back " + (data.gbp));
                        });
                });
    
                jQuery(".reserve").click(function(e) {
                    e.preventDefault();
    
                    var checkin = jQuery("#checkin").val();
                    var checkout = jQuery("#checkout").val();
                    var total = jQuery("#total").val();
                    var guests = jQuery("#guests").val();
                    var pid = jQuery("#pid").val();
    
                    var forms = {
                        "pid": pid,
                        "checkin": checkin,
                        "checkout": checkout
                    };
    
                    window.location = "<?= YB_MAIN_DOMAIN ?>/checkout?checkin=" + checkin + "&checkout=" + checkout + "&pid=" + pid + "&guests=" + guests;
    
                    // jQuery.post(window.cart.book, forms,
                    //     (data) => {
                    //         jQuery(".cart_message").css('display', 'block');
                    //         jQuery(".response").text(data);
                    //         jQuery("#cart_icon").append("<span class='cart_icon_number'>" + data + "</span>");
                    //         //console.log("Response back " + JSON.stringify(data));
                    //     });
                });
            });
        </script>
    
    <script type="text/javascript">
            jQuery(function() {
                //console.log("ndikuclickika1");
                jQuery('.yb-social').click(function(e){
                    //console.log("ndikuclickika2");
                    jQuery('.results').css('background-color', 'red');
                });
    
    
    
                jQuery(".yb_wishlist").click(function(e) {
                    e.preventDefault();
    
                    var pid = this.dataset.pid;
                    var method = this.dataset.method;
                    console.log("Inside wish");
                    console.log(method + " for " + pid);
                    var forms = {
                        "pid": pid,
                        "method": method
                    };
    
                    jQuery.post(window.cart.rest, forms,
                        (data) => {
                            location.reload();
                        });
                });
            });
        </script>
    
    
        <script async src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBws-FHg6ASqiDYvNXFNJ6ZsfnFfeOFlSE&callback=initMap2">
        </script>
        <script>
        
                jQuery(".spanshare").click(function(){
                    //console.log("elementor");
                    jQuery(".yb_socialshare").toggle();
                });
            //Calendar events
            document.addEventListener('DOMContentLoaded', function() {
                var calendarEl = document.getElementById('calendar');
    
                var post_events = [{}];
                availability_dates.forEach(appendDate);
    
                function appendDate(item) {
                    post_events.push({
                        start: item,
                        display: 'background',
                        color: '#9bdad2',
                        //title: '£345',
                    });
                }
    
                //console.log(<?= json_encode($availability_dates) ?>);
    
                var calendar = new FullCalendar.Calendar(calendarEl, {
                    headerToolbar: {
                        left: 'prev,next today',
                        center: 'title',
                        right: 'dayGridMonth,timeGridWeek,timeGridDay,listMonth'
                    },
                    initialDate: '<?= $availability_dates[0] ?>',
                    navLinks: true, // can click day/week names to navigate views
                    businessHours: true, // display business hours
                    editable: true,
                    selectable: true,
                    events: post_events,
                    maxDate: "+3m", 
                    // events: [
    
                    // {
                    //     start: '2022-05-19',
                    //     end: '2022-05-24',
                    //     overlap: false,
                    //     display: 'background',
                    //     color: '#ff9f89'
                    // },
    
                    // post_events                    
    
                    // ],
                });
    
                calendar.render();
            });
        </script>
    
        <?php
    }
    
    
    //Put the full description of a listing in paragraphs
    function breakLongText($text, $length = 200, $maxLength = 250){
        //Text length
        $textLength = strlen($text);
    
        //initialize empty array to store split text
        $splitText = array();
    
        //return without breaking if text is already short
        if (!($textLength > $maxLength)){
        $splitText[] = $text;
        return $splitText;
        }
    
        //Guess sentence completion
        $needle = '.';
    
        /*iterate over $text length 
        as substr_replace deleting it*/  
        while (strlen($text) > $length){
    
        $end = strpos($text, $needle, $length);
    
        if ($end === false){
    
        //Returns FALSE if the needle (in this case ".") was not found.
        $splitText[] = substr($text,0);
        $text = '';
        break;
    
        }
    
        $end++;
        $splitText[] = substr($text,0,$end);
        $text = substr_replace($text,'',0,$end);
    
        }
        
        if ($text){
        $splitText[] = substr($text,0);
        }
    
        return $splitText;
    
    }