AddMyProfileForm = MooForm.extend({
		initialize: function (form) {
			this.parent(form, "/hamster.php", $("addProfileIdFormMessage"));
			this.submitMessage = "Please wait (this could take a few moments)";
		},

		onActionSuccess: function (result) {
			this.parent(result);
			location.href = "/?";
			if (typeof urchinTracker == "function")
				urchinTracker('/new_profile_success');
			this.message("Relocating, please wait...");
		}
	});

window.addEvent('domready', function(){
		var nodes = $$(".addMyProfileForm");
		for (var i = nodes.length; i--;)
			new AddMyProfileForm(nodes[i]);
	});
