function timeFish(prepend){
	if ( prepend == true ){
		$('body #wrapper').prepend('<div id="fishies" />');
	}
	
	var random = rand(10,20) * 1000;
	setTimeout('animateFish();', random);
};

function animateFish(){
	//move from start position
	$('#fishies').animate({
		left: 693
	},
	{
		duration: 7000,
		easing: 'easeInSine',
		complete: function(){
			//move to end position
			$(this).animate({
				left: 793,
				opacity: 0
			},
			{
				duration: 1000,
				easing: 'linear',
				complete: function(){
					//reset to front and fade in
					$(this).css('left',-100)
					.animate({
						opacity: 0
					},
					{
						duration: 1000,
						complete: function(){
							//wait one second
							$(this).animate({
								opacity: 1,
								left: 0
							},
							{
								duration: 1500,
								easing: 'linear',
								complete: function(){
									$(this).animate({
										left: 20
									},
									{
										duration: 400,
										easing: 'linear',
										complete: function(){
											$(this).animate({
												left:70,
												opacity: 0.5
											},
											{
												duration: 1000,
												easing: 'linear',
												complete: function(){
													$(this).animate({
														left: 120,
														opacity: 1
													},
													{
														duration: 1000,
														easing: 'linear',
														complete: function(){
															$(this).animate({
																left:306
															},
															{
																duration: 4700,
																complete: function(){
																	//restart timer
																	timeFish(false);
																}
															});
														}
													});
												}
											});
										}
									})
								}
							});
						}
					});
				}
			});
		}
	});
};