#navbar
  %ul
    %li#nav_index
      %a{:href => "/"} Mauve
    - if @person
      %li{:class => [ @alert_type == "raised" && "nav_selected"]}
        %a{:href => '/alerts/raised/'+@group_by} 
          Raised (
          %span#count_raised><= @alert_counts[:unacknowledged]
          )
      %li{:class => [ @alert_type == "acknowledged" && "nav_selected"]}
        %a{:href => '/alerts/acknowledged/'+@group_by} 
          Ack'd (
          %span#count_ackd><= @alert_counts[:acknowledged]
          )
      %li{:class => [ request.path_info =~ /^\/search/ && "nav_selected"]}
        %a{:href => '/search'} Search
      %li{:class => [ request.path_info =~ /^\/events/ && "nav_selected"]}
        %a{:href => '/events/calendar'} Events
      %li
        %a{:href => '/logout'} Log out
  %br
- %w(notice error).each do |klass|
  - unless flash[klass].to_s.empty?
    %div{:class => ["flash", klass]}
      :textile
        #{flash[klass]}
  - else
    %div{:class => ["flash", klass], :style => "display: none"}