var ColorSetting = 1;

$(function() {
	// set opacity to nill on page load
	$("ul#menu span").css({ 'opacity': '0'} );
	
	// on mouse over
	$("ul#menu span").hover(function () {
		// animate opacity to full
		$(this).stop().animate({
			opacity: 1
		}, "slow");
	},
	// on mouse out
	function () {
	//$("ul#menu span").mouseout(function () {
		// animate opacity to nill
		$(this).stop().animate({
			opacity: 0
		}, "slow");
	});

	setTimeout("changeColors()", 0);
	
});

function changeColors()
{
  // Change colors
  if( ColorSetting == 0 )
  {
    $("#topleft-cyan").delay(10000).fadeIn(5000).delay(10000).fadeOut(5000);
    $("#botright-cyan").delay(10000).fadeIn(5000).delay(10000).fadeOut(5000);
    ColorSetting = 1;
  }
  else
  {
    $("#topleft-magenta").delay(10000).fadeIn(5000).delay(10000).fadeOut(5000);
    $("#botright-magenta").delay(10000).fadeIn(5000).delay(10000).fadeOut(5000);
    ColorSetting = 0;
  }
  setTimeout("changeColors()", 30000);
}
