var vhdWidget170288399074 = {};
vhdWidget170288399074.widgetWrap = document.createElement('div');
vhdWidget170288399074.widgetHtml = '<div style="width: auto; height: auto; position: relative; overflow-y: auto; display: block;"> <!-- HEADER sf --> <div style="border-top-left-radius: 8px; border-top-right-radius: 8px; padding: 10px; border: 2px solid #72c247; background: #FFFFFF;"> <a href="#" style="display: block; text-align: center; line-height: 1px;"> <img border="0" src="https://vethelpdirect.com/dashboard/assets/images/logo/logo.svg" style="max-width: 200px; border: 0px !important; padding: 0px !important; margin: 0px !important; background: none !important; display: inline !important; outline: none !important; " height="43" style="margin-top: 7px" alt="Vet Help Direct Logo"> </a> </div> <!-- BODY --> <div style="border: 2px solid #72c247; background: #FAFCFF; border-top: none; border-bottom: none; padding: 10px 20px;"> <!-- REVIEW INFO --> <div style="padding-bottom: 6px; border-bottom: 2px solid #72c247"> <p style="font-family: arial, sans-serif; color: #333333; font-size: 13px; padding: 0; margin: 0 0 2px 0;"> Our Reviews</p> <div itemscope itemtype="http://schema.org/Organization"> <meta itemprop="name" content="Vets4Pets - Wakefield Westgate"> <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> <span style="width: 120px; height: auto; position: relative; display:block;"> <span style="width: 120px; display:block; margin-left: -1px;"> <img border="0" style="width: 22px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important;" src="https://vethelpdirect.com/dashboard/assets/images/star-grey.png" alt="Star Grey" width="22"><img border="0" style="width: 22px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important;" src="https://vethelpdirect.com/dashboard/assets/images/star-grey.png" alt="Star Grey" width="22"><img border="0" style="width: 22px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important;" src="https://vethelpdirect.com/dashboard/assets/images/star-grey.png" alt="Star Grey" width="22"><img border="0" style="width: 22px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important;" src="https://vethelpdirect.com/dashboard/assets/images/star-grey.png" alt="Star Grey" width="22"><img border="0" style="width: 22px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important;" src="https://vethelpdirect.com/dashboard/assets/images/star-grey.png" alt="Star Grey" width="22"> </span> <span style="width: 90%; position: absolute; top: 0; overflow: hidden; display:block; margin-left: -1px;"> <span style="width: 120px; display:block;"> <img border="0" src="https://vethelpdirect.com/dashboard/assets/images/star-gold.png" alt="Star Gold" style="width: 22px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important; " width="22"><img border="0" src="https://vethelpdirect.com/dashboard/assets/images/star-gold.png" alt="Star Gold" style="width: 22px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important; " width="22"><img border="0" src="https://vethelpdirect.com/dashboard/assets/images/star-gold.png" alt="Star Gold" style="width: 22px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important; " width="22"><img border="0" src="https://vethelpdirect.com/dashboard/assets/images/star-gold.png" alt="Star Gold" style="width: 22px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important; " width="22"><img border="0" src="https://vethelpdirect.com/dashboard/assets/images/star-gold.png" alt="Star Gold" style="width: 22px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important; " width="22"> </span> </span> </span> <meta itemprop="ratingValue" content="4.1"> <p style="font-family: arial, sans-serif; color: #454545; font-size: 10px; letter-spacing: 3px; margin: 6px 0 0 0; padding: 0;"> <span itemprop="ratingCount">21</span> REVIEWS - <a href="https://vethelpdirect.com/Vets4Pets-Wakefield-Westgate-in-Wakefield-874#startofreviews" target="_blank" id="js-vhdWidget170288399074-read-review-link" onclick="vhdWidget170288399074.showOverlay(\'read\', event, event);" style="color: #72c247; font-weight: bold; letter-spacing: normal; font-size: 12px; font-family: arial, sans-serif; text-decoration: underline; text-transform: uppercase;"> See all our reviews</a> </p> <meta itemprop="bestRating" content="5"> <meta itemprop="worstRating" content="0"> </div> </div> </div> <!-- REVIEWS --> <div class="review-toggle" style="padding: 4px 0 0 0; border-bottom: 1px solid #E0E0E0;; cursor: pointer;" onclick="vhdWidget170288399074.showFullText(event)"> <p style="margin: 0; padding: 0;"> <span style="width: 60px; height: auto; position: relative; display:block;"> <span style="width: 60px; display:block; margin-left: -1px;"> <img border="0" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important;" src="https://vethelpdirect.com/dashboard/assets/images/star-grey.png" alt="Star Grey" width="10"><img border="0" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important;" src="https://vethelpdirect.com/dashboard/assets/images/star-grey.png" alt="Star Grey" width="10"><img border="0" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important;" src="https://vethelpdirect.com/dashboard/assets/images/star-grey.png" alt="Star Grey" width="10"><img border="0" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important;" src="https://vethelpdirect.com/dashboard/assets/images/star-grey.png" alt="Star Grey" width="10"><img border="0" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important;" src="https://vethelpdirect.com/dashboard/assets/images/star-grey.png" alt="Star Grey" width="10"> </span> <span style="width: 100%; position: absolute; top: 0; overflow: hidden; display: block; margin-left: -1px;"> <span style="width: 60px; display:block;"> <img border="0" src="https://vethelpdirect.com/dashboard/assets/images/star-gold.png" alt="Star Gold" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important; " width="10"><img border="0" src="https://vethelpdirect.com/dashboard/assets/images/star-gold.png" alt="Star Gold" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important; " width="10"><img border="0" src="https://vethelpdirect.com/dashboard/assets/images/star-gold.png" alt="Star Gold" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important; " width="10"><img border="0" src="https://vethelpdirect.com/dashboard/assets/images/star-gold.png" alt="Star Gold" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important; " width="10"><img border="0" src="https://vethelpdirect.com/dashboard/assets/images/star-gold.png" alt="Star Gold" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important; " width="10"> </span> </span> </span> </p> <p style="margin: 0 0 3px 0; padding: 0;"> <time style="color: #454545; font-size: 13px; font-family: arial, sans-serif; font-style: italic; font-weight: bold;">Sep 13 - </time> <q style="color: #454545; font-size: 14px; font-family: arial, sans-serif; padding: 0;"> <span>Absolutely amazing! So thoughtful and passionate about people and their pets. My rabbits were recently spayed and the care they have been given is outstanding, I wouldn’t use any other vets!</span> </q> <span style="color: #454545; font-style: italic; font-size: 14px; font-family: arial, sans-serif;"> - Sarah</span> </p> </div> <div class="review-toggle" style="padding: 4px 0 0 0; border-bottom: 1px solid #E0E0E0;; cursor: pointer;" onclick="vhdWidget170288399074.showFullText(event)"> <p style="margin: 0; padding: 0;"> <span style="width: 60px; height: auto; position: relative; display:block;"> <span style="width: 60px; display:block; margin-left: -1px;"> <img border="0" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important;" src="https://vethelpdirect.com/dashboard/assets/images/star-grey.png" alt="Star Grey" width="10"><img border="0" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important;" src="https://vethelpdirect.com/dashboard/assets/images/star-grey.png" alt="Star Grey" width="10"><img border="0" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important;" src="https://vethelpdirect.com/dashboard/assets/images/star-grey.png" alt="Star Grey" width="10"><img border="0" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important;" src="https://vethelpdirect.com/dashboard/assets/images/star-grey.png" alt="Star Grey" width="10"><img border="0" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important;" src="https://vethelpdirect.com/dashboard/assets/images/star-grey.png" alt="Star Grey" width="10"> </span> <span style="width: 100%; position: absolute; top: 0; overflow: hidden; display: block; margin-left: -1px;"> <span style="width: 60px; display:block;"> <img border="0" src="https://vethelpdirect.com/dashboard/assets/images/star-gold.png" alt="Star Gold" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important; " width="10"><img border="0" src="https://vethelpdirect.com/dashboard/assets/images/star-gold.png" alt="Star Gold" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important; " width="10"><img border="0" src="https://vethelpdirect.com/dashboard/assets/images/star-gold.png" alt="Star Gold" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important; " width="10"><img border="0" src="https://vethelpdirect.com/dashboard/assets/images/star-gold.png" alt="Star Gold" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important; " width="10"><img border="0" src="https://vethelpdirect.com/dashboard/assets/images/star-gold.png" alt="Star Gold" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important; " width="10"> </span> </span> </span> </p> <p style="margin: 0 0 3px 0; padding: 0;"> <time style="color: #454545; font-size: 13px; font-family: arial, sans-serif; font-style: italic; font-weight: bold;">Oct 15 - </time> <q style="color: #454545; font-size: 14px; font-family: arial, sans-serif; padding: 0;"> <span>Was my first visit with a feral cat, so not a straight forward situation. I would like to thank All staff from the Appointment been made to me leaving, for there understand of the situation the professionalism, and taking there time and care with soo</span><span class="ellipsis">...</span><span class="more" style="display: none;">ty. I will 100% use there service again.</span> </q> <span style="color: #454545; font-style: italic; font-size: 14px; font-family: arial, sans-serif;"> - JULIE</span> </p> </div> <div class="review-toggle" style="padding: 4px 0 0 0; ; cursor: pointer;" onclick="vhdWidget170288399074.showFullText(event)"> <p style="margin: 0; padding: 0;"> <span style="width: 60px; height: auto; position: relative; display:block;"> <span style="width: 60px; display:block; margin-left: -1px;"> <img border="0" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important;" src="https://vethelpdirect.com/dashboard/assets/images/star-grey.png" alt="Star Grey" width="10"><img border="0" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important;" src="https://vethelpdirect.com/dashboard/assets/images/star-grey.png" alt="Star Grey" width="10"><img border="0" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important;" src="https://vethelpdirect.com/dashboard/assets/images/star-grey.png" alt="Star Grey" width="10"><img border="0" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important;" src="https://vethelpdirect.com/dashboard/assets/images/star-grey.png" alt="Star Grey" width="10"><img border="0" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important;" src="https://vethelpdirect.com/dashboard/assets/images/star-grey.png" alt="Star Grey" width="10"> </span> <span style="width: 100%; position: absolute; top: 0; overflow: hidden; display: block; margin-left: -1px;"> <span style="width: 60px; display:block;"> <img border="0" src="https://vethelpdirect.com/dashboard/assets/images/star-gold.png" alt="Star Gold" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important; " width="10"><img border="0" src="https://vethelpdirect.com/dashboard/assets/images/star-gold.png" alt="Star Gold" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important; " width="10"><img border="0" src="https://vethelpdirect.com/dashboard/assets/images/star-gold.png" alt="Star Gold" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important; " width="10"><img border="0" src="https://vethelpdirect.com/dashboard/assets/images/star-gold.png" alt="Star Gold" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important; " width="10"><img border="0" src="https://vethelpdirect.com/dashboard/assets/images/star-gold.png" alt="Star Gold" style="width: 10px !important; border: 0px !important; padding: 0px !important; margin: 0px 1px !important; background: none !important; display: inline !important; outline: none !important; " width="10"> </span> </span> </span> </p> <p style="margin: 0 0 3px 0; padding: 0;"> <time style="color: #454545; font-size: 13px; font-family: arial, sans-serif; font-style: italic; font-weight: bold;">Sep 28 - </time> <q style="color: #454545; font-size: 14px; font-family: arial, sans-serif; padding: 0;"> <span>My 17 year old cat was registered with calder vets and unfortunately had become unwell overnight and it was very evident that the time had come to say a very sad goodbye. Calder vets were very unhelpful and couldn&#039;t see him for 2 days. I contacted v</span><span class="ellipsis">...</span><span class="more" style="display: none;">ets for pets who I have my 2 dogs registered with and they saw him the same day. Chris the vet was so lovely and caring making this terrible time slightly easier. Thanks so much.</span> </q> <span style="color: #454545; font-style: italic; font-size: 14px; font-family: arial, sans-serif;"> - Carol</span> </p> </div> </div> <!-- FOOTER BUTTON --> <a href="https://vethelpdirect.com/dashboard/write-review?id=874&amp;color=ffffff&amp;color2=ffffff" id="js-vhdWidget170288399074-write-review-link" onclick="vhdWidget170288399074.showOverlay(\'write\', event);" target="_blank" style="display: block; background: #72c247; border: 2px solid #72c247; border-top: none; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; height: 50px; text-align: center; line-height: 50px; color: #fff; font-size: 11px; font-family: arial, sans-serif; font-weight: bold; letter-spacing: 3px;"> ADD A REVIEW </a> <div id="js-vhdWidget170288399074-overlay" style="position: absolute; background: rgba(0,0,0, 0.85); left: 0; right: 0; top: 0; bottom: 0; border-radius: 8px; text-align: center; visibility: hidden;"> <p style="padding: 15px 0; margin: 0; color: #ffffff; text-align: center;"> Which practice?</p> <div> <select style="max-width: 95%; margin: 0 auto; height: auto; width: auto; float: none; padding: 8px; font-size: 16px; background: #FFF; appearance: auto;" id="js-vhdWidget170288399074-vet-select-menu" onchange="vhdWidget170288399074.onVetChange();"> <option data-practice-id="874" value="https://vethelpdirect.com/Vets4Pets-Wakefield-Westgate-in-Wakefield-874">Vets4Pets - Wakefield Westgate</option> </select> </div> <a href="#" target="_blank" data-write-url="https://vethelpdirect.com/dashboard/write-review?id=874&amp;color=ffffff&amp;color2=ffffff" data-read-url="https://vethelpdirect.com/Vets4Pets-Wakefield-Westgate-in-Wakefield-874#startofreviews" onclick="vhdWidget170288399074.onContinue();" id="js-vhdWidget170288399074-continue-btn" style="background: #72c247; height: 35px; text-align: center; line-height: 35px; color: #fff; font-size: 10px; font-family: arial, sans-serif; font-weight: bold; letter-spacing: 3px; display: inline-block; border-radius: 20px; margin: 20px 0 15px 0; padding: 0 35px;">CONTINUE</a> <div> <a href="#" id="js-vhdWidget170288399074-cancel" onclick="vhdWidget170288399074.onCancel(event);" style="font-size: 12px; color: #bdbdbd;">Cancel</a> </div> </div> </div>';
vhdWidget170288399074.widgetWrap.innerHTML = vhdWidget170288399074.widgetHtml;
vhdWidget170288399074.scripts = document.getElementsByTagName('script');
/*vhdWidget170288399074.thisScript = vhdWidget170288399074.scripts[vhdWidget170288399074.scripts.length - 1];*/
/* Instead of the above, which has problems with async and dynamically inserted scripts being on the page, iterate until we find the one we want */
vhdWidget170288399074.thisScript = null;
function isMe(scriptElem){
    var string = scriptElem.getAttribute('src');
    if(string != null){
      return string.indexOf("/dashboard/api/widget?widgetid=365") !== -1;
    } else {
      return false;
    }
}
for (var i = 0; i < vhdWidget170288399074.scripts.length; ++i) {
    if( isMe(vhdWidget170288399074.scripts[i])){
      console.log("script tag found!");
      vhdWidget170288399074.thisScript = vhdWidget170288399074.scripts[i];
    }
}
if(vhdWidget170288399074.thisScript != null){
  vhdWidget170288399074.thisScript.parentNode.insertBefore(vhdWidget170288399074.widgetWrap, vhdWidget170288399074.thisScript.nextSibling);
}


