var isCP = !!document.location.hostname.match(/crashplan.com$/);
var isCPP = !!document.location.hostname.match(/crashplanpro.com$/);
$.fn.fixProUrls = function() {

	
	if (isCPP) {
		this.each(function() {
			jQuery(this).find('a:not(.crashplanpro-app)').each(function() {
				var href = jQuery.trim(jQuery(this).attr('href'));
				if (href.match(/^\//)) {
					jQuery(this).attr('href', 'http://www.crashplan.com' + href);
				}
			});
		});
	} else if (isCP) {
		this.each(function() {
			jQuery(this).find('a.crashplanpro-app').each(function() {
				var href = jQuery.trim(jQuery(this).attr('href'));
				if (!href.match(/^http/)) {
					href = (href.charAt(0) != '/' ? '/' : '') + href;
					jQuery(this).attr('href', 'https://app.crashplanpro.com' + href);
				}
			});
		});
	}
};

