jQuery.fn.setHomePage = function() {
	try
	{	
		//Get cookie  
		if ($.cookie('perpetual-homePage') != "") {
			var c = $.cookie('perpetual-homePage');			
			//set homepage to the cookie value
			switch (c) {
				case 'Investors':						
						//redirect and delete cookie
						window.location.href = "/investors.aspx";
						$.cookie("perpetual-homePage", null);
					break;
			   case 'Advisers':
						window.location.href = "/advisers.aspx";
						$.cookie("perpetual-homePage", null);
					break;
				case 'Institutions':
						window.location.href = "/institutions.aspx";
						$.cookie("perpetual-homePage", null);
					break;
			}
		}		
	}
	catch(err)
	{
		//fail gracefully with no logging at present...
	}
};
