function randomNumber(m,n)
{
	m = parseInt(m);
	n = parseInt(n);
	return Math.floor( Math.random() * (n - m + 1) ) + m;
}
function NextColor( obj, time)
{
    setTimeout(function(){
        $(obj).animate({
        'background-color' : 'rgb('+randomNumber(0,255)+','+randomNumber(0,255)+','+randomNumber(0,255)+')' 
        }, time, function(){ NextColor( obj, randomNumber(500,10000)); });
    });
}
$(document).ready(function(){
		$('.top_menu ul li div').mouseover(function(){
			$(this).children('a').fadeTo('fast','0.01');
		}).mouseout(function(){
			$(this).children('a').stop().fadeTo('slow','1');
		});
		
		$('#text1').mouseover(function(){
			$(this).children('div.inside').stop().fadeTo('1000','1');
            $('#link1').stop().fadeTo('1000','1');
		}).mouseout(function(){
			$(this).children('div.inside').stop().fadeTo('3000','0.01');
            $('#link1').stop().fadeTo('3000','0.01');
		});
		
		$('#text2').mouseover(function(){
			$(this).children('div.inside').stop().fadeTo('1000','1');
            $('#link3').stop().fadeTo('1000','1');
		}).mouseout(function(){
			$(this).children('div.inside').stop().fadeTo('3000','0.01');
            $('#link3').stop().fadeTo('3000','0.01');
		});
		
		$('#text3').mouseover(function(){
			$(this).children('div.inside').stop().fadeTo('1000','1');
            $('#link2').stop().fadeTo('1000','1');
		}).mouseout(function(){
			$(this).children('div.inside').stop().fadeTo('3000','0.01');
            $('#link2').stop().fadeTo('3000','0.01');
		});
	//	NextColor( $('#ground'), randomNumber(500,10000) );
   });
