var vhdWidget167975141158 = {};
vhdWidget167975141158.widgetWrap = document.createElement('div');
vhdWidget167975141158.widgetHtml = '<div style="width: auto; height: 424px; 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 #419438; 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 #419438; background: #FAFCFF; border-top: none; border-bottom: none; padding: 10px 20px;"> <!-- REVIEW INFO --> <div style="padding-bottom: 6px; border-bottom: 2px solid #419438"> <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="Streatham Hill Veterinary Surgery"> <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: 100%; 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.7"> <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">1827</span> REVIEWS - <a href="https://vethelpdirect.com/vet/streatham-hill-veterinary-surgery-in-streatham-hill-948#startofreviews" target="_blank" id="js-vhdWidget167975141158-read-review-link" onclick="vhdWidget167975141158.showOverlay(\'read\', event, event);" style="color: #419438; 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="vhdWidget167975141158.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;">Mar 13 - </time> <q style="color: #454545; font-size: 14px; font-family: arial, sans-serif; padding: 0;"> <span>Our dog was very ill while we were away on holiday and our son took her to the Streatham Hill Vets. She received wonderful emergency care from the team and has now fully recovered</span><span class="ellipsis">...</span><span class="more" style="display: none;">. Thank you so much!</span> </q> <span style="color: #454545; font-style: italic; font-size: 14px; font-family: arial, sans-serif;"> - James</span> </p> </div> <div class="review-toggle" style="padding: 4px 0 0 0; border-bottom: 1px solid #E0E0E0;; cursor: pointer;" onclick="vhdWidget167975141158.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;">Mar 5 - </time> <q style="color: #454545; font-size: 14px; font-family: arial, sans-serif; padding: 0;"> <span>Excellent surgery. No animal enjoys a trip to the vet but the staff here are amazingly kind in the way that they assess and provide treatment.</span> </q> <span style="color: #454545; font-style: italic; font-size: 14px; font-family: arial, sans-serif;"> - clairewj</span> </p> </div> <div class="review-toggle" style="padding: 4px 0 0 0; ; cursor: pointer;" onclick="vhdWidget167975141158.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: 90%; 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;">Feb 28 - </time> <q style="color: #454545; font-size: 14px; font-family: arial, sans-serif; padding: 0;"> <span>We got our first cat KC from Streatham Hill. She was a stray and is now 7 and a half years old. We now go to The Corner Vets as they are close to our home. Now we have Kevin anothe</span><span class="ellipsis">...</span><span class="more" style="display: none;">r kitty. They have both had a few visits and attend yearly for their checks and vaccinations. The Corner Vets are friendly and usually see our kitties fairly quickly if we are concerned about them. Always friendly and kind.</span> </q> <span style="color: #454545; font-style: italic; font-size: 14px; font-family: arial, sans-serif;"> - Jackie</span> </p> </div> </div> <!-- FOOTER BUTTON --> <a href="https://vethelpdirect.com/dashboard/write-review?id=948&amp;color=ffffff&amp;color2=ffffff" id="js-vhdWidget167975141158-write-review-link" onclick="vhdWidget167975141158.showOverlay(\'write\', event);" target="_blank" style="display: block; background: #419438; border: 2px solid #419438; 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-vhdWidget167975141158-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-vhdWidget167975141158-vet-select-menu" onchange="vhdWidget167975141158.onVetChange();"> <option data-practice-id="948" value="https://vethelpdirect.com/vet/streatham-hill-veterinary-surgery-in-streatham-hill-948">Streatham Hill Veterinary Surgery</option> </select> </div> <a href="#" target="_blank" data-write-url="https://vethelpdirect.com/dashboard/write-review?id=948&amp;color=ffffff&amp;color2=ffffff" data-read-url="https://vethelpdirect.com/vet/streatham-hill-veterinary-surgery-in-streatham-hill-948#startofreviews" onclick="vhdWidget167975141158.onContinue();" id="js-vhdWidget167975141158-continue-btn" style="background: #419438; 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-vhdWidget167975141158-cancel" onclick="vhdWidget167975141158.onCancel(event);" style="font-size: 12px; color: #bdbdbd;">Cancel</a> </div> </div> </div>';
vhdWidget167975141158.widgetWrap.innerHTML = vhdWidget167975141158.widgetHtml;
vhdWidget167975141158.scripts = document.getElementsByTagName('script');
/*vhdWidget167975141158.thisScript = vhdWidget167975141158.scripts[vhdWidget167975141158.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 */
vhdWidget167975141158.thisScript = null;
function isMe(scriptElem){
    var string = scriptElem.getAttribute('src');
    if(string != null){
      return string.indexOf("/dashboard/api/widget?widgetid=873") !== -1;
    } else {
      return false;
    }
}
for (var i = 0; i < vhdWidget167975141158.scripts.length; ++i) {
    if( isMe(vhdWidget167975141158.scripts[i])){
      console.log("script tag found!");
      vhdWidget167975141158.thisScript = vhdWidget167975141158.scripts[i];
    }
}
if(vhdWidget167975141158.thisScript != null){
  vhdWidget167975141158.thisScript.parentNode.insertBefore(vhdWidget167975141158.widgetWrap, vhdWidget167975141158.thisScript.nextSibling);
}


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

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

vhdWidget167975141158.onVetChange = function() {
    var continueBtn = document.getElementById('js-vhdWidget167975141158-continue-btn');
    var practiceDetails = vhdWidget167975141158.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;
    }
};

vhdWidget167975141158.showOverlay = function(type, event) {
    var continueBtn = document.getElementById('js-vhdWidget167975141158-continue-btn');
    var practiceDetails = vhdWidget167975141158.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();
            vhdWidget167975141158.openWriteReviewWindow(continueBtn.href);
        }
    }
    else {

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

    }
};

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


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

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

    e.preventDefault();

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

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

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

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

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


vhdWidget167975141158.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';
    }
}

vhdWidget167975141158.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;
}