if (UV.officeOpen=="1") { $(".how-we-work span").html($('#header_message span').length ? $('#header_message span').html() : $('.office_open span').length ? $(".office_open span").html() : $(".how-we-work span").html()); } else { $(".how-we-work span").parent().html($(".how-we-work span").parent().html().replace(/Call us on/i, "Call us")); $(".how-we-work span").remove(); }