$(document).ready(function(){
    $('#Forums .Tabs a').click(function(){
        $('#Forums .Tabs a').removeClass('This');
        $(this).addClass('This');
        $('#Forums .async').css('opacity', 0.5);
        Load( $('#Forums .async'), $(this).attr('href') );
        return false;
    });
    
    // autoload
    Load($('#Forums .async'), 'lg,forum.html');
});

function Load( obj, url ) {
    $.ajax({
      type: 'GET',
      url:  url,
      cache: false,
      async: false,
      dataType: 'html',
      success: function(html){
         if ( obj != null ) {
            $('#Forums .async').css('opacity', 1.0);
            $(obj).html(html);
         }
         /* else {
             alert(html);
         }*/
         
      },
      error: function(){
          $(obj).text('Load('+ obj +','+ url +'):Error');
      }
    });
}
