jQuery(document).ready(function() {
  
  if(typeof is_main == 'undefined') {
    //min-height for #main .bc
    jQuery("#main .bc").css('min-height', jQuery("#sdb-lt").height()-45);
  } else {
    //set equal height for #sdb-lt .b1, #main .bc, #main .b3
    var objcts = ("#sdb-lt .b1, #main .bc, #main .b3");
    var hp = 0;
    jQuery(objcts).each(function() {
      var h = jQuery(this).height();
      if(h > hp) hp = h;
    })
    jQuery(objcts).css('height', hp-9); 
  }
});

function jqtabs(a,b,c) {
  jQuery(a+b).click(function(){
    var tid = jQuery(this).attr('id');
    //change status and style menu
    jQuery(a+b+':not(#'+tid+')').removeClass(c);
    jQuery('#'+tid).addClass(c);
    //display selected division, hide others
    jQuery(a+' div.jqtc:not(div.'+tid+')').css("display", "none");
    jQuery(a+' div.'+tid).fadeIn();
    return false;
  });
}