vhdWidget170288399074.getSelectedPracticeDetails = function() {
    var selectMenu = document.getElementById('js-vhdWidget170288399074-vet-select-menu');
    var selectedOption = selectMenu.options[selectMenu.selectedIndex];

    return {
        id: selectedOption.getAttribute('data-practice-id'),
        readUrl: selectMenu.value,
        practiceCount: selectMenu.options.length
    };
};

vhdWidget170288399074.onVetChange = function() {
    var continueBtn = document.getElementById('js-vhdWidget170288399074-continue-btn');
    var practiceDetails = vhdWidget170288399074.getSelectedPracticeDetails();

    if (continueBtn.getAttribute('data-role') === 'write') {
        continueBtn.href = continueBtn.getAttribute('data-write-url').replace(/(id=)[0-9]+/, '$1' + practiceDetails.id);
    }
    else {
        continueBtn.href = practiceDetails.readUrl;
    }
};

vhdWidget170288399074.showOverlay = function(type, event) {
    var continueBtn = document.getElementById('js-vhdWidget170288399074-continue-btn');
    var practiceDetails = vhdWidget170288399074.getSelectedPracticeDetails();

    if (type === 'write') {
        continueBtn.href = continueBtn.getAttribute('data-write-url').replace(/(id=)[0-9]+/, '$1' + practiceDetails.id);
        continueBtn.setAttribute('data-role', 'write');
    }
    else {
        continueBtn.href = practiceDetails.readUrl;
        continueBtn.setAttribute('data-role', 'read');
    }

    if (practiceDetails.practiceCount === 1) {
        if (continueBtn.getAttribute('data-role') === 'write') {
            event.preventDefault();
            vhdWidget170288399074.openWriteReviewWindow(continueBtn.href);
        }
    }
    else {

        event.preventDefault();
        document.getElementById('js-vhdWidget170288399074-overlay').style.visibility = 'visible';

    }
};

