// does (surprisingly) work in IE 6
jQuery.fn.randomChild = function(settings) {
   return this.each(function(){
       var c = $(this).children().length;
       var r = Math.ceil(Math.random() * c);
       $(this).children(':nth-child(' + r + ')').attr("id", 'start').addClass("act");
   });
};

$(document).ready(function(){
	
	$('ul#slider').randomChild();
	
	lastBlock = $( "#start" );
	maxWidth = 721;
	minWidth = 36;	

	$( "ul#slider li" ).hover(
		function(){
			$( lastBlock ).animate( { width: minWidth+"px" }, { queue: false, duration: 800 }, "easein" ).removeClass( "act" );
			$( this ).animate( { width: maxWidth+"px" }, { queue: false, duration: 800 }, "easein" ).addClass( "act" );
			lastBlock = this;
		}, function() {
			// nothing to see here.
		}
	);
	
});