       @log "panels(#{i})"
       el = "##{@options.id} .pages .page:nth-child(#{(i+1)}) ul"
       @options.pages[i]['panel_selector'] = el
+      @active_panel = el
       @options.pages[i][''] = $(el).attr('id',"#{@options.pages[i]['id']}-panel")
+      
       $(el).amplePanels(@options.pages_options)
         .bind 'slide_horizontal', (e,d,dir) ->
           ref.load(i) if dir == 'next'


  enable_panel: (i) ->  
    @log "enable_panel(#{i})"
    $(@options.pages[i]['panel_selector']).amplePanels('enable') if @options.pages[i]['panel_selector']

  already_loaded: (i) ->
    @log "already_loaded(#{i})"

        height: 81
        enabled: true
        distance: 10
        auto: false
        orientation: 'horizontal'
        key_orientation: 'horizontal'
