$().ready(function() { var rPath = '/jsr_homepage/EN'; // tabs switching var mode = 1;//default tab mode function aClick(id,mode) { $('#tabCont3 div').html('
'); $('#tabCont3 div').load(rPath+'/switchtab', { id:id, mode:mode }, function() { }); } $('.tabholder div *').click(function() { if( $(this).attr('id') != mode ) { $('.tabholder *').removeClass('actTab'); mode = $(this).attr('id'); $(this).parent().addClass('actTab'); aClick( $(this).parents('.tabholder').attr('id'), mode); } }) });