/*!
 * Ext JS Library 3.0.0
 * Copyright(c) 2006-2009 Ext JS, LLC
 * licensing@extjs.com
 * http://www.extjs.com/license
 */
Ext.onReady(function(){
    
    // basic tabs 2, built from existing content
    var tabs = new Ext.TabPanel({
        renderTo: 'details',
        width:590,
        activeTab: 0,
        frame:true,
        defaults:{autoHeight: true},
        items:[
			{contentEl:'charstats', title: 'Charakter Werte'},
            {contentEl:'stats', title: 'Statistik'},
            {contentEl:'fame', title: 'Ruhm'},
			{contentEl:'tribe', title: 'St&auml;mme'},
			{contentEl:'skilltree', title: 'Skilltree'},
			{contentEl:'map', title: 'Karte'}
			
        ]
    });

    var tabs2 = new Ext.TabPanel({

        renderTo: 'inventar',

        width:590,

        activeTab: 0,

        frame:true,

        defaults:{autoHeight: true},

        items:[
			{contentEl:'bag', title: 'Tasche'},
			{contentEl:'pet_animal1', title: 'Packtier1'},
			{contentEl:'pet_animal2', title: 'Packtier2'},
			{contentEl:'pet_animal3', title: 'Packtier3'},
			{contentEl:'pet_animal4', title: 'Reittier'},		
			{contentEl:'room', title: 'Appartment'},
			{contentEl:'item_in_store', title: 'Im Verkauf'}
        ]

    });
    
    

    /* second tabs built from JS
    var tabs2 = new Ext.TabPanel({
        renderTo: document.body,
        activeTab: 0,
        width:600,
        height:250,
        plain:true,
        defaults:{autoScroll: true},
        items:[{
                title: 'Normal Tab',
                html: "My content was added during construction."
            },{
                title: 'Ajax Tab 1',
                autoLoad:'ajax1.htm'
            },{
                title: 'Ajax Tab 2',
                autoLoad: {url: 'ajax2.htm', params: 'foo=bar&wtf=1'}
            },{
                title: 'Event Tab',
                listeners: {activate: handleActivate},
                html: "I am tab 4's content. I also have an event listener attached."
            },{
                title: 'Disabled Tab',
                disabled:true,
                html: "Can't see me cause I'm disabled"
            }
        ]
    });
	*/
    function handleActivate(tab){
        alert(tab.title + ' was activated.');
    }
});
