
$(document).ready(function() {
	var curURL = (window.location).toString();
	var pattern = "/(.*)lovat\.com(.*)/";
	var results = curURL.match(pattern);
	if(results){
		var newloc = curURL.replace("lovat", "cattunnelboring");
		window.location.replace(newloc);
	}

	
	$("a[href^='http://www.lovat.com']")
		.each(function()
		{
			this.href = this.href.replace(/^http:\/\/www\.lovat\.com/, "http://www.cattunnelboring.com");
	   });

	$("a[href^=' http://www.lovat.com']")
		.each(function()
		{
			this.href = this.href.replace(/^http:\/\/www\.lovat\.com/, "http://www.cattunnelboring.com");
	   });

	$("a[href^='http://lovat.com']")
		.each(function()
		{
			this.href = this.href.replace(/^http:\/\/www\.lovat\.com/, "http://www.cattunnelboring.com");
	   });

	$("a[href^=' http://lovat.com']")
		.each(function()
		{
			this.href = this.href.replace(/^http:\/\/www\.lovat\.com/, "http://www.cattunnelboring.com");
	   });
	   

});

