var $jx=jQuery.noConflict();$jx(document).ready(function(){$jx("ul.spy").simpleSpy("6","4000");$jx("ul.spy li").reverseOrder()});(function(a){a.fn.reverseOrder=function(){return this.each(function(){a(this).prependTo(a(this).parent())})};a.fn.simpleSpy=function(b,c){b=b||4;c=c||4000;return this.each(function(){var j=a(this),d=[],f=b,h=0,i=0,e=4000;height=j.find("> li:first").height();j.find("> li").each(function(){d.push("<li>"+a(this).html()+"</li>")});h=d.length;j.wrap('<div class="spyWrapper" />').parent().css({height:height*b});j.find("> li").filter(":gt("+(b-1)+")").remove();function g(){var k=a(d[f]).css({height:0,opacity:0,display:"none"}).prependTo(j);j.find("> li:last").animate({opacity:0},1000,function(){k.animate({height:height},1000).animate({opacity:1},1000);a(this).remove()});f++;if(f>=h){f=0}setTimeout(g,c)}if(i<1){setTimeout(g,e);i++}else{g()}})}})(jQuery);
