/g, ">") .replace(/"/g, """) .replace(/'/g, "'"); } //load more on bottom of page $(window).scroll(function () { if(!lockScroll){ if ($(window).scrollTop() >= $(document).height() - $(window).height() - 60) { lockScroll = true; var requestUrl = "http://podcast.maersk.com/website"; requestUrl += "/page/"+ (page_filter + 1); if(text_posts_only){ requestUrl += "/podcast/blog"; } else if(premium_filter){ requestUrl += "/search/is_premium"; } else if(text_filter != ""){ requestUrl += "/search/"+ text_filter; } else if(month_filter != 0) { requestUrl += "/"+ year_filter +"/"+ month_filter; } else if(year_filter != 0) { requestUrl += "/" + year_filter; } else { requestUrl += (category_filter != "" ? "/category/"+category_filter : ""); } requestUrl += "/render-type/json"; $.ajax({ type: 'GET', url: requestUrl, async: false, success:function(json){ var items = JSON.parse(json); if(items.length > 0){ for(var i = 0; i < items.length; i++){ var item = new Array(); item = items[i]; var isTextOnly = typeof item.primary_content == 'undefined'; var isVideo; if(isTextOnly){ isVideo = false; } else { isVideo = item.primary_content.file_class == "video"; } //create action buttons var actionButtonsRow = '