/**
 * Created by nik on 01.10.15.
 */

function refreshMessagesCount(){
    $.get('/notification', function(data){
        if(data && data.count_messages){
            $('#messages-count').html(data.count_messages);
        }
    });
}

setInterval(refreshMessagesCount, 3000);