///**
// * Add autoShow on mouseover option to buttons with menus
// * @copyright LustForge.com 2011
// * @author J.Lust
// * @version ExtJs 3.3.4
// */
//Ext.HoverButton = Ext.extend( Ext.Button, {
// 
//    // hide task properties and helpers
//    hideTask : null,
//    hideTaskMs : 250, // timeout in ms
//    hideTaskFn : function() {
//        if( this.hideTask !== null ) {
//            this.hideTask.cancel();
//        }
//        this.hideTask = new Ext.util.DelayedTask(this.hideMenu,this);
//        this.hideTask.delay( this.hideTaskMs );
//    },
// 
//    // extend init props
//    initComponent : function (  ) {
// 
//        // add hide/show, if this is a button with menu
//        var config = {}, menuConfig = {};
//        if( Ext.isDefined(this.initialConfig.menu) ) {
//            config = {
//                listeners : {
//                    menutriggerover : {
//                        fn: function(b) {
//                            //console.log('menutriggerOver');
//                            b.showMenu();
//                        },
//                        scope:this
//                    },
//                    menutriggerout : {
//                        fn: function(b) {
//                            //console.log('menutriggerOut');
//                            this.hideTaskFn();
//                        },
//                        scope:this
//                    }
//                }
//            };
//            // add listeners to see if user is over extended menu list
//            menuConfig = {
//                listeners : {
//                    // if mousing over menu list, disable timeout
//                    mouseover : {
//                        fn: function(b) {
//                            // cancel hide if they went away and came back
//                            if( this.hideTask !== null ) {
//                                //console.log('menu mouseOver');
//                                this.hideTask.cancel();
//                                this.hideTask = null;
//                            }
//                        },
//                        scope:this
//                    },
//                    // on mousing out of menu list, resume timeout
//                    mouseout: {
//                        fn: function(b) {
//                            //console.log('menu mouseOut');
//                            this.hideTaskFn();
//                        },
//                        scope:this
//                    }
//                }
//            };
// 
//            Ext.apply( this.menu, menuConfig );
//        }
// 
//        // apply config
//        Ext.apply(this, Ext.apply(this.initialConfig, config));
//        // call parent
//        Ext.HoverButton.superclass.initComponent.apply(this,arguments);
//    }
//});
//Ext.reg('hoverButton', Ext.HoverButton );


Ext.onReady(function(){
    Ext.create('Ext.toolbar.Toolbar', {
        height: 90,
        renderTo: 'menu',
        cls: 'big-text',
        border: false,
        defaults: {showSeparator: false},
        items: menudata
    });

    var rules = document.styleSheets[3].cssRules;
    for (var i = 0; i < rules.length; i++) {
        if (rules[i].selectorText == '.x-menu-body') {
            rules[i].style['background'] = 'none repeat scroll 0 0 #F0F0F0';
        }
    }
});

