(function($) {

	/********************
	 Ajax Edit Subaccount
	 ********************/
	 
	$("#frontend_manage_subaccounts #sfwc-loading-icon").hide();
	
	$.ajax({
		type: 'POST',
		data: {
			action: 'sfwc_frontend_edit_subaccount',
			ajax_user_id: sfwc_vars_edit_subaccount.userId,  // Subaccount user.
			ajax_current_page: sfwc_vars_edit_subaccount.currentPage,
			nonce: sfwc_vars_edit_subaccount.nonce,
		},
		url: sfwc_vars_edit_subaccount.adminAjaxUrl,
		beforeSend: function () {
			
			// Remove previous content page.
			$("#frontend_manage_subaccounts_users_list").remove();
			
			// Show loading icon.
			$("#frontend_manage_subaccounts #sfwc-loading-icon").show();
		},
		success: function (data) {
			
			// Hide loading icon.
			$("#frontend_manage_subaccounts #sfwc-loading-icon").hide();

			// Send data.
			$('#frontend_manage_subaccounts').html(data);
		}
	});

})( jQuery );