vhdWidget170288399074.showPhotoOverlay = function(imageUrl, event) {
    event.preventDefault();
   
    var image = document.getElementById('js-vhdWidget170288399074-img');
    var newImg = new Image;
    newImg.onload = function() {
        image.src = imageUrl;
    }
    newImg.src = imageUrl;
    document.getElementById('js-vhdWidget170288399074-overlay-photo').style.visibility = 'visible';
};


vhdWidget170288399074.onContinue = function(e) {
    if (!e) var e = window.event;

    var continueBtn = document.getElementById('js-vhdWidget170288399074-continue-btn');

    e.preventDefault();

    if (continueBtn.getAttribute('data-role') === 'write') {
        vhdWidget170288399074.openWriteReviewWindow(continueBtn.href);
    } else {
        window.open(continueBtn.href, '_blank');
    }

    document.getElementById('js-vhdWidget170288399074-overlay').style.visibility = 'hidden';
};

vhdWidget170288399074.onCancel = function(e) {
    if (!e) var e = window.event;
    e.preventDefault();
    document.getElementById('js-vhdWidget170288399074-overlay').style.visibility = 'hidden';
};

vhdWidget170288399074.onCancelPhoto = function(e) {
    if (!e) var e = window.event;
    e.preventDefault();
    document.getElementById('js-vhdWidget170288399074-img').src = '';
    document.getElementById('js-vhdWidget170288399074-overlay-photo').style.visibility = 'hidden';
};

