// vim: set sw=4 ts=4 sts=4 si noet:

jm.register = function() {
	var init = function() {
		return this;
	}

	var copyMobilePhone = function(evt) {
		var regex = /Code$|Number$/;
		var target = '#' + $(evt.target).attr('id').replace(regex, '');
		var c = $(target + 'Code');
		var n = $(target + 'Number');
		if (c.val().length > 0 && n.val().length > 0) {
			var phone = c.val() + n.val();
			$(target).val(phone);
		}
	}

	return {
		init: init,
		copyMobilePhone: copyMobilePhone
	}
}().init(this);

