Nov 11, 2021
').html('If you are using an iPad, you may install the app below:')); } $('#download_app_div').append(plistAnchor); } else { $('#download_app_div').empty().html('An error has occurred:' + json.message); } } else { $('#download_app_div').empty().html('An error has occurred'); } }, error:function(xhr, textStatus, errorThrown){ $('#download_app_div').empty().html('An error has occurred: ' + textStatus); } }); } else { $('#download_app_div').empty().html('Sorry, app download is only available for iOS devices.'); } } $("#btn-send-contact").click(function(event){ event.preventDefault(); var error = ""; //validate var valid = true; $('#podcast-page-contact-form').find(':input:not(button)').each(function(){ var name = $(this).attr("name"); var value = $(this).val(); if (typeof name != 'undefined' && value == ""){ valid = false; return false; } }); if(valid){ //submit form var datastring = $("#podcast-page-contact-form").serialize(); $.ajax({ type: "POST", url: "https://web-support.libsyn.com/contact/submit", data: datastring, dataType: "json", success: function(data) { if(data == false){ error = "Error Your message could not be sent at this time. Please try again later."; $("#podcast-page-contact-form-error").html(error).fadeIn().delay(5000).fadeOut(); } else { $('#podcast-page-contact-form').find(":input").val("").hide(); $('#podcast-page-contact-form').fadeOut(); $("#podcast-page-contact-form-success").show(); } }, error: function() { error = "Error Your message could not be sent at this time. Please try again later."; $("#podcast-page-contact-form-error").html(error).fadeIn().delay(5000).fadeOut(); } }); } else { error = "Error Please fill out all fields and submit again."; $("#podcast-page-contact-form-error").html(error).fadeIn().delay(5000).fadeOut(); return false; } }); //check if episode began playing on home page var playerData = localStorage.getItem(window.location.href); try { var playerData = JSON.parse(playerData); if(typeof(playerData.elapsed) != "undefined" && playerData.elapsed != "00:00:00"){ var iframeId = "embed_21130625"; var iframeSrc = $("#"+iframeId).attr("src"); newSrc = iframeSrc + "time-start/" + playerData.elapsed; $("#"+iframeId).attr('src', newSrc); localStorage.removeItem(window.location.href); } } catch (e) { //Not what we were looking for localStorage.removeItem(window.location.href); }