vhdWidget170288399074.openWriteReviewWindow = function(href) {
    window.open(href, 'WriteReview', 'width=650,height=600');
};


vhdWidget170288399074.showFullText = function(e) {
    if (!e) var e = window.event;
    e.preventDefault();
    var target = e.target;
    
    if (! e.target.classList.contains('review-toggle')) {
        target = findAncestor(e.target, 'review-toggle')
    }

    var ellipsis = target.querySelector('.ellipsis');
    var moreText = target.querySelector('.more');
    if ( typeof ellipsis != "undefined" && ellipsis != null ) {
        ellipsis.style.display = 'none';
        moreText.style.display = 'inline';
    }
}

vhdWidget170288399074.showFullTextV2 = function(e) {
    if (!e) var e = window.event;
    e.preventDefault();
    var target = e.target;
    
    if (! e.target.classList.contains('review-toggle')) {
        target = findAncestor(e.target, 'review-toggle')
    }

    var ellipsis = target.querySelector('.ellipsis');
    var moreText = target.querySelector('.more');
    if ( typeof ellipsis != "undefined" && ellipsis != null ) {
        ellipsis.style.display = 'none';
        moreText.style.display = 'inline';
        e.target.style.display = 'none';
    }
}

function findAncestor (el, cls) {
    while ((el = el.parentElement) && !el.classList.contains(cls));
    return el;
}