; $(document).ready(function(){ var testdemo_url = "http://testdemo.publicdata.com/pdmain.php/Logon/home"; var testcolor = "orange"; var testlogin_url = "https://test.publicdata.com/pdmain.php/Logon/checkAccess"; var testcancel_url = "https://test.publicdata.com/cancel.html"; var testretrievpass_url = "https://test.publicdata.com/retrieve.html"; var testregister_ind = "https://test.publicdata.com/DisplayTC4RegI.php"; var testregister_corp = "https://test.publicdata.com/DisplayTC4RegC.php"; if(/testdemo/i.test(window.location) || /test.publicdata.com/i.test(window.location)){ //$("#title").html("TEST PublicData.com TEST"); //$("#welcome").html($("#welcome").html() + " TEST"); //$("#body").attr("bgColor", testcolor); $("a[name='demo_link']").attr("href",testdemo_url); $("#frmlogin").attr("action",testlogin_url); $("#cancel_link").attr("href",testcancel_url); $("#retrievepass_link").attr("href",testretrievpass_url); $("a[name='registerind_link']").attr("href", testregister_ind); $("a[name='registercorp_link']").attr("href",testregister_corp); $("#view_demo_link").attr("href", testdemo_url); //replaces www.publicdata.com with test.publicdata.com $("a").each(function(index){ if(this.href && (this.href).match("http://www.publicdata.com")){ var result = this.href.replace("http://www.publicdata.com","http://test.publicdata.com"); $(this).attr("href",result); } }); } });