$(function() {
	setInterval( "slideSwitch()", 10000 );
	$("#Tiplist1").newsticker();
	$("#Tiplist2").newsticker();
	$("span.pipe:last").css("display", "none");
	
	$("img.splash_image").animate({ opacity: "0.5" }, 0);
	
	$("img.splash_image").hover(function(){
			$(this).animate({ opacity: "1" }, 350);
	},function(){
			$(this).animate({ opacity: "0.5" }, 350);
	});
	
});
			
function slideSwitch() {
	var $active1 = $('#thumb1 IMG.active');
	var $active2 = $('#thumb2 IMG.active');

	if ( $active1.length == 0 ) $active1 = $('#thumb1 IMG:last');
	if ( $active2.length == 0 ) $active2 = $('#thumb2 IMG:last');

	// use this to pull the images in the order they appear in the markup
	var $next1 =  $active1.next().length ? $active1.next()
		: $('#thumb1 IMG:first');
	
	var $next2 =  $active2.next().length ? $active2.next()
		: $('#thumb2 IMG:first');

	$active1.addClass('last-active');
	$active2.addClass('last-active');

	$next1.css({opacity: 0.0})
		.addClass('active')
		.animate({opacity: 1.0}, 1000, function() {
			$active1.removeClass('active last-active');
		});
	
	$next2.css({opacity: 0.0})
		.addClass('active')
		.animate({opacity: 1.0}, 1000, function() {
			$active2.removeClass('active last-active');
		});
	
}
	
