﻿//
Ext.namespace('Ext.ux.layout');
Ext.ux.layout.CardLayout = Ext.extend(Ext.layout.CardLayout, {
    setActiveItem : function(item)
    {
        item = this.container.getComponent(item);
        if(this.activeItem != item){
            if(this.activeItem){
                this.activeItem.hide();
            }
            // check if the beforehide method allowed to 
            // hide the current item
            if (this.activeItem && !this.activeItem.hidden) {
            	return;	
            }
            
            this.activeItem = item;
            item.show();
            this.layout();
        }
    }	
	
});