'; }; if (jsonVideo.library.length > 3){ jQuery( "#video-lib .show-more" ).removeClass('d-none'); } function removeExtraVideos () { jQuery( "#video-lib .video-container .col-md-4" ).each(function( index ) { if (index > 2){ jQuery( this ).remove(); } }); }; function appendVideos ( videoArr, action='init' ) { var yturlPrefix='https://youtube.com/embed/'; jQuery.each( videoArr , function( i, item ) { var videoTitle = item.title; var videoID = item.videoID; var yturlSuffix='/?rel=0&playlist='+videoID+'&loop=1'; var videoURL = yturlPrefix+videoID+yturlSuffix; var videoElement = videoHTML(videoURL, videoTitle); if(i < 3 && action=='init'){ jQuery('#video-lib .video-container').append(videoElement); }; if(i >= 3 && action == 'click'){ jQuery('#video-lib .video-container').append(videoElement); } }); } appendVideos(jsonVideo.library); jQuery( "#video-lib .show-more button" ).click(function() { if(!moreVideosAdded){ appendVideos(jsonVideo.library, 'click'); jQuery(this).text(lessVideoBtnText); moreVideosAdded=true; }else{ removeExtraVideos (); jQuery(this).text(moreVideoBtnText); moreVideosAdded=false; } }); }; //end if for covid pages //departure Catherine Pham if(jQuery("body").hasClass("postid-50109")){ jQuery('.page-header').after('