var regex = /^(http:\/\/)(joffreys.com)(.+?)$/gi;
var ws_regex = /^https:\/\/joffreys.worldsecuresystems.com\/([^OrderRetrievev2\.aspx])(.+?)$/gi;

if (location.href.search(regex) != -1) location.href = location.href.replace(regex, "$1www.$2$3");
if (location.href.search(ws_regex) != -1) location.href = location.href.replace(ws_regex, "http://www.joffreys.com/$1$2");