var linksArr = new Array();
$o(document).ready(function($){
	
	$('#splash ul li a img').each(function(){
		if($(this).attr('src')=='') $(this).parent().parent().remove();
	});
	$('#splashLink').html($('#splash ul li a img').attr('alt'));
	$('#splashLink').attr('href',$('#splash ul li a').attr('href'));

	IE7 = (navigator.appVersion.indexOf("MSIE 7.")==-1) ? false : true;
	if(IE7) {
		$("#splash ul li").hide();
		myIndex = Math.floor(Math.random()*3);
		$("#movingSquare ul li:eq("+myIndex+")").show();
		myIndex = Math.floor(Math.random()*5);
		
		$("#splash ul li:eq("+myIndex+")").show();
		myIndex++;
		$('#splashLink').html($('#splash'+myIndex).find('a img').attr('alt'));
		$('#splashLink').attr('href',$('#splash'+myIndex).find('a').attr('href'));
	} else {
		$("#movingSquare").jCarouselLite({
			visible: 1,
			speed: 700,
			auto:7800,
			vertical:false
		});
			
		$("#splash").jCarouselLite({
				visible: 1,
				speed: 1000,
				auto:5000,
				vertical:true,
				afterEnd: function(currentFrame) {
				// alert(currentFrame[0].id);
				$('#splashLink').html($('#'+currentFrame[0].id).find('a img').attr('alt'));
				$('#splashLink').attr('href',$('#'+currentFrame[0].id).find('a').attr('href'));
			} 
		});
	}
});
