Hi
I'm a Jbeginner and am making a script that animates a few bars up and down in a 'random' manner....i'm sure you've seen the effect, usually done in flash.
This is the function i'm using so far, I'd like some advice how to do this a bit more elegantly, with a way to change the number of 'bars' and 'bounce' off the top/bottom of the parent div.

Code:
		$(document).ready(function()
			{
			animUp();
			function animUp() 
				{
				var randomNum = Math.ceil(Math.random()*300);
				var randomHeight = Math.ceil(Math.random()*40);
				$("#bar1").animate({ "top": randomNum }, 2400, "linear");
            			$("#bar2").animate({ "top": randomNum, "height": randomHeight }, 2400, "linear");
            			$("#bar4").animate({ "top": randomNum, "height": randomHeight }, 2200, "linear");
            			$("#bar5").animate({ "top": -randomNum, "height": randomHeight }, 2200, "linear");
            			$("#bar6").animate({ "top": -randomNum, "height": randomHeight }, 2200, "linear");
            			$("#enter").css("z-index", 99);
            			$("#bar3").animate({ "top": -randomNum, "height": randomHeight }, 2600, "linear", animDown);
      				}

        		function animDown() 
				{
        			var randomNum = Math.ceil(Math.random()*100);
        			var randomHeight = Math.ceil(Math.random()*30);
        			
           	 		$("#bar1").animate({ "top": randomNum }, 2400, "linear");
           	 		$("#bar2").animate({ "top": 200, "height": randomHeight }, 2400, "linear");
           	 		$("#bar5").animate({ "top": randomNum, "height": randomHeight }, 2400, "linear");
           	 		$("#bar6").animate({ "top": 100, "height": randomHeight }, 2400, "linear");
           	 		$("#bar4").animate({ "top": -randomNum, "height": randomHeight }, 1200, "linear");
           	 		$("#enter").css("z-index", 99);
           	 		$("#bar3").animate({ "top": randomNum, "height": randomHeight }, 2200, "linear", animDown);
       			 	}
      		});