$('.list li a').stop().click(function() {
    var showref = $(this).attr('class');
    var activeref = $('.list li.active a').attr('class');
    
    if($(this).attr('class') != activeref){
        
        $('.explorer li.active img').stop().animate({
            width: "590px",
            left: '590px'
        }, 1000, function() {
            $(this).css('left', '-590px');
        });
        
        $('.explorer li.'+ showref +' img').stop().animate({
            width: "590px",
            left: '0'
        }, 1000);

        $('.list li.active').removeAttr('class');
        $('.explorer li.active').removeClass('active')
        $(this).parent().addClass('active');
        $('.explorer li.' + showref).addClass('active');
    }
    
});