var $j = jQuery;

$j().ready(function() {
	
	/* EFFECTS ON MENU */
	/*
        $j("ul.sf-menu").supersubs({ 
            delay: 10000,
            animation: {opacity:"show",height:"show"},
            speed: "fast",
            autoArrows:  false,
            dropShadows: false
        }).superfish();
        */
        $j("ul.sf-menu").supersubs({ 
            delay: 10000,
            animation: {opacity:"show",height:"show"},
            speed: "fast",
            autoArrows:  false,
            dropShadows: false
        })
        
        /* NOFLASH HOME NAVIGATION */
        $j('ul#alt_flash_navi').show();
        $j('ul#alt_flash_navi li').bind("mouseenter",function(){
		$j("span.phase").stop().animate({ opacity: 0}, 400);
		$j('li.x').removeClass('slider');
	});
	$j('li#hover1').bind("mouseenter",function(){
		$j('#phase1').stop().animate({ opacity: 1 }, 400 ).show();
		changePhase(1);
	});
	$j('li#hover2').bind("mouseenter",function(){
		$j('#phase2').stop().animate({ opacity: 1 }, 400 ).show();
		changePhase(2);
	});
	$j('li#hover3').bind("mouseenter",function(){
		$j('#phase3').stop().animate({ opacity: 1 }, 400 ).show();
		changePhase(3);
	});
	$j('li#hover4').bind("mouseenter",function(){
		$j('#phase4').stop().animate({ opacity: 1 }, 400 ).show();
		changePhase(4);
	});
	$j('li#hover5').bind("mouseenter",function(){
		$j('#phase5').stop().animate({ opacity: 1 }, 400 ).show();
		changePhase(5);
	});
	$j('li#hover6').bind("mouseenter",function(){
		$j('#phase6').stop().animate({ opacity: 1 }, 400 ).show();
		changePhase(6);
	});
	$j('li.x').bind("mouseenter",function(){
		$j(this).addClass('slider');
	});
        
        $j('.hoverable').hover(
		function() { $j(this).addClass('hovered');}, 
		function() { $j(this).removeClass('hovered'); });
});

function changePhase(id) {
/*	
	$j('#lifephasewizard').slideUp("slow").fadeTo(250, 1).slideDown("slow"); 
*/
	$j('#lifephasewizard').animate({ opacity: 0 }, 100 ).fadeTo(350, 1);
	var id2cat = {1:39, 2:40, 3:41, 4:42, 5:43, 6:44}

	$j.get('index.php', {type : '4713', catuid : id2cat[id] },
		function(data){
	  		$j('#lifephasewizard').html(data);
  		}
	);
}