     if arr[i] < arr[tmp] then tmp = i
     i++
   return tmp
+  
 
-widthIsOver1250 = () ->
-  col_heights = [30, 30, 30]
-  add_state = 0
-  $(".tlelm").each ->
-    article_height = $(this).height() + 90
-    article_half_width = $(this).width()/2
-    add_state = minIndex(col_heights)
-    ma_left = 0
-
-    if add_state is 0
-      ma_left = -400
-    else if add_state is 1
-      ma_left = 0
-    else
-      ma_left = 400
-
-    $(this).css({position:"absolute",top:col_heights[add_state],left:"50%","margin-left":ma_left-article_half_width})
-    col_heights[add_state] += article_height
-
-
-
-timeline_algorithm = (col_heights) ->
+timeline_algorithm = (width) ->
+  col_heights = []
+  i = 0
+  n = Math.round(width/400)
+  while(i < n)
+    col_heights.push(30)
+    i++
+  
   add_state = 0
 
   $(".tlelm").each ->

    
    ma_left = 200
    
    x = col_heights.length #2
    a = 0.5
    b = -0.5
    y = a*x + b

    col_heights[add_state] += article_height

  
reset_timeline = () ->
  $(".tlelm").css({
    position:"relative",
    top:"",left:"",
