$(document).ready(function() {

	$('.panelcontainer_right').css('visibility','visible');
    // Slide show
    $('ul#imgshow').innerfade(
     {
        //speed = fade in speed
        speed: 2000,
         //timeout = time between fades
        timeout: 10000,
         // type can be random if you want in any order
        type: 'sequence',
         //pretty obvious :)
        containerheight: 'auto'
    });

	//Industry
    $('#industry').click(function(){doSwap(1)});
    $('#goback1').click(function(){doGoBack(1)});

    //Role
    $('#role').click(function(){doSwap(2)});
    $('#goback2').click(function(){doGoBack(2)});

     //Application
    $('#application').click(function(){doSwap(3)});
    $('#goback3').click(function(){doGoBack(3)});


});

 function doSwap(panelno)
 {

    $('#panel'+panelno).css('height',$('.jqueryexplanation').css('height'));
    $('.slider').fadeOut('slow',function()
    {
        $('#panel'+panelno).fadeIn('slow',function()
        {
             $('#panel'+panelno).css('filter', 'alpha(opacity='+(90)+')');
             $('#panel'+panelno).css('opacity', 0.9);

        });
    });
 }
function doGoBack(panelno)
{

   $('#panel'+panelno).fadeOut('slow',function()
   {
       
        $('#panel'+panelno).css('filter', 'alpha(opacity='+(0)+')');
        $('#panel'+panelno).css('opacity', 0);
       $('.slider').fadeIn('slow',function(){});
   });



}
		
