jQuery(document).ready(function($){if(!$('.divi-100-article-card').length){return false;}else{$('.et_pb_blog_grid').find('.et_pb_post').each(function(){var $this=$(this);$this.addClass('article-card');$this.append('
');var postContent=$this.find('.article-card__content');var postMeta=$this.children('.post-meta');var excerpt=$this.clone().children().remove().end().text().trim();var excerptWrap=$('
');if($this.children('p').not('p.post-meta').length>0){excerpt=$this.children('p').not('p.post-meta').text();$this.children('p').not('p.post-meta').remove();} if(excerpt.length>80){excerpt=excerpt.substring(0,80).split(" ").slice(0,-1).join(" ")+"..."} postMeta.children('a').addClass('article-card__category').appendTo(postContent);excerptWrap.text(excerpt).appendTo(postContent);postContent.append('
');$this.contents().filter(function(){return(this.nodeType==3);}).remove();$(this).find('.published').text(function(){return $(this).text().slice(0,-6);});$this.find('.published').appendTo(this).replaceWith(function(i,text){return(text.replace(/([a-zA-Z]+)([\d\D]*)/g,'
\ $2\ $1\
'));});$this.find('.article-card__day').text(function(){return $(this).text().replace(/\,/g,'').trim();});$this.find('.entry-title').addClass('article-card__title').prependTo(postContent);$this.find('.author').addClass('article-card__author').appendTo($this.find('.article-card__meta'));var comments=postMeta.text().replace(/[^a-zA-Z0-9 ]/g,"").replace("by","").trim();if(comments){$(''+comments+'').appendTo($this.find('.article-card__meta'));} postMeta.remove();if($(this).find('.post-content').length>0){$(this).find('.post-content p').appendTo($(this).find('.article-card__excerpt'));} if($(window).width()>768){$this.children().children('.article-card__excerpt').hide();} function postModuleSize(){var postContentHeight=postContent.outerHeight();$this.css({'padding-bottom':postContentHeight});} setTimeout(postModuleSize,100);$(window).resize(function(){postModuleSize();});if($(window).width()>768){setTimeout(function(){$this.on('hover',function(){$this.find('.article-card__excerpt').stop().animate({height:"toggle",opacity:"toggle"},200);});});}});}});