     success: (data) ->
       statistics = data
       $('#statistics').html _.template(arr.join(''), { data : data})
-      bind()
       if $('#queque_detail').is(":visible")
-        #name = $($('#statistics').find('tr[id]').find('td')).html() 
-        console.log 'init index', select_index
         $($('#statistics').find('tr')[select_index]).attr("id","active")
         name = $($($('#statistics').find('tr')[select_index]).find('td:first')).html()
-        console.log 'name', name
         data_bind_detail name
       select_value = $("select").find("option:selected").text()
-      console.log 'select_value', select_value
-      setTimeout (-> init()), select_value.substring(0, select_value.length-1)*1000
+      t = setTimeout (-> init()), select_value.substring(0, select_value.length-1)*1000
   })
 
-$(document).ready -> init()
+$(document).ready -> 
+  init()
+  bind()
 
 btn_click = (obj) ->
-  console.log obj
   name = $(obj).parent().parent().find('td:first').html()
-  console.log name
   $.ajax({
     type: 'POST'
     url: '/api/queues/' + name + '/reschedule'

    type: 'GET'
    url: '/api/queues/' + name + '/statistics'
    success: (stat) ->

      $('#statistic').html _.template($('#tb_statistic_template').html(), { statistic: stat })
  })
  $.ajax({

  return {new: () -> return i++ }

$("select").change () ->
  clearTimeout(t)
  init()

# --------------------------Table Crosshair--end----------------------------

# 点击图标切换 统计 下显示表格的方式
$('.icon-th').click () ->
  $('#workers + .tabbable').addClass('xz')
  $(this).addClass('active')
  $('.icon-th-large').removeClass('active')

$('.icon-th-large').click () ->
  $('#workers + .tabbable').removeClass('xz')
  $(this).addClass('active')
  $('.icon-th').removeClass('active')

#顶部阴影
$(document).scroll () ->
  scroll_top = $(document).scrollTop()
  if scroll_top > 40
    $('h1').addClass("h1_shadow")
  else
    $('h1').removeClass("h1_shadow")

