jQuery(document).ready(function(){jQuery('.showmore .jet-listing-dynamic-field__content').each(function(){var content=jQuery(this);var contentText=jQuery(this).html();var contentParagraphs=contentText.split('</p>');var totalWords=0;var cutOff=!1;var newContent='';for(var j=0;j<contentParagraphs.length-1;j++){var paragraph=contentParagraphs[j]+'</p>';var words=paragraph.split(' ');for(var i=0;i<words.length;i++){if(totalWords==25&&!cutOff){cutOff=!0;break}
newContent+=words[i]+' ';totalWords++}
if(cutOff){break}}
if(cutOff){newContent+='<span class="moreellipses">... </span>';var originalContent='<div class="originalcontent" style="display:none;">'+contentText+'</div>';var morelink='<a href="" class="morelink">Read more</a>';content.html('<div class="truncatedcontent">'+newContent+'</div>'+originalContent+morelink)}});jQuery('.morelink').click(function(){if(jQuery(this).hasClass("less")){jQuery(this).removeClass("less");jQuery(this).html("Read more");jQuery(this).closest('.jet-listing-dynamic-field__content').find('.originalcontent').hide();jQuery(this).closest('.jet-listing-dynamic-field__content').find('.truncatedcontent').show()}else{jQuery(this).addClass("less");jQuery(this).html("Hide");jQuery(this).closest('.jet-listing-dynamic-field__content').find('.originalcontent').show();jQuery(this).closest('.jet-listing-dynamic-field__content').find('.truncatedcontent').hide()}
return!1})});jQuery(document).ready(function(){var observer=new MutationObserver(function(mutations){mutations.forEach(function(mutation){if(mutation.attributeName==='lang'){var newLang=jQuery('html').attr('lang');if(newLang==='es'||newLang==='pt'){console.log('language changed');setTimeout(function(){console.log('timeout');jQuery('body').find('*').not('script, style, iframe, object, embed').contents().filter(function(){return this.nodeType===3&&/copas|copos/i.test(this.nodeValue)}).each(function(){this.nodeValue=this.nodeValue.replace(/\b(copas|copos)\b/gi,function(match){var isCapitalised=match.charAt(0)===match.charAt(0).toUpperCase();return isCapitalised?'Óculos':'óculos'});console.log('replacement should have occurred')})},2000)}}})});var config={attributes:!0};observer.observe(document.documentElement,config)});jQuery(document).ready(function(){function checkVisibility(){jQuery('.reveal').each(function(){var rect=this.getBoundingClientRect();if(rect.top<=50&&rect.bottom>=0){if(!jQuery(this).hasClass('visible')){jQuery(this).addClass('visible')}}else{if(jQuery(this).hasClass('visible')){jQuery(this).removeClass('visible')}}})}
jQuery(window).on('scroll',checkVisibility);checkVisibility()})