$(document).ready(function()
{
	
	$('#search-box').focus(function() { 
		this.value = "";
		$(this).css({color:"#000"});
		$(this).animate({borderLeftColor:"#000",borderRightColor:"#000",borderTopColor:"#000",borderBottomColor:"#000",backgroundColor:"#fff"},200);
	});
	
	$('#search-box').blur(function() { 
		$(this).animate({color:"#999"}, 200);
		$(this).animate({borderLeftColor:"#ccc",borderRightColor:"#ccc",borderTopColor:"#ccc",borderBottomColor:"#ccc",backgroundColor:"#f7f7f7"},200);
	});
	
	$(document).ready(function () {
		
		$('#player1').slideDown(1000);
		setTimeout("$('#player2').slideDown(1000)",500);
		setTimeout("$('#player3').slideDown(1000)",1000);
		setTimeout("$('#player4').slideDown(1000)",1500);
    });
	
	$('#players li').hover(
	function ()
	{

			$(this).animate({color:"#666"}, 400);
		
	},
		function ()
	{

			$(this).animate({color:"#999"}, 400);
		
	});
	
	$('#footer a').hover(
		function ()
	{
			$(this).animate({color:"#000"}, 100);
	},
		function ()
	{
		$(this).animate({color:"#999"}, 200);
	});
});


setTimeout("my_cross_fade(0)",7000);
	
var images_arr   = new Array(5);
images_arr[0] = 'images/home/design-usa-home.jpg';
images_arr[1] = 'images/home/pda-home.jpg';
images_arr[2] = 'images/home/h-dlw.jpg';
images_arr[3] = 'images/home/h2.jpg';
images_arr[4] = 'images/home/h4.jpg';
images_arr[5] = 'images/home/h5.jpg';
var target_arr   = new Array(5);
target_arr[0] = 'EXHIBITIONS/Design-USA/';
target_arr[1] = 'http://peoplesdesignaward.cooperhewitt.org/2009/';
target_arr[2] = 'EXHIBITIONS/Design-for-a-Living-World/';
target_arr[3] = 'visit';
target_arr[4] = 'http://events.cooperhewitt.org';
target_arr[5] = 'http://cooperhewittshop.org';

function my_cross_fade(k)
{
//alert(k);
if(k<images_arr.length-1)
{
	k = k+1;
} else {
	k = 0;
}

crossfade(document.getElementById('ad'), images_arr[k], '1', '');
document.getElementById('ad_href').href = target_arr[k];
setTimeout("my_cross_fade("+k+")",7000);

}