$(document).ready(function()
{
    $.setAjaxForm('#editForm',function(response) 
    {
        if(response.result == 'success')
        {
            if(response.realname)
            {
                $('#start').prop('title', response.realname);
                $('#start .avatar').prop('data-name', response.realname);
                $('#start .avatar span span:first').html(response.realname[0].toUpperCase());
                $('#startMenu a[data-id=profile] strong').html(response.realname);
            }
            var ref = $('#ajaxModal').attr('ref');
            if(v.ref == ref)
            {
                location.reload();
            }
            else
            {
                $.reloadAjaxModal(1200);
            }
        }
    });
});
