tabs
var mydivs=new Array('.main-panel','.main-panel2');
function opcl(arr, e){
if ($(e).css('display') == 'none'){
for(var i in arr){
$(arr[i]).hide();
}
$(e).show();
}
}
<a href="#" class="view active" onclick="opcl(mydivs,'.main-catalog'); return false;"></a>