
(function(a)
{
a.fn.rotator=function(b)
{
var c={ms:2e3,n:1,autoHeight:false},
b=a.extend(c,b);
return this.each(function()
{
var c=a(this),
d=0;
c.children().filter(":lt("+b.n+")").each(function(c,b)
{
d+=a(b).height()
});
b.autoHeight&&
c.height(d);
setInterval(function()
{
var f=c.children().filter(":first-child").height(),
d={scrollTop:f+"px"},
e=0;
c.children().filter(":lt("+(b.n+1)+")").each(function(b,c)
{
if(b>0)
e+=a(c).height()
});
if(b.autoHeight)
d=a.extend({height:e+"px"},d);
c.animate(d,500,function()
{
c.scrollTop(0);
c.append(c.children().filter(":first-child"));
c.css("overflow","hidden")
})
},b.ms)
})
}
})(jQuery)
