// JavaScript Document
(function($)
{
   $.fn.cycle = function(a)
   {
      return this.each(function()
      {
         $.cycle(this, a)
      }
      )
   }
   ;
   $.cycle = function(b, c)
   {
      var d =
      {
         'speed' : 'normal', 'verz' : 4000, 'hoehe' : 'auto', 'Klasse' : 'cycle', 'children' : null
      }
      ;
      if(c)$.extend(d, c);
      if(d.children === null)var e = $(b).children();
      else var e = $(b).children(d.children);
      if(e.length > 1)
      {
         $(b).css('position', 'relative').css('height', d.hoehe).addClass(d.Klasse);
         $(e[0]).css('position', 'absolute').css('top', '0px').css('overflow', 'hidden').css('height', d.hoehe);
         for(var i = 1; i < e.length; i ++ )
         {
            $(e[i]).show().css('position', 'absolute').css('overflow', 'hidden').css('top', d.hoehe).css('height', d.hoehe)
         }
         ;
         var f = 0;
         setTimeout(function()
         {
            $.oho(e)
         }
         , (d.verz + 39 * ($(e[f]).html().length)));
         $.oho = function(a)
         {
            $(a[f]).animate(
            {
               "top" : "-" + d.hoehe
            }
            , d.speed, function()
            {
               $(this).css('top', d.hoehe)
            }
            );
            if((f + 1) < a.length)
            {
               f = f + 1
            }
            else f = 0;
            $(a[f]).animate(
            {
               "top" : "0"
            }
            , d.speed);
            setTimeout((function()
            {
               $.oho(a)
            }
            ), (d.verz + 39 * ($(a[f]).html().length)))
         }
      }
   }
}
)(jQuery);

