# File lib/ramaze/helper/paginate.rb, line 153
        def navigation(limit = 8)
          g = Ramaze::Gestalt.new
          g.div :class => :pager do
            if first_page?
              g.span(:class => "#{@css[:first]} #{@css[:disabled]}"){ h('<<') }
              g.span(:class => "#{@css[:prev]} #{@css[:disabled]}"){ h('<') }
            else
              link(g, 1, '<<', :class => @css[:first])
              link(g, prev_page, '<', :class => @css[:prev])
            end

            lower = limit ? (current_page - limit) : 1
            lower = lower < 1 ? 1 : lower

            (lower...current_page).each do |n|
              link(g, n, n, :class => @css[:number])
            end

            link(g, current_page, current_page,
              :class => "#{@css[:current]} #{@css[:number]}" )

            if last_page?
              g.span(:class => "#{@css[:next]} #{@css[:disabled]}"){ h('>') }
              g.span(:class => "#{@css[:last]} #{@css[:disabled]}"){ h('>>') }
            elsif next_page
              higher = limit ? (next_page + limit) : page_count
              higher = [higher, page_count].min
              (next_page..higher).each do |n|
                link(g, n, n, :class => @css[:number])
              end

              link(g, next_page, '>', :class => @css[:next])
              link(g, page_count, '>>', :class => @css[:last])
            end
          end
          g.to_s
        end