$(document).ready(function() {
 $('#sc_0').click(function() {
 $('#sc-results-top span').removeClass('ac');
 $('#sc_0').addClass('ac');
   $('#sc_all').fadeIn(500);
   $('#sc_bf3').fadeOut(500);
   $('#sc_cod4').fadeOut(500);
   $('#sc_bf2').fadeOut(500);
   $('#sc_dc').fadeOut(500);
   $('#setheight').animate({ 
    height:$('#sc_all').height()+"px" 
   }, 500 );
});

 $('#sc_1').click(function() {
 $('#sc-results-top span').removeClass('ac');
 $('#sc_1').addClass('ac');
   $('#sc_all').fadeOut(500);
   $('#sc_bf3').fadeIn(500);
   $('#sc_cod4').fadeOut(500);
   $('#sc_bf2').fadeOut(500);
   $('#sc_dc').fadeOut(500);
   $('#setheight').animate({ 
    height:$('#sc_bf3').height()+"px" 
   }, 500 );
});

 $('#sc_3').click(function() {
 $('#sc-results-top span').removeClass('ac');
 $('#sc_3').addClass('ac');
   $('#sc_all').fadeOut(500);
   $('#sc_bf3').fadeOut(500);
   $('#sc_cod4').fadeIn(500);
   $('#sc_bf2').fadeOut(500);
   $('#sc_dc').fadeOut(500);
   $('#setheight').animate({ 
    height:$('#sc_cod4').height()+"px" 
   }, 500 );
});

 $('#sc_6').click(function() {
 $('#sc-results-top span').removeClass('ac');
 $('#sc_6').addClass('ac');
   $('#sc_all').fadeOut(500);
   $('#sc_bf3').fadeOut(500);
   $('#sc_cod4').fadeOut(500);
   $('#sc_bf2').fadeIn(500);
   $('#sc_dc').fadeOut(500);
   $('#setheight').animate({ 
    height:$('#sc_bf2').height()+"px" 
   }, 500 );
});

 $('#sc_7').click(function() {
 $('#sc-results-top span').removeClass('ac');
 $('#sc_7').addClass('ac');
   $('#sc_all').fadeOut(500);
   $('#sc_bf3').fadeOut(500);
   $('#sc_cod4').fadeOut(500);
   $('#sc_bf2').fadeOut(500);
   $('#sc_dc').fadeIn(500);
   $('#setheight').animate({ 
    height:$('#sc_dc').height()+"px" 
   }, 500 );
});

 $('#setheight').height($('#sc_all').height());

});

