﻿/* ********** PaneSwitch ********** */

$(document).ready(function() {
      
    // ##### Handling Panes
    
    var LeftPane = $('#dnn_LeftPane');
    var RightPane = $('#dnn_RightPane');
    var TopPane = $('#dnn_TopPane');
    var BottomPane = $('#dnn_BottomPane');
    
    var Main = $('#main');

    if (LeftPane.is(':empty'))
    {
        Main.addClass("hidecol1");
        $('#col1').hide();
    }
    
    if ( RightPane.is(':empty') )
    {
        Main.addClass("hidecol2");
        $('#col2').hide();
    }

    if (LeftPane.is(':empty') && RightPane.is(':empty'))
    {
        Main.removeClass();
        Main.addClass("hideboth");
        $('#col1').hide();
        $('#col2').hide();
    }

    if (TopPane.is(':empty')) $('#Top').hide();
    if (BottomPane.is(':empty')) $('#Bottom').hide();
    
    // ##### Handling ControlPanel
    
    $('#dnn_ControlPanel:empty').remove();

    // ##### Handling Transparency in IE5.5 and IE6
    
    // $(document).pngFix();    
    
});
