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

	artistName = $('#splash ul li a img').attr('alt').substr(0,20);
	if(artistName.length<$('#splash ul li a img').attr('alt').length) artistName+='&nbsp;...';
	
	$('#nameLink').html(artistName);
	$('#splashLink').attr('href',$('#splash ul li a').attr('href'));
	$('#splashLink').attr('title',$('#splash ul li a img').attr('alt'));

	IE7 = (navigator.appVersion.indexOf("MSIE 7.")==-1) ? false : true;
	if(IE7) {
		$("#splash ul li").hide();
		myIndex = Math.floor(Math.random()*$("#splash ul li").size());
		
		$("#splash ul li:eq("+myIndex+")").show();
		myIndex++;

		artistName = $('#splash'+myIndex).find('a img').attr('alt').substr(0,20);
		if(artistName.length<$('#splash'+myIndex).find('a img').attr('alt').length) artistName+='&nbsp;...';
		
		$('#splashLink').html(artistName);
		$('#splashLink').attr('href',$('#splash'+myIndex).find('a').attr('href'));
		$('#splashLink').attr('title',$('#splash'+myIndex).find('a img').attr('alt'));
	} else {
			
		$("#splash").jCarouselLite({
				visible: 1,
				speed: 1000,
				auto:5000,
				vertical:true,
				afterEnd: function(currentFrame) {
				// alert(currentFrame[0].id);
				artistName = $('#'+currentFrame[0].id).find('a img').attr('alt').substr(0,20);
				if(artistName.length<$('#'+currentFrame[0].id).find('a img').attr('alt').length) artistName+='&nbsp;...';
				$('#nameLink').html(artistName);
				$('#splashLink').attr('href',$('#'+currentFrame[0].id).find('a').attr('href'));
				$('#splashLink').attr('title',$('#'+currentFrame[0].id).find('a img').attr('alt'));
			} 
		});
	}
});
