function slideSwitch() {
//find active    
	var $active = $('#pane li.active');
//if last in list, start over at 0
    if ( $active.length == 0 ) $active = $('#pane li:last');
//find next    
	var $next =  $active.next().length ? $active.next()
        : $('#pane li:first');
//fadeIn page Corner
	$("#btmCorner").fadeIn(10)
//wait	
	.animate({opacity: 1.0}, 150)
//fade out page corner	
	.fadeOut(10, function(){
//show half of last active page	after page corner fades out
		$active.removeClass("active");
		$active.addClass('half');	
		$("#halfPage").fadeIn(10, function(){})	
		.animate({opacity: 1.0}, 100)
		.fadeOut(10, function(){
			$active.removeClass('half');
			$next.addClass('active');
			$("#almostPage").fadeIn(10)
			.animate({opacity: 1.0}, 100)
			.fadeOut(10);
			}		
		);
		
	});    
}

$(function() {
	$(".keyframe").hide();
    setInterval( "slideSwitch()", 5000 );
});