/**
 * 
 * All content on this website (including text, images, source
 * code and any other original works), unless otherwise noted,
 * is licensed under a Creative Commons License.
 * 
 * http://creativecommons.org/licenses/by-nc-sa/2.5/
 * 
 * Copyright (C) 2004-2010 Open-Xchange, Inc.
 * Mail: info@open-xchange.com 
 * 
 * @author Alexander Quast <alexander.quast@open-xchange.com>
 * 
 */

/*jslint bitwise: false, nomen: false, onevar: false, plusplus: false, regexp: false, white: true, browser: true, devel: true, evil: true, forin: true, undef: true, eqeqeq: true, immed: true */

/*global ox, jQuery, $, equals, register, triggerEvent, menuswitchMailView */
ox.gui.initToolBarNewWindow = function () {
    
    ox.widgets = {}; 
    
    var $m = ox.gui.initToolBar();
    
    // root node for menu
    var root = $("#window_toolbar_container")[0];
    
    /*
     * Add top-level view controller (containing all toolbars)
     */
    var control = ox.widgets.toolBar.viewControl = new ox.gui.ViewControl("toolbar-view-control").
        removeCSSClass("oxStretch").
        setParentDOMNode(root).
        addTo(ox.desktop);
    
    return $m;
};

