/** NotificationsBar(daniel ohayon) **/

function showNotifications() {
    if ($j('#fixedline #userlist').css('display') == 'block')
        showUserList();

    if ($j('#fixedline #notifications').css('display') == 'none') {
        $j('#fixedline #notifications_button').addClass('lineb_clicked');
        $j('#notifications').slideToggle('fast');
        
        if( $j('#notifications_button #horse_newmessages') != undefined ){
            $j('#notifications_button #horse_newmessages').html('').attr('id', 'horse_nomessages');
        }
            
        $j.ajax({
            type: "POST",
            url: "/Chat/Chat.asmx/ClearNotificationsForUser",
            data: "{}",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function (data) { }
        });
    } else {
        $j('#fixedline #notifications_button').removeClass('lineb_clicked');
        $j('#notifications .notification_item').removeClass('unread');
        $j('#notifications').slideToggle('fast');
    }
}