fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [13038] add library for layouts


From: Sigurd Nes
Subject: [Fmsystem-commits] [13038] add library for layouts
Date: Mon, 20 Apr 2015 12:22:09 +0000

Revision: 13038
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13038
Author:   sigurdne
Date:     2015-04-20 12:22:08 +0000 (Mon, 20 Apr 2015)
Log Message:
-----------
add library for layouts

Added Paths:
-----------
    branches/dev-syncromind/phpgwapi/js/layout/
    branches/dev-syncromind/phpgwapi/js/layout/LICENSE.txt
    branches/dev-syncromind/phpgwapi/js/layout/callbacks/
    
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.callbacks-latest.js
    
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.callbacks.min-latest.js
    
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.pseudoClose.js
    
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.pseudoClose.min.js
    
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizeDataTable.js
    
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizeDataTable.min.js
    
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizePaneAccordions.js
    
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizePaneAccordions.min.js
    
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizeTabLayout.js
    
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizeTabLayout.min.js
    branches/dev-syncromind/phpgwapi/js/layout/jquery.layout.js
    branches/dev-syncromind/phpgwapi/js/layout/jquery.layout.min.js
    branches/dev-syncromind/phpgwapi/js/layout/jquery.layout_and_plugins.js
    branches/dev-syncromind/phpgwapi/js/layout/jquery.layout_and_plugins.min.js
    branches/dev-syncromind/phpgwapi/js/layout/layout-default.css
    branches/dev-syncromind/phpgwapi/js/layout/plugins/
    
branches/dev-syncromind/phpgwapi/js/layout/plugins/jquery.layout.browserZoom.js
    branches/dev-syncromind/phpgwapi/js/layout/plugins/jquery.layout.buttons.js
    
branches/dev-syncromind/phpgwapi/js/layout/plugins/jquery.layout.slideOffscreen.js
    
branches/dev-syncromind/phpgwapi/js/layout/plugins/jquery.layout.slideOffscreen.min.js
    branches/dev-syncromind/phpgwapi/js/layout/plugins/jquery.layout.state.js

Added: branches/dev-syncromind/phpgwapi/js/layout/LICENSE.txt
===================================================================
--- branches/dev-syncromind/phpgwapi/js/layout/LICENSE.txt                      
        (rev 0)
+++ branches/dev-syncromind/phpgwapi/js/layout/LICENSE.txt      2015-04-20 
12:22:08 UTC (rev 13038)
@@ -0,0 +1,669 @@
+
+                            UI Layout
+             The Ultimate Page Layout Plugin for jQuery
+
+  Copyright (c) 2014  Kevin Dalman
+
+  Based on work by Fabrizio Balliano (http://www.fabrizioballiano.net)
+
+  Download:      http://layout.jquery-dev.com/download.cfm
+  Documentation: http://layout.jquery-dev.com/documentation.cfm
+  Support:       http://groups.google.com/group/jquery-ui-layout
+  Email Contact: address@hidden
+
+=============================================================================
+
+                         LICENSE SUMMARY
+
+Dual licensed under the GNU GPL (http://www.gnu.org/licenses/gpl.html)
+and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+=============================================================================
+
+                      THE MIT LICENSE (MIT)
+
+Permission is hereby granted, free of charge, to any person obtaining a 
+copy of this software and associated documentation files (the "Software"), 
+to deal in the Software without restriction, including without limitation 
+the rights to use, copy, modify, merge, publish, distribute, sublicense, 
+and/or sell copies of the Software, and to permit persons to whom the 
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included 
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 
+IN THE SOFTWARE.
+
+=============================================================================
+
+                    GNU GENERAL PUBLIC LICENSE
+                      Version 3, 29 June 2007
+
+                              Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.


Property changes on: branches/dev-syncromind/phpgwapi/js/layout/LICENSE.txt
___________________________________________________________________
Added: svn:executable
   + *

Added: 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.callbacks-latest.js
===================================================================
--- 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.callbacks-latest.js
                              (rev 0)
+++ 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.callbacks-latest.js
      2015-04-20 12:22:08 UTC (rev 13038)
@@ -0,0 +1,149 @@
+/**
+ *     UI Layout Callbacks Package
+ *
+ *     NOTE: These callbacks must load AFTER the jquery.layout...js library 
loads
+ *
+ *     Updated:        2011-07-10
+ *     Author:         Kevin Dalman (address@hidden)
+ */
+;(function ($) {
+
+// make sure the callbacks branch exists
+$.layout.callbacks = $.layout.callbacks || {};
+
+// make sure $.layout.defaults exists (backward compatibility)
+$.layout.defaults = $.layout.defaults || { north:{}, south:{}, east:{}, 
west:{}, center:{} };
+
+
+/**
+ *     UI Layout Callback: resizePaneAccordions
+ *
+ *     This callback is used when a layout-pane contains 1 or more accordions
+ *     - whether the accordion a child of the pane or is nested within other 
elements
+ *     Assign this callback to the pane.onresize event:
+ *
+ *     SAMPLE:
+ *     $("#elem").tabs({ show: $.layout.callbacks.resizePaneAccordions });
+ *     $("body").layout({ center__onresize: 
$.layout.callbacks.resizePaneAccordions });
+ *
+ *     Version:        1.0 - 2011-07-10
+ *     Author:         Kevin Dalman (address@hidden)
+ */
+$.layout.callbacks.resizePaneAccordions = function (x, ui) {
+       // may be called EITHER from layout-pane.onresize OR tabs.show
+       var $P = ui.jquery ? ui : $(ui.panel);
+       // find all VISIBLE accordions inside this pane and resize them
+       $P.find(".ui-accordion:visible").each(function(){
+               var $E = $(this);
+               if ($E.data("accordion"))
+                       $E.accordion("resize");
+       });
+};
+
+
+/**
+ *     UI Layout Callback: resizeTabLayout
+ *
+ *     Requires Layout 1.3.0.rc29.15 or later
+ *
+ *     This callback is used when a tab-panel is the container for a layout
+ *     The tab-layout can be initialized either before or after the tabs are 
created
+ *     Assign this callback to the tabs.show event:
+ *     - if the layout HAS been fully initialized already, it will be resized
+ *     - if the layout has NOT fully initialized, it will attempt to do so
+ *             - if it cannot initialize, it will try again next time the tab 
is accessed
+ *             - it also looks for ANY visible layout *inside* teh tab and 
resize/init it
+ *
+ *     SAMPLE:
+ *     $("#elem").tabs({ show: $.layout.callbacks.resizeTabLayout });
+ *     $("body").layout({ center__onresize: $.layout.callbacks.resizeTabLayout 
});
+ *
+ *     Version:        1.2 - 2012-01-13
+ *     Author:         Kevin Dalman (address@hidden)
+ */
+$.layout.callbacks.resizeTabLayout = function (x, ui) {
+       // may be called EITHER from layout-pane.onresize OR tabs.show
+       var $P = ui.jquery ? ui : $(ui.panel);
+       // find all VISIBLE layouts inside this pane/panel and resize them
+       
$P.filter(":visible").find(".ui-layout-container:visible").andSelf().each(function(){
+               var layout = $(this).data("layout");
+               if (layout) {
+                       layout.options.resizeWithWindow = false; // set option 
just in case not already set
+                       layout.resizeAll();
+               }
+       });
+};
+
+
+/**
+ *     UI Layout Callback: pseudoClose
+ *
+ *     Prevent panes from closing completely so that an iframes/objects 
+ *     does not reload/refresh when pane 'opens' again.
+ *     This callback preventing a normal 'close' and instead resizes the pane 
as small as possible
+ *
+ *     SAMPLE:
+ *     pseudoClose:    { selector: "#myObject" }
+ *     south__onclose: $.layout.callbacks.pseudoClose
+ *
+ *     Version:        1.1 - 2012-03-10
+ *     Author:         Kevin Dalman (address@hidden)
+ */
+// init default pseudoClose-options when library loads
+for (var i=0; i<4; i++) {
+       $.layout.defaults[ ["north","south","east","west"][i] ].pseudoClose = {
+               hideObject:     "iframe" // find and hide this when 'closed' - 
usually: "", "pane", "iframe" or "object"
+       ,       skipIE:         false   // can skip IE for iframes that do not 
contain media objects
+       }
+};
+
+$.layout.callbacks.pseudoClose = function (pane, $Pane, paneState, 
paneOptions) {
+       // if pane is 'hiding', then allow that to happen normally
+       if (paneState.isHiding) return true;
+
+       var fN  = "pseudoClose"
+       ,       o       = paneOptions
+       ,       oFn     = $.extend({}, $.layout.defaults[pane][fN], o[fN]) // 
COPY the pseudoClose options
+       ;
+       if (oFn.skipIE && $.layout.browser.msie) return true; // ALLOW close
+       if (oFn.hideObject === "object") oFn.hideObject += ",embed"; // 
'embedded objects' are often <EMBED> tags
+
+       setTimeout(function(){
+               var     sel             = oFn.hideObject
+               ,       $Obj    = sel === "pane" || $Pane[0].tagName === 
sel.toUpperCase() ? $Pane : $Pane.find(sel)
+               ,       layout  = $Pane.data("parentLayout")
+               ,       s               = layout.state[pane]    // TEMP until 
paneState is *no longer* a 'copy' (RC29.15)
+               ,       d               = s[fN] || {}
+               ,       siz             = 'size'
+               ,       min             = 'minSize'
+               ,       rsz             = "resizable"
+               ,       vis             = "visibility"
+               ,       v               = "visible"
+               ,       h               = "hidden"
+               ;
+               if (d[siz]) {
+                       if (d[rsz]) layout.enableResizable(pane); // RE-ENABLE 
manual-resizing
+                       o[min] = d[min];                                // 
RESET minSize option
+                       layout.setSizeLimits(pane);             // REFRESH 
state.minSize with new option
+                       layout.sizePane(pane, d[siz]);  // RESET to last-size
+                       d = {};                                                 
// CLEAR data logic
+                       $Obj.css(vis,h).css(vis,v);             // fix 
visibility bug
+               }
+               else {
+                       d[siz] = s[siz];                                // SAVE 
current-size
+                       d[min] = o[min];                                // ditto
+                       o[min] = 0;                                             
// SET option so pane shrinks as small as possible
+                       d[rsz] = o[rsz];                                // SAVE 
resizable option
+                       layout.disableResizable(pane);  // DISABLE 
manual-resizing while pseudo-closed
+                       layout.setSizeLimits(pane);             // REFRESH 
state.minSize with new option
+                       layout.sizePane(pane, s[min]);  // SIZE to minimum-size
+                       $Obj.css(vis,h);                                // HIDE 
pane or object (only if hideObject is set & exists)
+               }
+               s[fN] = d; // save data
+       }, 50);
+
+       return false; // CANCEL normal 'close'
+};
+
+
+})( jQuery );
\ No newline at end of file


Property changes on: 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.callbacks-latest.js
___________________________________________________________________
Added: svn:executable
   + *

Added: 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.callbacks.min-latest.js
===================================================================
--- 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.callbacks.min-latest.js
                          (rev 0)
+++ 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.callbacks.min-latest.js
  2015-04-20 12:22:08 UTC (rev 13038)
@@ -0,0 +1,11 @@
+/**
+ *     UI Layout Callbacks Package
+ *
+ *     NOTE: These callbacks must load AFTER the jquery.layout...js library 
loads
+ *
+ *     Updated:        2011-07-10
+ *     Author:         Kevin Dalman (address@hidden)
+ */
+;(function(b){var 
c=b.layout;if(!c.callbacks)c.callbacks={};if(!c.defaults)c.defaults={north:{},south:{},east:{},west:{},center:{}};c.callbacks.resizePaneAccordions=function(d,a){(a.jquery?a:b(a.panel)).find(".ui-accordion:visible").each(function(){var
 
a=b(this);a.data("accordion")&&a.accordion("resize")})};c.callbacks.resizeTabLayout=function(d,a){(a.jquery?a:b(a.panel)).filter(":visible").find(".ui-layout-container:visible").andSelf().each(function(){var
 a=b(this).data("layout");a&&a.resizeAll()})};
+for(var 
i=0;i<4;i++)c.defaults[["north","south","east","west"][i]].pseudoClose={hideObject:"iframe",skipIE:!1};c.callbacks.pseudoClose=function(d,a,c,f){var
 
g=b.extend({},b.layout.defaults[d].pseudoClose,f.pseudoClose);if(g.skipIE&&b.layout.browser.msie)return!0;g.hideObject==="object"&&(g.hideObject+=",embed");setTimeout(function(){var
 
c=g.hideObject,c=c==="pane"||a[0].tagName===c.toUpperCase()?a:a.find(c),b=a.data("parentLayout"),h=b.state[d],e=h.pseudoClose||{};e.size?(e.resizable&&b.enableResizable(d),
+f.minSize=e.minSize,b.setSizeLimits(d),b.sizePane(d,e.size),e={},c.css("visibility","hidden").css("visibility","visible")):(e.size=h.size,e.minSize=f.minSize,f.minSize=0,e.resizable=f.resizable,b.disableResizable(d),b.setSizeLimits(d),b.sizePane(d,h.minSize),c.css("visibility","hidden"));h.pseudoClose=e},50);return!1}})(jQuery);
\ No newline at end of file


Property changes on: 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.callbacks.min-latest.js
___________________________________________________________________
Added: svn:executable
   + *

Added: 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.pseudoClose.js
===================================================================
--- 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.pseudoClose.js
                           (rev 0)
+++ 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.pseudoClose.js
   2015-04-20 12:22:08 UTC (rev 13038)
@@ -0,0 +1,79 @@
+/**
+ *     UI Layout Callback: pseudoClose
+ *
+ *     Prevent panes from closing completely so that an iframes/objects 
+ *     does not reload/refresh when pane 'opens' again.
+ *     This callback preventing a normal 'close' and instead resizes the pane 
as small as possible
+ *
+ *     SAMPLE:
+ *     pseudoClose:    { selector: "#myObject" }
+ *     south__onclose: $.layout.callbacks.pseudoClose
+ *
+ *     Version:        1.1 - 2012-03-10
+ *     Author:         Kevin Dalman (address@hidden)
+ */
+;(function ($) {
+
+// make sure the callbacks branch exists
+$.layout.callbacks = $.layout.callbacks || {};
+
+// make sure $.layout.defaults exists (backward compatibility)
+$.layout.defaults = $.layout.defaults || { north:{}, south:{}, east:{}, 
west:{}, center:{} };
+
+
+// init default pseudoClose-options when library loads
+for (var i=0; i<4; i++) {
+       $.layout.defaults[ ["north","south","east","west"][i] ].pseudoClose = {
+               hideObject:     "iframe" // find and hide this when 'closed' - 
usually: "", "pane", "iframe" or "object"
+       ,       skipIE:         false   // can skip IE for iframes that do not 
contain media objects
+       }
+};
+
+$.layout.callbacks.pseudoClose = function (pane, $Pane, paneState, 
paneOptions) {
+       // if pane is 'hiding', then allow that to happen normally
+       if (paneState.isHiding) return true;
+
+       var fN  = "pseudoClose"
+       ,       o       = paneOptions
+       ,       oFn     = $.extend({}, $.layout.defaults[pane][fN], o[fN]) // 
COPY the pseudoClose options
+       ;
+       if (oFn.skipIE && $.layout.browser.msie) return true; // ALLOW close
+       if (oFn.hideObject === "object") oFn.hideObject += ",embed"; // 
'embedded objects' are often <EMBED> tags
+
+       setTimeout(function(){
+               var     sel             = oFn.hideObject
+               ,       $Obj    = sel === "pane" || $Pane[0].tagName === 
sel.toUpperCase() ? $Pane : $Pane.find(sel)
+               ,       layout  = $Pane.data("parentLayout")
+               ,       s               = layout.state[pane]    // TEMP until 
paneState is *no longer* a 'copy' (RC29.15)
+               ,       d               = s[fN] || {}
+               ,       siz             = 'size'
+               ,       min             = 'minSize'
+               ,       rsz             = "resizable"
+               ,       vis             = "visibility"
+               ,       v               = "visible"
+               ,       h               = "hidden"
+               ;
+               if (d[siz]) {
+                       if (d[rsz]) layout.enableResizable(pane); // RE-ENABLE 
manual-resizing
+                       o[min] = d[min];                                // 
RESET minSize option
+                       layout.setSizeLimits(pane);             // REFRESH 
state.minSize with new option
+                       layout.sizePane(pane, d[siz]);  // RESET to last-size
+                       d = {};                                                 
// CLEAR data logic
+                       $Obj.css(vis,h).css(vis,v);             // fix 
visibility bug
+               }
+               else {
+                       d[siz] = s[siz];                                // SAVE 
current-size
+                       d[min] = o[min];                                // ditto
+                       o[min] = 0;                                             
// SET option so pane shrinks as small as possible
+                       d[rsz] = o[rsz];                                // SAVE 
resizable option
+                       layout.disableResizable(pane);  // DISABLE 
manual-resizing while pseudo-closed
+                       layout.setSizeLimits(pane);             // REFRESH 
state.minSize with new option
+                       layout.sizePane(pane, s[min]);  // SIZE to minimum-size
+                       $Obj.css(vis,h);                                // HIDE 
pane or object (only if hideObject is set & exists)
+               }
+               s[fN] = d; // save data
+       }, 50);
+
+       return false; // CANCEL normal 'close'
+};
+})( jQuery );
\ No newline at end of file


Property changes on: 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.pseudoClose.js
___________________________________________________________________
Added: svn:executable
   + *

Added: 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.pseudoClose.min.js
===================================================================
--- 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.pseudoClose.min.js
                               (rev 0)
+++ 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.pseudoClose.min.js
       2015-04-20 12:22:08 UTC (rev 13038)
@@ -0,0 +1,13 @@
+/**
+ *     UI Layout Callback: pseudoClose
+ *     Version:        1.1 - 2012-03-10
+ *     Author:         Kevin Dalman (address@hidden)
+ */
+(function(i){var 
a=i.layout;a.callbacks||(a.callbacks={});a.defaults||(a.defaults={north:{},south:{},east:{},west:{},center:{}});
+for(var 
b=0;4>b;b++)a.defaults[["north","south","east","west"][b]].pseudoClose={hideObject:"iframe",skipIE:!1};
+a.callbacks.pseudoClose=function(d,a,b,g){if(b.isHiding)return true;var 
h=i.extend({},i.layout.defaults[d].pseudoClose,g.pseudoClose);
+if(h.skipIE&&i.layout.browser.msie)return 
true;if(h.hideObject==="object")h.hideObject=h.hideObject+",embed";
+setTimeout(function(){var 
f=h.hideObject,f=f==="pane"||a[0].tagName===f.toUpperCase()?a:a.find(f),e=a.data("parentLayout"),b=e.state[d],c=b.pseudoClose||{};
+if(c.size){c.resizable&&e.enableResizable(d);g.minSize=c.minSize;e.setSizeLimits(d);e.sizePane(d,c.size);c={};f.css("visibility","hidden").css("visibility","visible")}
+else{c.size=b.size;c.minSize=g.minSize;g.minSize=0;c.resizable=g.resizable;e.disableResizable(d);e.setSizeLimits(d);e.sizePane(d,b.minSize);f.css("visibility","hidden")}
+b.pseudoClose=c},50);return false}})(jQuery);
\ No newline at end of file


Property changes on: 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.pseudoClose.min.js
___________________________________________________________________
Added: svn:executable
   + *

Added: 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizeDataTable.js
===================================================================
--- 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizeDataTable.js
                               (rev 0)
+++ 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizeDataTable.js
       2015-04-20 12:22:08 UTC (rev 13038)
@@ -0,0 +1,34 @@
+/**
+*      UI Layout Callback: resizeDataTables
+*
+*      DataTables plugin homepage: http://datatables.net
+*
+*      This callback is used when a layout-pane contains 1 or more DataTable 
objects:
+*      - when the DataTable is a 'child' of the pane; or
+*      - when the DataTable is a 'descendant' of the pane - ie, inside other 
elements
+*
+*      Assign this callback to the pane.onresize event.
+*      If the layout is inside a tab-panel, _also_ bind to tabs.show()
+*
+*      SAMPLE:
+*      $("#elem").tabs({ show: $.layout.callbacks.resizeDataTables });
+*      $("body").layout({ center__onresize: 
$.layout.callbacks.resizeDataTables });
+*
+*      Version:        1.0 - 2012-07-06
+*      Author:         Robert Brower (address@hidden)
+*      @preserve       jquery.layout.resizeDataTables-1.0.js
+*/
+;(function ($) {
+       $.layout.callbacks.resizeDataTables = function (x, ui) {
+               // may be called EITHER from layout-pane.onresize OR tabs.show
+               var oPane = ui.jquery ? ui[0] : ui.panel;
+               // cannot resize if the pane is currently closed or hidden
+               if ( !$(oPane).is(":visible") ) return;
+               // find all data tables inside this pane and resize them
+               $( $.fn.dataTable.fnTables(true) ).each(function (i, table) {
+                       if ($.contains( oPane, table )) {
+                               $(table).dataTable().fnAdjustColumnSizing();
+                       }
+               });
+       };
+})( jQuery );
\ No newline at end of file


Property changes on: 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizeDataTable.js
___________________________________________________________________
Added: svn:executable
   + *

Added: 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizeDataTable.min.js
===================================================================
--- 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizeDataTable.min.js
                           (rev 0)
+++ 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizeDataTable.min.js
   2015-04-20 12:22:08 UTC (rev 13038)
@@ -0,0 +1,21 @@
+/**
+*      UI Layout Callback: resizeDataTables
+*
+*      DataTables plugin homepage: http://datatables.net
+*
+*      This callback is used when a layout-pane contains 1 or more DataTable 
objects:
+*      - when the DataTable is a 'child' of the pane; or
+*      - when the DataTable is a 'descendant' of the pane - ie, inside other 
elements
+*
+*      Assign this callback to the pane.onresize event.
+*      If the layout is inside a tab-panel, _also_ bind to tabs.show()
+*
+*      SAMPLE:
+*      $("#elem").tabs({ show: $.layout.callbacks.resizeDataTables });
+*      $("body").layout({ center__onresize: 
$.layout.callbacks.resizeDataTables });
+*
+*      Version:        1.0 - 2012-07-06
+*      Author:         Robert Brower (address@hidden)
+*      @preserve       jquery.layout.resizeDataTables-1.0.js
+*/
+(function(a){a.layout.callbacks.resizeDataTables=function(e,b){var 
c=b.jquery?b[0]:b.panel;a(c).is(":visible")&&a(a.fn.dataTable.fnTables(!0)).each(function(b,d){a.contains(c,d)&&a(d).dataTable().fnAdjustColumnSizing()})}})(jQuery);
\ No newline at end of file


Property changes on: 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizeDataTable.min.js
___________________________________________________________________
Added: svn:executable
   + *

Added: 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizePaneAccordions.js
===================================================================
--- 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizePaneAccordions.js
                          (rev 0)
+++ 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizePaneAccordions.js
  2015-04-20 12:22:08 UTC (rev 13038)
@@ -0,0 +1,34 @@
+/**
+ *     UI Layout Callback: resizePaneAccordions
+ *
+ *     This callback is used when a layout-pane contains 1 or more accordions
+ *     - whether the accordion a child of the pane or is nested within other 
elements
+ *     Assign this callback to the pane.onresize event:
+ *
+ *     SAMPLE:
+ *     < jQuery UI 1.9: $("#elem").tabs({ show: 
$.layout.callbacks.resizePaneAccordions });
+ *     > jQuery UI 1.9: $("#elem").tabs({ activate: 
$.layout.callbacks.resizePaneAccordions });
+ *     $("body").layout({ center__onresize: 
$.layout.callbacks.resizePaneAccordions });
+ *
+ *     Version:        1.2 - 2013-01-12
+ *     Author:         Kevin Dalman (address@hidden)
+ */
+;(function ($) {
+var _ = $.layout;
+
+// make sure the callbacks branch exists
+if (!_.callbacks) _.callbacks = {};
+
+_.callbacks.resizePaneAccordions = function (x, ui) {
+       // may be called EITHER from layout-pane.onresize OR tabs.show
+       var $P = ui.jquery ? ui : $(ui.newPanel || ui.panel);
+       // find all VISIBLE accordions inside this pane and resize them
+       $P.find(".ui-accordion:visible").each(function(){
+               var $E = $(this);
+               if ($E.data("accordion"))               // jQuery < 1.9
+                       $E.accordion("resize");
+               if ($E.data("ui-accordion"))    // jQuery >= 1.9
+                       $E.accordion("refresh");
+       });
+};
+})( jQuery );
\ No newline at end of file


Property changes on: 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizePaneAccordions.js
___________________________________________________________________
Added: svn:executable
   + *

Added: 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizePaneAccordions.min.js
===================================================================
--- 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizePaneAccordions.min.js
                              (rev 0)
+++ 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizePaneAccordions.min.js
      2015-04-20 12:22:08 UTC (rev 13038)
@@ -0,0 +1,16 @@
+/**
+ *     UI Layout Callback: resizePaneAccordions
+ *
+ *     This callback is used when a layout-pane contains 1 or more accordions
+ *     - whether the accordion a child of the pane or is nested within other 
elements
+ *     Assign this callback to the pane.onresize event:
+ *
+ *     SAMPLE:
+ *     < jQuery UI 1.9: $("#elem").tabs({ show: 
$.layout.callbacks.resizePaneAccordions });
+ *     > jQuery UI 1.9: $("#elem").tabs({ activate: 
$.layout.callbacks.resizePaneAccordions });
+ *     $("body").layout({ center__onresize: 
$.layout.callbacks.resizePaneAccordions });
+ *
+ *     Version:        1.2 - 2013-01-12
+ *     Author:         Kevin Dalman (address@hidden)
+ */
+(function(c){var 
a=c.layout;a.callbacks||(a.callbacks={});a.callbacks.resizePaneAccordions=function(a,b){(b.jquery?b:c(b.newPanel||b.panel)).find(".ui-accordion:visible").each(function(){var
 
a=c(this);a.data("accordion")&&a.accordion("resize");a.data("ui-accordion")&&a.accordion("refresh")})}})(jQuery);
\ No newline at end of file


Property changes on: 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizePaneAccordions.min.js
___________________________________________________________________
Added: svn:executable
   + *

Added: 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizeTabLayout.js
===================================================================
--- 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizeTabLayout.js
                               (rev 0)
+++ 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizeTabLayout.js
       2015-04-20 12:22:08 UTC (rev 13038)
@@ -0,0 +1,41 @@
+/**
+ *     UI Layout Callback: resizeTabLayout
+ *
+ *     Requires Layout 1.3.0.rc29.15 or later
+ *
+ *     This callback is used when a tab-panel is the container for a layout
+ *     The tab-layout can be initialized either before or after the tabs are 
created
+ *     Assign this callback to the tabs.show event:
+ *     - if the layout HAS been fully initialized already, it will be resized
+ *     - if the layout has NOT fully initialized, it will attempt to do so
+ *             - if it cannot initialize, it will try again next time the tab 
is accessed
+ *             - it also looks for ANY visible layout *inside* teh tab and 
resize/init it
+ *
+ *     SAMPLE:
+ *     < jQuery UI 1.9: $("#elem").tabs({ show: 
$.layout.callbacks.resizeTabLayout });
+ *     > jQuery UI 1.9: $("#elem").tabs({ activate: 
$.layout.callbacks.resizeTabLayout });
+ *     $("body").layout({ center__onresize: $.layout.callbacks.resizeTabLayout 
});
+ *
+ *     Version:        1.3 - 2013-01-12
+ *     Author:         Kevin Dalman (address@hidden)
+ */
+;(function ($) {
+var _ = $.layout;
+
+// make sure the callbacks branch exists
+if (!_.callbacks) _.callbacks = {};
+
+// this callback is bound to the tabs.show event OR to layout-pane.onresize 
event
+_.callbacks.resizeTabLayout = function (x, ui) {
+       // may be called EITHER from layout-pane.onresize OR tabs.show/activate
+       var $P = ui.jquery ? ui : $(ui.newPanel || ui.panel);
+       // find all VISIBLE layouts inside this pane/panel and resize them
+       
$P.filter(":visible").find(".ui-layout-container:visible").andSelf().each(function(){
+               var layout = $(this).data("layout");
+               if (layout) {
+                       layout.options.resizeWithWindow = false; // set option 
just in case not already set
+                       layout.resizeAll();
+               }
+       });
+};
+})( jQuery );
\ No newline at end of file


Property changes on: 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizeTabLayout.js
___________________________________________________________________
Added: svn:executable
   + *

Added: 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizeTabLayout.min.js
===================================================================
--- 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizeTabLayout.min.js
                           (rev 0)
+++ 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizeTabLayout.min.js
   2015-04-20 12:22:08 UTC (rev 13038)
@@ -0,0 +1,22 @@
+/**
+ *     UI Layout Callback: resizeTabLayout
+ *
+ *     Requires Layout 1.3.0.rc29.15 or later
+ *
+ *     This callback is used when a tab-panel is the container for a layout
+ *     The tab-layout can be initialized either before or after the tabs are 
created
+ *     Assign this callback to the tabs.show event:
+ *     - if the layout HAS been fully initialized already, it will be resized
+ *     - if the layout has NOT fully initialized, it will attempt to do so
+ *             - if it cannot initialize, it will try again next time the tab 
is accessed
+ *             - it also looks for ANY visible layout *inside* teh tab and 
resize/init it
+ *
+ *     SAMPLE:
+ *     < jQuery UI 1.9: $("#elem").tabs({ show: 
$.layout.callbacks.resizeTabLayout });
+ *     > jQuery UI 1.9: $("#elem").tabs({ activate: 
$.layout.callbacks.resizeTabLayout });
+ *     $("body").layout({ center__onresize: $.layout.callbacks.resizeTabLayout 
});
+ *
+ *     Version:        1.3 - 2013-01-12
+ *     Author:         Kevin Dalman (address@hidden)
+ */
+(function(c){var 
a=c.layout;a.callbacks||(a.callbacks={});a.callbacks.resizeTabLayout=function(a,b){(b.jquery?b:c(b.newPanel||b.panel)).filter(":visible").find(".ui-layout-container:visible").andSelf().each(function(){var
 
a=c(this).data("layout");a&&(a.options.resizeWithWindow=!1,a.resizeAll())})}})(jQuery);
\ No newline at end of file


Property changes on: 
branches/dev-syncromind/phpgwapi/js/layout/callbacks/jquery.layout.resizeTabLayout.min.js
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/dev-syncromind/phpgwapi/js/layout/jquery.layout.js
===================================================================
--- branches/dev-syncromind/phpgwapi/js/layout/jquery.layout.js                 
        (rev 0)
+++ branches/dev-syncromind/phpgwapi/js/layout/jquery.layout.js 2015-04-20 
12:22:08 UTC (rev 13038)
@@ -0,0 +1,5132 @@
+/**
+ * @preserve
+ * jquery.layout 1.4.3
+ * $Date: 2014-08-30 08:00:00 (Sat, 30 Aug 2014) $
+ * $Rev: 1.0403 $
+ *
+ * Copyright (c) 2014 Kevin Dalman (http://jquery-dev.com)
+ * Based on work by Fabrizio Balliano (http://www.fabrizioballiano.net)
+ *
+ * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
+ * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
+ *
+ * SEE: http://layout.jquery-dev.com/LICENSE.txt
+ *
+ * Changelog: http://layout.jquery-dev.com/changelog.cfm
+ *
+ * Docs: http://layout.jquery-dev.com/documentation.html
+ * Tips: http://layout.jquery-dev.com/tips.html
+ * Help: http://groups.google.com/group/jquery-ui-layout
+ */
+
+/* JavaDoc Info: 
http://code.google.com/closure/compiler/docs/js-for-compiler.html
+ * {!Object}   non-nullable type (never NULL)
+ * {?string}   nullable type (sometimes NULL) - default for {Object}
+ * {number=}   optional parameter
+ * {*}                 ALL types
+ */
+/*     TODO for jQ 2.0 
+ *     change .andSelf() to .addBack()
+ *     check $.fn.disableSelection - this is in jQuery UI 1.9.x
+ */
+
+// NOTE: For best readability, view with a fixed-width font and tabs equal to 
4-chars
+
+;(function ($) {
+
+// alias Math methods - used a lot!
+var    min             = Math.min
+,      max             = Math.max
+,      round   = Math.floor
+
+,      isStr   =  function (v) { return $.type(v) === "string"; }
+
+       /**
+        * @param {!Object}                     Instance
+        * @param {Array.<string>}      a_fn
+        */
+,      runPluginCallbacks = function (Instance, a_fn) {
+               if ($.isArray(a_fn))
+                       for (var i=0, c=a_fn.length; i<c; i++) {
+                               var fn = a_fn[i];
+                               try {
+                                       if (isStr(fn)) // 'name' of a function
+                                               fn = eval(fn);
+                                       if ($.isFunction(fn))
+                                               g(fn)( Instance );
+                               } catch (ex) {}
+                       }
+               function g (f) { return f; }; // compiler hack
+       }
+;
+
+/*
+ *     GENERIC $.layout METHODS - used by all layouts
+ */
+$.layout = {
+
+       version:        "1.4.3"
+,      revision:       1.0403 // eg: 1.4.1 final = 1.0401 - 
major(n+).minor(nn)+patch(nn+)
+
+       // $.layout.browser REPLACES $.browser
+,      browser:        {} // set below
+
+       // *PREDEFINED* EFFECTS & DEFAULTS 
+       // MUST list effect here - OR MUST set an fxSettings option (can be an 
empty hash: {})
+,      effects: {
+
+       //      Pane Open/Close Animations
+               slide: {
+                       all:    { duration:  "fast"     } // eg: duration: 
1000, easing: "easeOutBounce"
+               ,       north:  { direction: "up"       }
+               ,       south:  { direction: "down"     }
+               ,       east:   { direction: "right"}
+               ,       west:   { direction: "left"     }
+               }
+       ,       drop: {
+                       all:    { duration:  "slow"     }
+               ,       north:  { direction: "up"       }
+               ,       south:  { direction: "down"     }
+               ,       east:   { direction: "right"}
+               ,       west:   { direction: "left"     }
+               }
+       ,       scale: {
+                       all:    { duration:     "fast"  }
+               }
+       //      these are not recommended, but can be used
+       ,       blind:          {}
+       ,       clip:           {}
+       ,       explode:        {}
+       ,       fade:           {}
+       ,       fold:           {}
+       ,       puff:           {}
+
+       //      Pane Resize Animations
+       ,       size: {
+                       all:    { easing:       "swing" }
+               }
+       }
+
+       // INTERNAL CONFIG DATA - DO NOT CHANGE THIS!
+,      config: {
+               optionRootKeys: 
"effects,panes,north,south,west,east,center".split(",")
+       ,       allPanes:               
"north,south,west,east,center".split(",")
+       ,       borderPanes:    "north,south,west,east".split(",")
+       ,       oppositeEdge: {
+                       north:  "south"
+               ,       south:  "north"
+               ,       east:   "west"
+               ,       west:   "east"
+               }
+       //      offscreen data
+       ,       offscreenCSS:   { left: "-99999px", right: "auto" } // used by 
hide/close if useOffscreenClose=true
+       ,       offscreenReset: "offscreenReset" // key used for data
+       //      CSS used in multiple places
+       ,       hidden:         { visibility: "hidden" }
+       ,       visible:        { visibility: "visible" }
+       //      layout element settings
+       ,       resizers: {
+                       cssReq: {
+                               position:       "absolute"
+                       ,       padding:        0
+                       ,       margin:         0
+                       ,       fontSize:       "1px"
+                       ,       textAlign:      "left"  // to counter-act 
"center" alignment!
+                       ,       overflow:       "hidden" // prevent 
toggler-button from overflowing
+                       //      SEE $.layout.defaults.zIndexes.resizer_normal
+                       }
+               ,       cssDemo: { // DEMO CSS - applied if: 
options.PANE.applyDemoStyles=true
+                               background: "#DDD"
+                       ,       border:         "none"
+                       }
+               }
+       ,       togglers: {
+                       cssReq: {
+                               position:       "absolute"
+                       ,       display:        "block"
+                       ,       padding:        0
+                       ,       margin:         0
+                       ,       overflow:       "hidden"
+                       ,       textAlign:      "center"
+                       ,       fontSize:       "1px"
+                       ,       cursor:         "pointer"
+                       ,       zIndex:         1
+                       }
+               ,       cssDemo: { // DEMO CSS - applied if: 
options.PANE.applyDemoStyles=true
+                               background: "#AAA"
+                       }
+               }
+       ,       content: {
+                       cssReq: {
+                               position:       "relative" /* contain floated 
or positioned elements */
+                       }
+               ,       cssDemo: { // DEMO CSS - applied if: 
options.PANE.applyDemoStyles=true
+                               overflow:       "auto"
+                       ,       padding:        "10px"
+                       }
+               ,       cssDemoPane: { // DEMO CSS - REMOVE scrolling from 
'pane' when it has a content-div
+                               overflow:       "hidden"
+                       ,       padding:        0
+                       }
+               }
+       ,       panes: { // defaults for ALL panes - overridden by 'per-pane 
settings' below
+                       cssReq: {
+                               position:       "absolute"
+                       ,       margin:         0
+                       //      $.layout.defaults.zIndexes.pane_normal
+                       }
+               ,       cssDemo: { // DEMO CSS - applied if: 
options.PANE.applyDemoStyles=true
+                               padding:        "10px"
+                       ,       background:     "#FFF"
+                       ,       border:         "1px solid #BBB"
+                       ,       overflow:       "auto"
+                       }
+               }
+       ,       north: {
+                       side:                   "top"
+               ,       sizeType:               "Height"
+               ,       dir:                    "horz"
+               ,       cssReq: {
+                               top:            0
+                       ,       bottom:         "auto"
+                       ,       left:           0
+                       ,       right:          0
+                       ,       width:          "auto"
+                       //      height:         DYNAMIC
+                       }
+               }
+       ,       south: {
+                       side:                   "bottom"
+               ,       sizeType:               "Height"
+               ,       dir:                    "horz"
+               ,       cssReq: {
+                               top:            "auto"
+                       ,       bottom:         0
+                       ,       left:           0
+                       ,       right:          0
+                       ,       width:          "auto"
+                       //      height:         DYNAMIC
+                       }
+               }
+       ,       east: {
+                       side:                   "right"
+               ,       sizeType:               "Width"
+               ,       dir:                    "vert"
+               ,       cssReq: {
+                               left:           "auto"
+                       ,       right:          0
+                       ,       top:            "auto" // DYNAMIC
+                       ,       bottom:         "auto" // DYNAMIC
+                       ,       height:         "auto"
+                       //      width:          DYNAMIC
+                       }
+               }
+       ,       west: {
+                       side:                   "left"
+               ,       sizeType:               "Width"
+               ,       dir:                    "vert"
+               ,       cssReq: {
+                               left:           0
+                       ,       right:          "auto"
+                       ,       top:            "auto" // DYNAMIC
+                       ,       bottom:         "auto" // DYNAMIC
+                       ,       height:         "auto"
+                       //      width:          DYNAMIC
+                       }
+               }
+       ,       center: {
+                       dir:                    "center"
+               ,       cssReq: {
+                               left:           "auto" // DYNAMIC
+                       ,       right:          "auto" // DYNAMIC
+                       ,       top:            "auto" // DYNAMIC
+                       ,       bottom:         "auto" // DYNAMIC
+                       ,       height:         "auto"
+                       ,       width:          "auto"
+                       }
+               }
+       }
+
+       // CALLBACK FUNCTION NAMESPACE - used to store reusable callback 
functions
+,      callbacks: {}
+
+,      getParentPaneElem: function (el) {
+               // must pass either a container or pane element
+               var $el = $(el)
+               ,       layout = $el.data("layout") || $el.data("parentLayout");
+               if (layout) {
+                       var $cont = layout.container;
+                       // see if this container is directly-nested inside an 
outer-pane
+                       if ($cont.data("layoutPane")) return $cont;
+                       var $pane = $cont.closest("."+ 
$.layout.defaults.panes.paneClass);
+                       // if a pane was found, return it
+                       if ($pane.data("layoutPane")) return $pane;
+               }
+               return null;
+       }
+
+,      getParentPaneInstance: function (el) {
+               // must pass either a container or pane element
+               var $pane = $.layout.getParentPaneElem(el);
+               return $pane ? $pane.data("layoutPane") : null;
+       }
+
+,      getParentLayoutInstance: function (el) {
+               // must pass either a container or pane element
+               var $pane = $.layout.getParentPaneElem(el);
+               return $pane ? $pane.data("parentLayout") : null;
+       }
+
+,      getEventObject: function (evt) {
+               return typeof evt === "object" && evt.stopPropagation ? evt : 
null;
+       }
+,      parsePaneName: function (evt_or_pane) {
+               var evt = $.layout.getEventObject( evt_or_pane )
+               ,       pane = evt_or_pane;
+               if (evt) {
+                       // ALWAYS stop propagation of events triggered in 
Layout!
+                       evt.stopPropagation();
+                       pane = $(this).data("layoutEdge");
+               }
+               if (pane && !/^(west|east|north|south|center)$/.test(pane)) {
+                       $.layout.msg('LAYOUT ERROR - Invalid pane-name: "'+ 
pane +'"');
+                       pane = "error";
+               }
+               return pane;
+       }
+
+
+       // LAYOUT-PLUGIN REGISTRATION
+       // more plugins can added beyond this default list
+,      plugins: {
+               draggable:              !!$.fn.draggable // resizing
+       ,       effects: {
+                       core:           !!$.effects             // animimations 
(specific effects tested by initOptions)
+               ,       slide:          $.effects && ($.effects.slide || 
($.effects.effect && $.effects.effect.slide)) // default effect
+               }
+       }
+
+//     arrays of plugin or other methods to be triggered for events in *each 
layout* - will be passed 'Instance'
+,      onCreate:       []      // runs when layout is just starting to be 
created - right after options are set
+,      onLoad:         []      // runs after layout container and global 
events init, but before initPanes is called
+,      onReady:        []      // runs after initialization *completes* - ie, 
after initPanes completes successfully
+,      onDestroy:      []      // runs after layout is destroyed
+,      onUnload:       []      // runs after layout is destroyed OR when page 
unloads
+,      afterOpen:      []      // runs after setAsOpen() completes
+,      afterClose:     []      // runs after setAsClosed() completes
+
+       /*
+        *      GENERIC UTILITY METHODS
+        */
+
+       // calculate and return the scrollbar width, as an integer
+,      scrollbarWidth:         function () { return window.scrollbarWidth  || 
$.layout.getScrollbarSize('width'); }
+,      scrollbarHeight:        function () { return window.scrollbarHeight || 
$.layout.getScrollbarSize('height'); }
+,      getScrollbarSize:       function (dim) {
+               var $c  = $('<div style="position: absolute; top: -10000px; 
left: -10000px; width: 100px; height: 100px; border: 0; overflow: 
scroll;"></div>').appendTo("body")
+               ,       d       = { width: $c.outerWidth - $c[0].clientWidth, 
height: 100 - $c[0].clientHeight };
+               $c.remove();
+               window.scrollbarWidth   = d.width;
+               window.scrollbarHeight  = d.height;
+               return dim.match(/^(width|height)$/) ? d[dim] : d;
+       }
+
+
+,      disableTextSelection: function () {
+               var $d  = $(document)
+               ,       s       = 'textSelectionDisabled'
+               ,       x       = 'textSelectionInitialized'
+               ;
+               if ($.fn.disableSelection) {
+                       if (!$d.data(x)) // document hasn't been initialized yet
+                               $d.on('mouseup', $.layout.enableTextSelection 
).data(x, true);
+                       if (!$d.data(s))
+                               $d.disableSelection().data(s, true);
+               }
+       }
+,      enableTextSelection: function () {
+               var $d  = $(document)
+               ,       s       = 'textSelectionDisabled';
+               if ($.fn.enableSelection && $d.data(s))
+                       $d.enableSelection().data(s, false);
+       }
+
+
+       /**
+        * Returns hash container 'display' and 'visibility'
+        *
+        * @see $.swap() - swaps CSS, runs callback, resets CSS
+        * @param  {!Object}            $E                              jQuery 
element
+        * @param  {boolean=}   [force=false]   Run even if display != none
+        * @return {!Object}                                            Returns 
current style props, if applicable
+        */
+,      showInvisibly: function ($E, force) {
+               if ($E && $E.length && (force || $E.css("display") === "none")) 
{ // only if not *already hidden*
+                       var s = $E[0].style
+                               // save ONLY the 'style' props because that is 
what we must restore
+                       ,       CSS = { display: s.display || '', visibility: 
s.visibility || '' };
+                       // show element 'invisibly' so can be measured
+                       $E.css({ display: "block", visibility: "hidden" });
+                       return CSS;
+               }
+               return {};
+       }
+
+       /**
+        * Returns data for setting size of an element (container or a pane).
+        *
+        * @see  _create(), onWindowResize() for container, plus others for pane
+        * @return JSON  Returns a hash of all dimensions: top, bottom, left, 
right, outerWidth, innerHeight, etc
+        */
+,      getElementDimensions: function ($E, inset) {
+               var
+               //      dimensions hash - start with current data IF passed
+                       d       = { css: {}, inset: {} }
+               ,       x       = d.css                 // CSS hash
+               ,       i       = { bottom: 0 } // TEMP insets (bottom = 
complier hack)
+               ,       N       = $.layout.cssNum
+               ,       R       = Math.round
+               ,       off = $E.offset()
+               ,       b, p, ei                        // TEMP border, padding
+               ;
+               d.offsetLeft = off.left;
+               d.offsetTop  = off.top;
+
+               if (!inset) inset = {}; // simplify logic below
+
+               $.each("Left,Right,Top,Bottom".split(","), function (idx, e) { 
// e = edge
+                       b = x["border" + e] = $.layout.borderWidth($E, e);
+                       p = x["padding"+ e] = $.layout.cssNum($E, "padding"+e);
+                       ei = e.toLowerCase();
+                       d.inset[ei] = inset[ei] >= 0 ? inset[ei] : p; // any 
missing insetX value = paddingX
+                       i[ei] = d.inset[ei] + b; // total offset of content 
from outer side
+               });
+
+               x.width         = R($E.width());
+               x.height        = R($E.height());
+               x.top           = N($E,"top",true);
+               x.bottom        = N($E,"bottom",true);
+               x.left          = N($E,"left",true);
+               x.right         = N($E,"right",true);
+
+               d.outerWidth    = R($E.outerWidth());
+               d.outerHeight   = R($E.outerHeight());
+               // calc the TRUE inner-dimensions, even in quirks-mode!
+               d.innerWidth    = max(0, d.outerWidth  - i.left - i.right);
+               d.innerHeight   = max(0, d.outerHeight - i.top  - i.bottom);
+               // layoutWidth/Height is used in calcs for manual resizing
+               // layoutW/H only differs from innerW/H when in quirks-mode - 
then is like outerW/H
+               d.layoutWidth   = R($E.innerWidth());
+               d.layoutHeight  = R($E.innerHeight());
+
+               //if ($E.prop('tagName') === 'BODY') { debugData( d, 
$E.prop('tagName') ); } // DEBUG
+
+               //d.visible     = $E.is(":visible");// && x.width > 0 && 
x.height > 0;
+
+               return d;
+       }
+
+,      getElementStyles: function ($E, list) {
+               var
+                       CSS     = {}
+               ,       style   = $E[0].style
+               ,       props   = list.split(",")
+               ,       sides   = "Top,Bottom,Left,Right".split(",")
+               ,       attrs   = "Color,Style,Width".split(",")
+               ,       p, s, a, i, j, k
+               ;
+               for (i=0; i < props.length; i++) {
+                       p = props[i];
+                       if (p.match(/(border|padding|margin)$/))
+                               for (j=0; j < 4; j++) {
+                                       s = sides[j];
+                                       if (p === "border")
+                                               for (k=0; k < 3; k++) {
+                                                       a = attrs[k];
+                                                       CSS[p+s+a] = 
style[p+s+a];
+                                               }
+                                       else
+                                               CSS[p+s] = style[p+s];
+                               }
+                       else
+                               CSS[p] = style[p];
+               };
+               return CSS
+       }
+
+       /**
+        * Return the innerWidth for the current browser/doctype
+        *
+        * @see  initPanes(), sizeMidPanes(), initHandles(), sizeHandles()
+        * @param  {Array.<Object>}     $E  Must pass a jQuery object - first 
element is processed
+        * @param  {number=}                    outerWidth (optional) Can pass 
a width, allowing calculations BEFORE element is resized
+        * @return {number}                     Returns the innerWidth of the 
elem by subtracting padding and borders
+        */
+,      cssWidth: function ($E, outerWidth) {
+               // a 'calculated' outerHeight can be passed so borders and/or 
padding are removed if needed
+               if (outerWidth <= 0) return 0;
+
+               var lb  = $.layout.browser
+               ,       bs      = !lb.boxModel ? "border-box" : lb.boxSizing ? 
$E.css("boxSizing") : "content-box"
+               ,       b       = $.layout.borderWidth
+               ,       n       = $.layout.cssNum
+               ,       W       = outerWidth
+               ;
+               // strip border and/or padding from outerWidth to get CSS Width
+               if (bs !== "border-box")
+                       W -= (b($E, "Left") + b($E, "Right"));
+               if (bs === "content-box")
+                       W -= (n($E, "paddingLeft") + n($E, "paddingRight"));
+               return max(0,W);
+       }
+
+       /**
+        * Return the innerHeight for the current browser/doctype
+        *
+        * @see  initPanes(), sizeMidPanes(), initHandles(), sizeHandles()
+        * @param  {Array.<Object>}     $E  Must pass a jQuery object - first 
element is processed
+        * @param  {number=}                    outerHeight  (optional) Can 
pass a width, allowing calculations BEFORE element is resized
+        * @return {number}                     Returns the innerHeight of the 
elem by subtracting padding and borders
+        */
+,      cssHeight: function ($E, outerHeight) {
+               // a 'calculated' outerHeight can be passed so borders and/or 
padding are removed if needed
+               if (outerHeight <= 0) return 0;
+
+               var lb  = $.layout.browser
+               ,       bs      = !lb.boxModel ? "border-box" : lb.boxSizing ? 
$E.css("boxSizing") : "content-box"
+               ,       b       = $.layout.borderWidth
+               ,       n       = $.layout.cssNum
+               ,       H       = outerHeight
+               ;
+               // strip border and/or padding from outerHeight to get CSS 
Height
+               if (bs !== "border-box")
+                       H -= (b($E, "Top") + b($E, "Bottom"));
+               if (bs === "content-box")
+                       H -= (n($E, "paddingTop") + n($E, "paddingBottom"));
+               return max(0,H);
+       }
+
+       /**
+        * Returns the 'current CSS numeric value' for a CSS property - 0 if 
property does not exist
+        *
+        * @see  Called by many methods
+        * @param {Array.<Object>}      $E                                      
Must pass a jQuery object - first element is processed
+        * @param {string}                      prop                            
The name of the CSS property, eg: top, width, etc.
+        * @param {boolean=}                    [allowAuto=false]       true = 
return 'auto' if that is value; false = return 0
+        * @return {(string|number)}                                            
Usually used to get an integer value for position (top, left) or size (height, 
width)
+        */
+,      cssNum: function ($E, prop, allowAuto) {
+               if (!$E.jquery) $E = $($E);
+               var CSS = $.layout.showInvisibly($E)
+               ,       p       = $.css($E[0], prop, true)
+               ,       v       = allowAuto && p=="auto" ? p : 
Math.round(parseFloat(p) || 0);
+               $E.css( CSS ); // RESET
+               return v;
+       }
+
+,      borderWidth: function (el, side) {
+               if (el.jquery) el = el[0];
+               var b = "border"+ side.substr(0,1).toUpperCase() + 
side.substr(1); // left => Left
+               return $.css(el, b+"Style", true) === "none" ? 0 : 
Math.round(parseFloat($.css(el, b+"Width", true)) || 0);
+       }
+
+       /**
+        * Mouse-tracking utility - FUTURE REFERENCE
+        *
+        * init: if (!window.mouse) {
+        *                      window.mouse = { x: 0, y: 0 };
+        *                      $(document).mousemove( $.layout.trackMouse );
+        *              }
+        *
+        * @param {Object}              evt
+        *
+,      trackMouse: function (evt) {
+               window.mouse = { x: evt.clientX, y: evt.clientY };
+       }
+       */
+
+       /**
+        * SUBROUTINE for preventPrematureSlideClose option
+        *
+        * @param {Object}              evt
+        * @param {Object=}             el
+        */
+,      isMouseOverElem: function (evt, el) {
+               var
+                       $E      = $(el || this)
+               ,       d       = $E.offset()
+               ,       T       = d.top
+               ,       L       = d.left
+               ,       R       = L + $E.outerWidth()
+               ,       B       = T + $E.outerHeight()
+               ,       x       = evt.pageX     // evt.clientX ?
+               ,       y       = evt.pageY     // evt.clientY ?
+               ;
+               // if X & Y are < 0, probably means is over an open SELECT
+               return ($.layout.browser.msie && x < 0 && y < 0) || ((x >= L && 
x <= R) && (y >= T && y <= B));
+       }
+
+       /**
+        * Message/Logging Utility
+        *
+        * @example $.layout.msg("My message");                         // log 
text
+        * @example $.layout.msg("My message", true);           // alert text
+        * @example $.layout.msg({ foo: "bar" }, "Title");      // log 
hash-data, with custom title
+        * @example $.layout.msg({ foo: "bar" }, true, "Title", { sort: false 
}); -OR-
+        * @example $.layout.msg({ foo: "bar" }, "Title", { sort: false, 
display: true }); // alert hash-data
+        *
+        * @param {(Object|string)}                     info                    
String message OR Hash/Array
+        * @param {(Boolean|string|Object)=}    [popup=false]   True means 
alert-box - can be skipped
+        * @param {(Object|string)=}                    [debugTitle=""] Title 
for Hash data - can be skipped
+        * @param {Object=}                                     [debugOpts]     
        Extra options for debug output
+        */
+,      msg: function (info, popup, debugTitle, debugOpts) {
+               if ($.isPlainObject(info) && window.debugData) {
+                       if (typeof popup === "string") {
+                               debugOpts       = debugTitle;
+                               debugTitle      = popup;
+                       }
+                       else if (typeof debugTitle === "object") {
+                               debugOpts       = debugTitle;
+                               debugTitle      = null;
+                       }
+                       var t = debugTitle || "log( <object> )"
+                       ,       o = $.extend({ sort: false, returnHTML: false, 
display: false }, debugOpts);
+                       if (popup === true || o.display)
+                               debugData( info, t, o );
+                       else if (window.console)
+                               console.log(debugData( info, t, o ));
+               }
+               else if (popup)
+                       alert(info);
+               else if (window.console)
+                       console.log(info);
+               else {
+                       var id  = "#layoutLogger"
+                       ,       $l = $(id);
+                       if (!$l.length)
+                               $l = createLog();
+                       $l.children("ul").append('<li style="padding: 4px 10px; 
margin: 0; border-top: 1px solid #CCC;">'+ 
info.replace(/\</g,"&lt;").replace(/\>/g,"&gt;") +'</li>');
+               }
+
+               function createLog () {
+                       var pos = $.support.fixedPosition ? 'fixed' : 'absolute'
+                       ,       $e = $('<div id="layoutLogger" style="position: 
'+ pos +'; top: 5px; z-index: 999999; max-width: 25%; overflow: hidden; border: 
1px solid #000; border-radius: 5px; background: #FBFBFB; box-shadow: 0 2px 10px 
rgba(0,0,0,0.3);">'
+                               +       '<div style="font-size: 13px; 
font-weight: bold; padding: 5px 10px; background: #F6F6F6; border-radius: 5px 
5px 0 0; cursor: move;">'
+                               +       '<span style="float: right; 
padding-left: 7px; cursor: pointer;" title="Remove Console" 
onclick="$(this).closest(\'#layoutLogger\').remove()">X</span>Layout 
console.log</div>'
+                               +       '<ul style="font-size: 13px; 
font-weight: none; list-style: none; margin: 0; padding: 0 0 2px;"></ul>'
+                               + '</div>'
+                               ).appendTo("body");
+                       $e.css('left', $(window).width() - $e.outerWidth() - 5)
+                       if ($.ui.draggable) $e.draggable({ handle: 
':first-child' });
+                       return $e;
+               };
+       }
+
+};
+
+
+/*
+ *     $.layout.browser REPLACES removed $.browser, with extra data
+ *     Parsing code here adapted from jQuery 1.8 $.browse
+ */
+(function(){
+       var u = navigator.userAgent.toLowerCase()
+       ,       m = /(chrome)[ \/]([\w.]+)/.exec( u )
+               ||      /(webkit)[ \/]([\w.]+)/.exec( u )
+               ||      /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( u )
+               ||      /(msie) ([\w.]+)/.exec( u )
+               ||      u.indexOf("compatible") < 0 && /(mozilla)(?:.*? 
rv:([\w.]+)|)/.exec( u )
+               ||      []
+       ,       b = m[1] || ""
+       ,       v = m[2] || 0
+       ,       ie = b === "msie"
+       ,       cm = document.compatMode
+       ,       $s = $.support
+       ,       bs = $s.boxSizing !== undefined ? $s.boxSizing : 
$s.boxSizingReliable
+       ,       bm = !ie || !cm || cm === "CSS1Compat" || $s.boxModel || false
+       ,       lb = $.layout.browser = {
+                       version:        v
+               ,       safari:         b === "webkit"  // webkit (NOT chrome) 
= safari
+               ,       webkit:         b === "chrome"  // chrome = webkit
+               ,       msie:           ie
+               ,       isIE6:          ie && v == 6
+                       // ONLY IE reverts to old box-model - Note that 
compatMode was deprecated as of IE8
+               ,       boxModel:       bm
+               ,       boxSizing:      !!(typeof bs === "function" ? bs() : bs)
+               };
+       ;
+       if (b) lb[b] = true; // set CURRENT browser
+       /*      OLD versions of jQuery only set $.support.boxModel after page 
is loaded
+        *      so if this is IE, use support.boxModel to test for quirks-mode 
(ONLY IE changes boxModel) */
+       if (!bm && !cm) $(function(){ lb.boxModel = $s.boxModel; });
+})();
+
+
+// DEFAULT OPTIONS
+$.layout.defaults = {
+/*
+ *     LAYOUT & LAYOUT-CONTAINER OPTIONS
+ *     - none of these options are applicable to individual panes
+ */
+       name:                                           ""                      
// Not required, but useful for buttons and used for the state-cookie
+,      containerClass:                         "ui-layout-container" // 
layout-container element
+,      inset:                                          null            // 
custom container-inset values (override padding)
+,      scrollToBookmarkOnLoad:         true            // after creating a 
layout, scroll to bookmark in URL (.../page.htm#myBookmark)
+,      resizeWithWindow:                       true            // bind 
thisLayout.resizeAll() to the window.resize event
+,      resizeWithWindowDelay:          200                     // delay 
calling resizeAll because makes window resizing very jerky
+,      resizeWithWindowMaxDelay:       0                       // 0 = none - 
force resize every XX ms while window is being resized
+,      maskPanesEarly:                         false           // true = 
create pane-masks on resizer.mouseDown instead of waiting for resizer.dragstart
+,      onresizeall_start:                      null            // CALLBACK 
when resizeAll() STARTS     - NOT pane-specific
+,      onresizeall_end:                        null            // CALLBACK 
when resizeAll() ENDS       - NOT pane-specific
+,      onload_start:                           null            // CALLBACK 
when Layout inits - after options initialized, but before elements
+,      onload_end:                                     null            // 
CALLBACK when Layout inits - after EVERYTHING has been initialized
+,      onunload_start:                         null            // CALLBACK 
when Layout is destroyed OR onWindowUnload
+,      onunload_end:                           null            // CALLBACK 
when Layout is destroyed OR onWindowUnload
+,      initPanes:                                      true            // 
false = DO NOT initialize the panes onLoad - will init later
+,      showErrorMessages:                      true            // enables 
fatal error messages to warn developers of common errors
+,      showDebugMessages:                      false           // display 
console-and-alert debug msgs - IF this Layout version _has_ debugging code!
+//     Changing this zIndex value will cause other zIndex values to 
automatically change
+,      zIndex:                                         null            // the 
PANE zIndex - resizers and masks will be +1
+//     DO NOT CHANGE the zIndex values below unless you clearly understand 
their relationships
+,      zIndexes: {                                                             
// set _default_ z-index values here...
+               pane_normal:                    0                       // 
normal z-index for panes
+       ,       content_mask:                   1                       // 
applied to overlays used to mask content INSIDE panes during resizing
+       ,       resizer_normal:                 2                       // 
normal z-index for resizer-bars
+       ,       pane_sliding:                   100                     // 
applied to *BOTH* the pane and its resizer when a pane is 'slid open'
+       ,       pane_animate:                   1000            // applied to 
the pane when being animated - not applied to the resizer
+       ,       resizer_drag:                   10000           // applied to 
the CLONED resizer-bar when being 'dragged'
+       }
+,      errors: {
+               pane:                                   "pane"          // 
description of "layout pane element" - used only in error messages
+       ,       selector:                               "selector"      // 
description of "jQuery-selector" - used only in error messages
+       ,       addButtonError:                 "Error Adding Button\nInvalid "
+       ,       containerMissing:               "UI Layout Initialization 
Error\nThe specified layout-container does not exist."
+       ,       centerPaneMissing:              "UI Layout Initialization 
Error\nThe center-pane element does not exist.\nThe center-pane is a required 
element."
+       ,       noContainerHeight:              "UI Layout Initialization 
Warning\nThe layout-container \"CONTAINER\" has no height.\nTherefore the 
layout is 0-height and hence 'invisible'!"
+       ,       callbackError:                  "UI Layout Callback Error\nThe 
EVENT callback is not a valid function."
+       }
+/*
+ *     PANE DEFAULT SETTINGS
+ *     - settings under the 'panes' key become the default settings for *all 
panes*
+ *     - ALL pane-options can also be set specifically for each panes, which 
will override these 'default values'
+ */
+,      panes: { // default options for 'all panes' - will be overridden by 
'per-pane settings'
+               applyDemoStyles:                false           // NOTE: 
renamed from applyDefaultStyles for clarity
+       ,       closable:                               true            // pane 
can open & close
+       ,       resizable:                              true            // when 
open, pane can be resized 
+       ,       slidable:                               true            // when 
closed, pane can 'slide open' over other panes - closes on mouse-out
+       ,       initClosed:                             false           // true 
= init pane as 'closed'
+       ,       initHidden:                     false           // true = init 
pane as 'hidden' - no resizer-bar/spacing
+       //      SELECTORS
+       //,     paneSelector:                   ""                      // MUST 
be pane-specific - jQuery selector for pane
+       ,       contentSelector:                ".ui-layout-content" // INNER 
div/element to auto-size so only it scrolls, not the entire pane!
+       ,       contentIgnoreSelector:  ".ui-layout-ignore"     // element(s) 
to 'ignore' when measuring 'content'
+       ,       findNestedContent:              false           // true = 
$P.find(contentSelector), false = $P.children(contentSelector)
+       //      GENERIC ROOT-CLASSES - for auto-generated classNames
+       ,       paneClass:                              "ui-layout-pane"        
// Layout Pane
+       ,       resizerClass:                   "ui-layout-resizer"     // 
Resizer Bar
+       ,       togglerClass:                   "ui-layout-toggler"     // 
Toggler Button
+       ,       buttonClass:                    "ui-layout-button"      // 
CUSTOM Buttons       - eg: '[ui-layout-button]-toggle/-open/-close/-pin'
+       //      ELEMENT SIZE & SPACING
+       //,     size:                                   100                     
// MUST be pane-specific -initial size of pane
+       ,       minSize:                                0                       
// when manually resizing a pane
+       ,       maxSize:                                0                       
// ditto, 0 = no limit
+       ,       spacing_open:                   6                       // 
space between pane and adjacent panes - when pane is 'open'
+       ,       spacing_closed:                 6                       // 
ditto - when pane is 'closed'
+       ,       togglerLength_open:             50                      // 
Length = WIDTH of toggler button on north/south sides - HEIGHT on east/west 
sides
+       ,       togglerLength_closed:   50                      // 100% OR -1 
means 'full height/width of resizer bar' - 0 means 'hidden'
+       ,       togglerAlign_open:              "center"        // top/left, 
bottom/right, center, OR...
+       ,       togglerAlign_closed:    "center"        // 1 => nn = offset 
from top/left, -1 => -nn == offset from bottom/right
+       ,       togglerContent_open:    ""                      // text or HTML 
to put INSIDE the toggler
+       ,       togglerContent_closed:  ""                      // ditto
+       //      RESIZING OPTIONS
+       ,       resizerDblClickToggle:  true            // 
+       ,       autoResize:                             true            // IF 
size is 'auto' or a percentage, then recalc 'pixel size' whenever the layout 
resizes
+       ,       autoReopen:                             true            // IF a 
pane was auto-closed due to noRoom, reopen it when there is room? False = leave 
it closed
+       ,       resizerDragOpacity:             1                       // 
option for ui.draggable
+       //,     resizerCursor:                  ""                      // MUST 
be pane-specific - cursor when over resizer-bar
+       ,       maskContents:                   false           // true = add 
DIV-mask over-or-inside this pane so can 'drag' over IFRAMES
+       ,       maskObjects:                    false           // true = add 
IFRAME-mask over-or-inside this pane to cover objects/applets - content-mask 
will overlay this mask
+       ,       maskZindex:                             null            // will 
override zIndexes.content_mask if specified - not applicable to iframe-panes
+       ,       resizingGrid:                   false           // grid size 
that the resizers will snap-to during resizing, eg: [20,20]
+       ,       livePaneResizing:               false           // true = LIVE 
Resizing as resizer is dragged
+       ,       liveContentResizing:    false           // true = re-measure 
header/footer heights as resizer is dragged
+       ,       liveResizingTolerance:  1                       // how many px 
change before pane resizes, to control performance
+       //      SLIDING OPTIONS
+       ,       sliderCursor:                   "pointer"       // cursor when 
resizer-bar will trigger 'sliding'
+       ,       slideTrigger_open:              "click"         // click, 
dblclick, mouseenter
+       ,       slideTrigger_close:             "mouseleave"// click, mouseleave
+       ,       slideDelay_open:                300                     // 
applies only for mouseenter event - 0 = instant open
+       ,       slideDelay_close:               300                     // 
applies only for mouseleave event (300ms is the minimum!)
+       ,       hideTogglerOnSlide:             false           // when pane is 
slid-open, should the toggler show?
+       ,       preventQuickSlideClose: $.layout.browser.webkit // Chrome 
triggers slideClosed as it is opening
+       ,       preventPrematureSlideClose: false       // handle incorrect 
mouseleave trigger, like when over a SELECT-list in IE
+       //      PANE-SPECIFIC TIPS & MESSAGES
+       ,       tips: {
+                       Open:                           "Open"          // eg: 
"Open Pane"
+               ,       Close:                          "Close"
+               ,       Resize:                         "Resize"
+               ,       Slide:                          "Slide Open"
+               ,       Pin:                            "Pin"
+               ,       Unpin:                          "Un-Pin"
+               ,       noRoomToOpen:           "Not enough room to show this 
panel."   // alert if user tries to open a pane that cannot
+               ,       minSizeWarning:         "Panel has reached its minimum 
size"    // displays in browser statusbar
+               ,       maxSizeWarning:         "Panel has reached its maximum 
size"    // ditto
+               }
+       //      HOT-KEYS & MISC
+       ,       showOverflowOnHover:    false           // will bind 
allowOverflow() utility to pane.onMouseOver
+       ,       enableCursorHotkey:             true            // enabled 
'cursor' hotkeys
+       //,     customHotkey:                   ""                      // MUST 
be pane-specific - EITHER a charCode OR a character
+       ,       customHotkeyModifier:   "SHIFT"         // either 'SHIFT', 
'CTRL' or 'CTRL+SHIFT' - NOT 'ALT'
+       //      PANE ANIMATION
+       //      NOTE: fxSss_open, fxSss_close & fxSss_size options (eg: 
fxName_open) are auto-generated if not passed
+       ,       fxName:                                 "slide"         // 
('none' or blank), slide, drop, scale -- only relevant to 'open' & 'close', NOT 
'size'
+       ,       fxSpeed:                                null            // 
slow, normal, fast, 200, nnn - if passed, will OVERRIDE fxSettings.duration
+       ,       fxSettings:                             {}                      
// can be passed, eg: { easing: "easeOutBounce", duration: 1500 }
+       ,       fxOpacityFix:                   true            // tries to fix 
opacity in IE to restore anti-aliasing after animation
+       ,       animatePaneSizing:              false           // true = 
animate resizing after dragging resizer-bar OR sizePane() is called
+       /*  NOTE: Action-specific FX options are auto-generated from the 
options above if not specifically set:
+               fxName_open:                    "slide"         // 'Open' pane 
animation
+               fnName_close:                   "slide"         // 'Close' pane 
animation
+               fxName_size:                    "slide"         // 'Size' pane 
animation - when animatePaneSizing = true
+               fxSpeed_open:                   null
+               fxSpeed_close:                  null
+               fxSpeed_size:                   null
+               fxSettings_open:                {}
+               fxSettings_close:               {}
+               fxSettings_size:                {}
+       */
+       //      CHILD/NESTED LAYOUTS
+       ,       children:                               null            // 
Layout-options for nested/child layout - even {} is valid as options
+       ,       containerSelector:              ''                      // if 
child is NOT 'directly nested', a selector to find it/them (can have more than 
one child layout!)
+       ,       initChildren:                   true            // true = child 
layout will be created as soon as _this_ layout completes initialization
+       ,       destroyChildren:                true            // true = 
destroy child-layout if this pane is destroyed
+       ,       resizeChildren:                 true            // true = 
trigger child-layout.resizeAll() when this pane is resized
+       //      EVENT TRIGGERING
+       ,       triggerEventsOnLoad:    false           // true = trigger 
onopen OR onclose callbacks when layout initializes
+       ,       triggerEventsDuringLiveResize: true     // true = trigger 
onresize callback REPEATEDLY if livePaneResizing==true
+       //      PANE CALLBACKS
+       ,       onshow_start:                   null            // CALLBACK 
when pane STARTS to Show    - BEFORE onopen/onhide_start
+       ,       onshow_end:                             null            // 
CALLBACK when pane ENDS being Shown  - AFTER  onopen/onhide_end
+       ,       onhide_start:                   null            // CALLBACK 
when pane STARTS to Close   - BEFORE onclose_start
+       ,       onhide_end:                             null            // 
CALLBACK when pane ENDS being Closed - AFTER  onclose_end
+       ,       onopen_start:                   null            // CALLBACK 
when pane STARTS to Open
+       ,       onopen_end:                             null            // 
CALLBACK when pane ENDS being Opened
+       ,       onclose_start:                  null            // CALLBACK 
when pane STARTS to Close
+       ,       onclose_end:                    null            // CALLBACK 
when pane ENDS being Closed
+       ,       onresize_start:                 null            // CALLBACK 
when pane STARTS being Resized ***FOR ANY REASON***
+       ,       onresize_end:                   null            // CALLBACK 
when pane ENDS being Resized ***FOR ANY REASON***
+       ,       onsizecontent_start:    null            // CALLBACK when sizing 
of content-element STARTS
+       ,       onsizecontent_end:              null            // CALLBACK 
when sizing of content-element ENDS
+       ,       onswap_start:                   null            // CALLBACK 
when pane STARTS to Swap
+       ,       onswap_end:                             null            // 
CALLBACK when pane ENDS being Swapped
+       ,       ondrag_start:                   null            // CALLBACK 
when pane STARTS being ***MANUALLY*** Resized
+       ,       ondrag_end:                             null            // 
CALLBACK when pane ENDS being ***MANUALLY*** Resized
+       }
+/*
+ *     PANE-SPECIFIC SETTINGS
+ *     - options listed below MUST be specified per-pane - they CANNOT be set 
under 'panes'
+ *     - all options under the 'panes' key can also be set specifically for 
any pane
+ *     - most options under the 'panes' key apply only to 'border-panes' - NOT 
the the center-pane
+ */
+,      north: {
+               paneSelector:                   ".ui-layout-north"
+       ,       size:                                   "auto"          // eg: 
"auto", "30%", .30, 200
+       ,       resizerCursor:                  "n-resize"      // custom = 
url(myCursor.cur)
+       ,       customHotkey:                   ""                      // 
EITHER a charCode (43) OR a character ("o")
+       }
+,      south: {
+               paneSelector:                   ".ui-layout-south"
+       ,       size:                                   "auto"
+       ,       resizerCursor:                  "s-resize"
+       ,       customHotkey:                   ""
+       }
+,      east: {
+               paneSelector:                   ".ui-layout-east"
+       ,       size:                                   200
+       ,       resizerCursor:                  "e-resize"
+       ,       customHotkey:                   ""
+       }
+,      west: {
+               paneSelector:                   ".ui-layout-west"
+       ,       size:                                   200
+       ,       resizerCursor:                  "w-resize"
+       ,       customHotkey:                   ""
+       }
+,      center: {
+               paneSelector:                   ".ui-layout-center"
+       ,       minWidth:                               0
+       ,       minHeight:                              0
+       }
+};
+
+$.layout.optionsMap = {
+       // layout/global options - NOT pane-options
+       layout: 
("name,instanceKey,stateManagement,effects,inset,zIndexes,errors,"
+       +       
"zIndex,scrollToBookmarkOnLoad,showErrorMessages,maskPanesEarly,"
+       +       
"outset,resizeWithWindow,resizeWithWindowDelay,resizeWithWindowMaxDelay,"
+       +       
"onresizeall,onresizeall_start,onresizeall_end,onload,onload_start,onload_end,onunload,onunload_start,onunload_end").split(",")
+//     borderPanes: [ ALL options that are NOT specified as 'layout' ]
+       // default.panes options that apply to the center-pane (most options 
apply _only_ to border-panes)
+,      center: 
("paneClass,contentSelector,contentIgnoreSelector,findNestedContent,applyDemoStyles,triggerEventsOnLoad,"
+       +       
"showOverflowOnHover,maskContents,maskObjects,liveContentResizing,"
+       +       
"containerSelector,children,initChildren,resizeChildren,destroyChildren,"
+       +       
"onresize,onresize_start,onresize_end,onsizecontent,onsizecontent_start,onsizecontent_end").split(",")
+       // options that MUST be specifically set 'per-pane' - CANNOT set in the 
panes (defaults) key
+,      noDefault: ("paneSelector,resizerCursor,customHotkey").split(",")
+};
+
+/**
+ * Processes options passed in converts flat-format data into subkey (JSON) 
format
+ * In flat-format, subkeys are _currently_ separated with 2 underscores, like 
north__optName
+ * Plugins may also call this method so they can transform their own data
+ *
+ * @param  {!Object}   hash                    Data/options passed by user - 
may be a single level or nested levels
+ * @param  {boolean=}  [addKeys=false] Should the primary layout.options keys 
be added if they do not exist?
+ * @return {Object}                                            Returns hash of 
minWidth & minHeight
+ */
+$.layout.transformData = function (hash, addKeys) {
+       var     json = addKeys ? { panes: {}, center: {} } : {} // init return 
object
+       ,       branch, optKey, keys, key, val, i, c;
+
+       if (typeof hash !== "object") return json; // no options passed
+
+       // convert all 'flat-keys' to 'sub-key' format
+       for (optKey in hash) {
+               branch  = json;
+               val             = hash[ optKey ];
+               keys    = optKey.split("__"); // eg: west__size or 
north__fxSettings__duration
+               c               = keys.length - 1;
+               // convert underscore-delimited to subkeys
+               for (i=0; i <= c; i++) {
+                       key = keys[i];
+                       if (i === c) {  // last key = value
+                               if ($.isPlainObject( val ))
+                                       branch[key] = $.layout.transformData( 
val ); // RECURSE
+                               else
+                                       branch[key] = val;
+                       }
+                       else {
+                               if (!branch[key])
+                                       branch[key] = {}; // create the subkey
+                               // recurse to sub-key for next loop - if not 
done
+                               branch = branch[key];
+                       }
+               }
+       }
+       return json;
+};
+
+// INTERNAL CONFIG DATA - DO NOT CHANGE THIS!
+$.layout.backwardCompatibility = {
+       // data used by renameOldOptions()
+       map: {
+       //      OLD Option Name:                        NEW Option Name
+               applyDefaultStyles:                     "applyDemoStyles"
+       //      CHILD/NESTED LAYOUTS
+       ,       childOptions:                           "children"
+       ,       initChildLayout:                        "initChildren"
+       ,       destroyChildLayout:                     "destroyChildren"
+       ,       resizeChildLayout:                      "resizeChildren"
+       ,       resizeNestedLayout:                     "resizeChildren"
+       //      MISC Options
+       ,       resizeWhileDragging:            "livePaneResizing"
+       ,       resizeContentWhileDragging:     "liveContentResizing"
+       ,       triggerEventsWhileDragging:     "triggerEventsDuringLiveResize"
+       ,       maskIframesOnResize:            "maskContents"
+       //      STATE MANAGEMENT
+       ,       useStateCookie:                         
"stateManagement.enabled"
+       ,       "cookie.autoLoad":                      
"stateManagement.autoLoad"
+       ,       "cookie.autoSave":                      
"stateManagement.autoSave"
+       ,       "cookie.keys":                          
"stateManagement.stateKeys"
+       ,       "cookie.name":                          
"stateManagement.cookie.name"
+       ,       "cookie.domain":                        
"stateManagement.cookie.domain"
+       ,       "cookie.path":                          
"stateManagement.cookie.path"
+       ,       "cookie.expires":                       
"stateManagement.cookie.expires"
+       ,       "cookie.secure":                        
"stateManagement.cookie.secure"
+       //      OLD Language options
+       ,       noRoomToOpenTip:                        "tips.noRoomToOpen"
+       ,       togglerTip_open:                        "tips.Close"    // open 
  = Close
+       ,       togglerTip_closed:                      "tips.Open"             
// closed = Open
+       ,       resizerTip:                                     "tips.Resize"
+       ,       sliderTip:                                      "tips.Slide"
+       }
+
+/**
+* @param {Object}      opts
+*/
+,      renameOptions: function (opts) {
+               var map = $.layout.backwardCompatibility.map
+               ,       oldData, newData, value
+               ;
+               for (var itemPath in map) {
+                       oldData = getBranch( itemPath );
+                       value   = oldData.branch[ oldData.key ];
+                       if (value !== undefined) {
+                               newData = getBranch( map[itemPath], true );
+                               newData.branch[ newData.key ] = value;
+                               delete oldData.branch[ oldData.key ];
+                       }
+               }
+
+               /**
+                * @param {string}      path
+                * @param {boolean=}    [create=false]  Create path if does not 
exist
+                */
+               function getBranch (path, create) {
+                       var a = path.split(".") // split keys into array
+                       ,       c = a.length - 1
+                       ,       D = { branch: opts, key: a[c] } // init branch 
at top & set key (last item)
+                       ,       i = 0, k, undef;
+                       for (; i<c; i++) { // skip the last key (data)
+                               k = a[i];
+                               if (D.branch[ k ] == undefined) { // child-key 
does not exist
+                                       if (create) {
+                                               D.branch = D.branch[ k ] = {}; 
// create child-branch
+                                       }
+                                       else // can't go any farther
+                                               D.branch = {}; // branch is 
undefined
+                               }
+                               else
+                                       D.branch = D.branch[ k ]; // get 
child-branch
+                       }
+                       return D;
+               };
+       }
+
+/**
+* @param {Object}      opts
+*/
+,      renameAllOptions: function (opts) {
+               var ren = $.layout.backwardCompatibility.renameOptions;
+               // rename root (layout) options
+               ren( opts );
+               // rename 'defaults' to 'panes'
+               if (opts.defaults) {
+                       if (typeof opts.panes !== "object")
+                               opts.panes = {};
+                       $.extend(true, opts.panes, opts.defaults);
+                       delete opts.defaults;
+               }
+               // rename options in the the options.panes key
+               if (opts.panes) ren( opts.panes );
+               // rename options inside *each pane key*, eg: options.west
+               $.each($.layout.config.allPanes, function (i, pane) {
+                       if (opts[pane]) ren( opts[pane] );
+               });     
+               return opts;
+       }
+};
+
+
+
+
+/*     ============================================================
+ *     BEGIN WIDGET: $( selector ).layout( {options} );
+ *     ============================================================
+ */
+$.fn.layout = function (opts) {
+       var
+
+       // local aliases to global data
+       browser = $.layout.browser
+,      _c              = $.layout.config
+
+       // local aliases to utlity methods
+,      cssW    = $.layout.cssWidth
+,      cssH    = $.layout.cssHeight
+,      elDims  = $.layout.getElementDimensions
+,      styles  = $.layout.getElementStyles
+,      evtObj  = $.layout.getEventObject
+,      evtPane = $.layout.parsePaneName
+
+/**
+ * options - populated by initOptions()
+ */
+,      options = $.extend(true, {}, $.layout.defaults)
+,      effects = options.effects = $.extend(true, {}, $.layout.effects)
+
+/**
+ * layout-state object
+ */
+,      state = {
+               // generate unique ID to use for event.namespace so can unbind 
only events added by 'this layout'
+               id:                             "layout"+ $.now()       // code 
uses alias: sID
+       ,       initialized:    false
+       ,       paneResizing:   false
+       ,       panesSliding:   {}
+       ,       container:      {       // list all keys referenced in code to 
avoid compiler error msgs
+                       innerWidth:             0
+               ,       innerHeight:    0
+               ,       outerWidth:             0
+               ,       outerHeight:    0
+               ,       layoutWidth:    0
+               ,       layoutHeight:   0
+               }
+       ,       north:          { childIdx: 0 }
+       ,       south:          { childIdx: 0 }
+       ,       east:           { childIdx: 0 }
+       ,       west:           { childIdx: 0 }
+       ,       center:         { childIdx: 0 }
+       }
+
+/**
+ * parent/child-layout pointers
+ */
+//,    hasParentLayout = false - exists ONLY inside Instance so can be set 
externally
+,      children = {
+               north:          null
+       ,       south:          null
+       ,       east:           null
+       ,       west:           null
+       ,       center:         null
+       }
+
+/*
+ * ###########################
+ *  INTERNAL HELPER FUNCTIONS
+ * ###########################
+ */
+
+       /**
+        * Manages all internal timers
+        */
+,      timer = {
+               data:   {}
+       ,       set:    function (s, fn, ms) { timer.clear(s); timer.data[s] = 
setTimeout(fn, ms); }
+       ,       clear:  function (s) { var t=timer.data; if (t[s]) 
{clearTimeout(t[s]); delete t[s];} }
+       }
+
+       /**
+        * Alert or console.log a message - IF option is enabled.
+        *
+        * @param {(string|!Object)}    msg                             Message 
(or debug-data) to display
+        * @param {boolean=}                    [popup=false]   True by 
default, means 'alert', false means use console.log
+        * @param {boolean=}                    [debug=false]   True means is a 
widget debugging message
+        */
+,      _log = function (msg, popup, debug) {
+               var o = options;
+               if ((o.showErrorMessages && !debug) || (debug && 
o.showDebugMessages))
+                       $.layout.msg( o.name +' / '+ msg, (popup !== false) );
+               return false;
+       }
+
+       /**
+        * Executes a Callback function after a trigger event, like resize, 
open or close
+        *
+        * @param {string}                              evtName                 
                Name of the layout callback, eg "onresize_start"
+        * @param {(string|boolean)=}   [pane=""]                               
This is passed only so we can pass the 'pane object' to the callback
+        * @param {(string|boolean)=}   [skipBoundEvents=false] True = do not 
run events bound to the elements - only the callbacks set in options
+        */
+,      _runCallbacks = function (evtName, pane, skipBoundEvents) {
+               var     hasPane = pane && isStr(pane)
+               ,       s               = hasPane ? state[pane] : state
+               ,       o               = hasPane ? options[pane] : options
+               ,       lName   = options.name
+                       // names like onopen and onopen_end separate are 
interchangeable in options...
+               ,       lng             = evtName + (evtName.match(/_/) ? "" : 
"_end")
+               ,       shrt    = lng.match(/_end$/) ? lng.substr(0, lng.length 
- 4) : ""
+               ,       fn              = o[lng] || o[shrt]
+               ,       retVal  = "NC" // NC = No Callback
+               ,       args    = []
+               ,       $P              = hasPane ? $Ps[pane] : 0
+               ;
+               if (hasPane && !$P) // a pane is specified, but does not exist!
+                       return retVal;
+               if ( !hasPane && $.type(pane) === "boolean" ) {
+                       skipBoundEvents = pane; // allow pane param to be 
skipped for Layout callback
+                       pane = "";
+               }
+
+               // first trigger the callback set in the options
+               if (fn) {
+                       try {
+                               // convert function name (string) to function 
object
+                               if (isStr( fn )) {
+                                       if (fn.match(/,/)) {
+                                               // function name cannot contain 
a comma, 
+                                               // so must be a function name 
AND a parameter to pass
+                                               args = fn.split(",")
+                                               ,       fn = eval(args[0]);
+                                       }
+                                       else // just the name of an external 
function?
+                                               fn = eval(fn);
+                               }
+                               // execute the callback, if exists
+                               if ($.isFunction( fn )) {
+                                       if (args.length)
+                                               retVal = g(fn)(args[1]); // 
pass the argument parsed from 'list'
+                                       else if ( hasPane )
+                                               // pass data: pane-name, 
pane-element, pane-state, pane-options, and layout-name
+                                               retVal = g(fn)( pane, 
$Ps[pane], s, o, lName );
+                                       else // must be a layout/container 
callback - pass suitable info
+                                               retVal = g(fn)( Instance, s, o, 
lName );
+                               }
+                       }
+                       catch (ex) {
+                               _log( 
options.errors.callbackError.replace(/EVENT/, $.trim((pane || "") +" "+ lng)), 
false );
+                               if ($.type(ex) === "string" && string.length)
+                                       _log("Exception:  "+ ex, false );
+                       }
+               }
+
+               // trigger additional events bound directly to the pane
+               if (!skipBoundEvents && retVal !== false) {
+                       if ( hasPane ) { // PANE events can be bound to each 
pane-elements
+                               o       = options[pane];
+                               s       = state[pane];
+                               $P.triggerHandler("layoutpane"+ lng, [ pane, 
$P, s, o, lName ]);
+                               if (shrt)
+                                       $P.triggerHandler("layoutpane"+ shrt, [ 
pane, $P, s, o, lName ]);
+                       }
+                       else { // LAYOUT events can be bound to the 
container-element
+                               $N.triggerHandler("layout"+ lng, [ Instance, s, 
o, lName ]);
+                               if (shrt)
+                                       $N.triggerHandler("layout"+ shrt, [ 
Instance, s, o, lName ]);
+                       }
+               }
+
+               // ALWAYS resizeChildren after an onresize_end event - even 
during initialization
+               // IGNORE onsizecontent_end event because causes child-layouts 
to resize TWICE
+               if (hasPane && evtName === "onresize_end") // BAD: || evtName 
=== "onsizecontent_end"
+                       resizeChildren(pane+"", true); // compiler hack -force 
string
+
+               return retVal;
+
+               function g (f) { return f; }; // compiler hack
+       }
+
+
+       /**
+        * cure iframe display issues in IE & other browsers
+        */
+,      _fixIframe = function (pane) {
+               if (browser.mozilla) return; // skip FireFox - it 
auto-refreshes iframes onShow
+               var $P = $Ps[pane];
+               // if the 'pane' is an iframe, do it
+               if (state[pane].tagName === "IFRAME")
+                       $P.css(_c.hidden).css(_c.visible); 
+               else // ditto for any iframes INSIDE the pane
+                       $P.find('IFRAME').css(_c.hidden).css(_c.visible);
+       }
+
+       /**
+        * @param  {string}             pane            Can accept ONLY a 
'pane' (east, west, etc)
+        * @param  {number=}            outerSize       (optional) Can pass a 
width, allowing calculations BEFORE element is resized
+        * @return {number}             Returns the innerHeight/Width of el by 
subtracting padding and borders
+        */
+,      cssSize = function (pane, outerSize) {
+               var fn = _c[pane].dir=="horz" ? cssH : cssW;
+               return fn($Ps[pane], outerSize);
+       }
+
+       /**
+        * @param  {string}             pane            Can accept ONLY a 
'pane' (east, west, etc)
+        * @return {Object}             Returns hash of minWidth & minHeight
+        */
+,      cssMinDims = function (pane) {
+               // minWidth/Height means CSS width/height = 1px
+               var     $P      = $Ps[pane]
+               ,       dir     = _c[pane].dir
+               ,       d       = {
+                               minWidth:       1001 - cssW($P, 1000)
+                       ,       minHeight:      1001 - cssH($P, 1000)
+                       }
+               ;
+               if (dir === "horz") d.minSize = d.minHeight;
+               if (dir === "vert") d.minSize = d.minWidth;
+               return d;
+       }
+
+       // TODO: see if these methods can be made more useful...
+       // TODO: *maybe* return cssW/H from these so caller can use this info
+
+       /**
+        * @param {(string|!Object)}            el
+        * @param {number=}                             outerWidth
+        * @param {boolean=}                            [autoHide=false]
+        */
+,      setOuterWidth = function (el, outerWidth, autoHide) {
+               var $E = el, w;
+               if (isStr(el)) $E = $Ps[el]; // west
+               else if (!el.jquery) $E = $(el);
+               w = cssW($E, outerWidth);
+               $E.css({ width: w });
+               if (w > 0) {
+                       if (autoHide && $E.data('autoHidden') && 
$E.innerHeight() > 0) {
+                               $E.show().data('autoHidden', false);
+                               if (!browser.mozilla) // FireFox refreshes 
iframes - IE does not
+                                       // make hidden, then visible to 
'refresh' display after animation
+                                       $E.css(_c.hidden).css(_c.visible);
+                       }
+               }
+               else if (autoHide && !$E.data('autoHidden'))
+                       $E.hide().data('autoHidden', true);
+       }
+
+       /**
+        * @param {(string|!Object)}            el
+        * @param {number=}                             outerHeight
+        * @param {boolean=}                            [autoHide=false]
+        */
+,      setOuterHeight = function (el, outerHeight, autoHide) {
+               var $E = el, h;
+               if (isStr(el)) $E = $Ps[el]; // west
+               else if (!el.jquery) $E = $(el);
+               h = cssH($E, outerHeight);
+               $E.css({ height: h, visibility: "visible" }); // may have been 
'hidden' by sizeContent
+               if (h > 0 && $E.innerWidth() > 0) {
+                       if (autoHide && $E.data('autoHidden')) {
+                               $E.show().data('autoHidden', false);
+                               if (!browser.mozilla) // FireFox refreshes 
iframes - IE does not
+                                       $E.css(_c.hidden).css(_c.visible);
+                       }
+               }
+               else if (autoHide && !$E.data('autoHidden'))
+                       $E.hide().data('autoHidden', true);
+       }
+
+
+       /**
+        * Converts any 'size' params to a pixel/integer size, if not already
+        * If 'auto' or a decimal/percentage is passed as 'size', a pixel-size 
is calculated
+        *
+       /**
+        * @param  {string}                             pane
+        * @param  {(string|number)=}   size
+        * @param  {string=}                            [dir]
+        * @return {number}
+        */
+,      _parseSize = function (pane, size, dir) {
+               if (!dir) dir = _c[pane].dir;
+
+               if (isStr(size) && size.match(/%/))
+                       size = (size === '100%') ? -1 : parseInt(size, 10) / 
100; // convert % to decimal
+
+               if (size === 0)
+                       return 0;
+               else if (size >= 1)
+                       return parseInt(size, 10);
+
+               var o = options, avail = 0;
+               if (dir=="horz") // north or south or center.minHeight
+                       avail = sC.innerHeight - ($Ps.north ? 
o.north.spacing_open : 0) - ($Ps.south ? o.south.spacing_open : 0);
+               else if (dir=="vert") // east or west or center.minWidth
+                       avail = sC.innerWidth - ($Ps.west ? o.west.spacing_open 
: 0) - ($Ps.east ? o.east.spacing_open : 0);
+
+               if (size === -1) // -1 == 100%
+                       return avail;
+               else if (size > 0) // percentage, eg: .25
+                       return round(avail * size);
+               else if (pane=="center")
+                       return 0;
+               else { // size < 0 || size=='auto' || size==Missing || 
size==Invalid
+                       // auto-size the pane
+                       var     dim     = (dir === "horz" ? "height" : "width")
+                       ,       $P      = $Ps[pane]
+                       ,       $C      = dim === 'height' ? $Cs[pane] : false
+                       ,       vis     = $.layout.showInvisibly($P) // show 
pane invisibly if hidden
+                       ,       szP     = $P.css(dim) // SAVE current pane size
+                       ,       szC     = $C ? $C.css(dim) : 0 // SAVE current 
content size
+                       ;
+                       $P.css(dim, "auto");
+                       if ($C) $C.css(dim, "auto");
+                       size = (dim === "height") ? $P.outerHeight() : 
$P.outerWidth(); // MEASURE
+                       $P.css(dim, szP).css(vis); // RESET size & visibility
+                       if ($C) $C.css(dim, szC);
+                       return size;
+               }
+       }
+
+       /**
+        * Calculates current 'size' (outer-width or outer-height) of a 
border-pane - optionally with 'pane-spacing' added
+        *
+        * @param  {(string|!Object)}   pane
+        * @param  {boolean=}                   [inclSpace=false]
+        * @return {number}                             Returns EITHER Width 
for east/west panes OR Height for north/south panes
+        */
+,      getPaneSize = function (pane, inclSpace) {
+               var 
+                       $P      = $Ps[pane]
+               ,       o       = options[pane]
+               ,       s       = state[pane]
+               ,       oSp     = (inclSpace ? o.spacing_open : 0)
+               ,       cSp     = (inclSpace ? o.spacing_closed : 0)
+               ;
+               if (!$P || s.isHidden)
+                       return 0;
+               else if (s.isClosed || (s.isSliding && inclSpace))
+                       return cSp;
+               else if (_c[pane].dir === "horz")
+                       return $P.outerHeight() + oSp;
+               else // dir === "vert"
+                       return $P.outerWidth() + oSp;
+       }
+
+       /**
+        * Calculate min/max pane dimensions and limits for resizing
+        *
+        * @param  {string}             pane
+        * @param  {boolean=}   [slide=false]
+        */
+,      setSizeLimits = function (pane, slide) {
+               if (!isInitialized()) return;
+               var 
+                       o                               = options[pane]
+               ,       s                               = state[pane]
+               ,       c                               = _c[pane]
+               ,       dir                             = c.dir
+               ,       type                    = c.sizeType.toLowerCase()
+               ,       isSliding               = (slide != undefined ? slide : 
s.isSliding) // only open() passes 'slide' param
+               ,       $P                              = $Ps[pane]
+               ,       paneSpacing             = o.spacing_open
+               //      measure the pane on the *opposite side* from this pane
+               ,       altPane                 = _c.oppositeEdge[pane]
+               ,       altS                    = state[altPane]
+               ,       $altP                   = $Ps[altPane]
+               ,       altPaneSize             = (!$altP || 
altS.isVisible===false || altS.isSliding ? 0 : (dir=="horz" ? 
$altP.outerHeight() : $altP.outerWidth()))
+               ,       altPaneSpacing  = ((!$altP || altS.isHidden ? 0 : 
options[altPane][ altS.isClosed !== false ? "spacing_closed" : "spacing_open" 
]) || 0)
+               //      limitSize prevents this pane from 'overlapping' 
opposite pane
+               ,       containerSize   = (dir=="horz" ? sC.innerHeight : 
sC.innerWidth)
+               ,       minCenterDims   = cssMinDims("center")
+               ,       minCenterSize   = dir=="horz" ? 
max(options.center.minHeight, minCenterDims.minHeight) : 
max(options.center.minWidth, minCenterDims.minWidth)
+               //      if pane is 'sliding', then ignore center and alt-pane 
sizes - because 'overlays' them
+               ,       limitSize               = (containerSize - paneSpacing 
- (isSliding ? 0 : (_parseSize("center", minCenterSize, dir) + altPaneSize + 
altPaneSpacing)))
+               ,       minSize                 = s.minSize = max( 
_parseSize(pane, o.minSize), cssMinDims(pane).minSize )
+               ,       maxSize                 = s.maxSize = min( (o.maxSize ? 
_parseSize(pane, o.maxSize) : 100000), limitSize )
+               ,       r                               = s.resizerPosition = 
{} // used to set resizing limits
+               ,       top                             = sC.inset.top
+               ,       left                    = sC.inset.left
+               ,       W                               = sC.innerWidth
+               ,       H                               = sC.innerHeight
+               ,       rW                              = o.spacing_open // 
subtract resizer-width to get top/left position for south/east
+               ;
+               switch (pane) {
+                       case "north":   r.min = top + minSize;
+                                                       r.max = top + maxSize;
+                                                       break;
+                       case "west":    r.min = left + minSize;
+                                                       r.max = left + maxSize;
+                                                       break;
+                       case "south":   r.min = top + H - maxSize - rW;
+                                                       r.max = top + H - 
minSize - rW;
+                                                       break;
+                       case "east":    r.min = left + W - maxSize - rW;
+                                                       r.max = left + W - 
minSize - rW;
+                                                       break;
+               };
+       }
+
+       /**
+        * Returns data for setting the size/position of center pane. Also used 
to set Height for east/west panes
+        *
+        * @return JSON  Returns a hash of all dimensions: top, bottom, left, 
right, (outer) width and (outer) height
+        */
+,      calcNewCenterPaneDims = function () {
+               var d = {
+                       top:    getPaneSize("north", true) // true = include 
'spacing' value for pane
+               ,       bottom: getPaneSize("south", true)
+               ,       left:   getPaneSize("west", true)
+               ,       right:  getPaneSize("east", true)
+               ,       width:  0
+               ,       height: 0
+               };
+
+               // NOTE: sC = state.container
+               // calc center-pane outer dimensions
+               d.width         = sC.innerWidth - d.left - d.right;  // 
outerWidth
+               d.height        = sC.innerHeight - d.bottom - d.top; // 
outerHeight
+               // add the 'container border/padding' to get final positions 
relative to the container
+               d.top           += sC.inset.top;
+               d.bottom        += sC.inset.bottom;
+               d.left          += sC.inset.left;
+               d.right         += sC.inset.right;
+
+               return d;
+       }
+
+
+       /**
+        * @param {!Object}             el
+        * @param {boolean=}            [allStates=false]
+        */
+,      getHoverClasses = function (el, allStates) {
+               var
+                       $El             = $(el)
+               ,       type    = $El.data("layoutRole")
+               ,       pane    = $El.data("layoutEdge")
+               ,       o               = options[pane]
+               ,       root    = o[type +"Class"]
+               ,       _pane   = "-"+ pane // eg: "-west"
+               ,       _open   = "-open"
+               ,       _closed = "-closed"
+               ,       _slide  = "-sliding"
+               ,       _hover  = "-hover " // NOTE the trailing space
+               ,       _state  = $El.hasClass(root+_closed) ? _closed : _open
+               ,       _alt    = _state === _closed ? _open : _closed
+               ,       classes = (root+_hover) + (root+_pane+_hover) + 
(root+_state+_hover) + (root+_pane+_state+_hover)
+               ;
+               if (allStates) // when 'removing' classes, also remove 
alternate-state classes
+                       classes += (root+_alt+_hover) + 
(root+_pane+_alt+_hover);
+
+               if (type=="resizer" && $El.hasClass(root+_slide))
+                       classes += (root+_slide+_hover) + 
(root+_pane+_slide+_hover);
+
+               return $.trim(classes);
+       }
+,      addHover        = function (evt, el) {
+               var $E = $(el || this);
+               if (evt && $E.data("layoutRole") === "toggler")
+                       evt.stopPropagation(); // prevent triggering 'slide' on 
Resizer-bar
+               $E.addClass( getHoverClasses($E) );
+       }
+,      removeHover     = function (evt, el) {
+               var $E = $(el || this);
+               $E.removeClass( getHoverClasses($E, true) );
+       }
+
+,      onResizerEnter  = function (evt) { // ALSO called by toggler.mouseenter
+               var pane        = $(this).data("layoutEdge")
+               ,       s               = state[pane]
+               ,       $d              = $(document)
+               ;
+               // ignore closed-panes and mouse moving back & forth over 
resizer!
+               // also ignore if ANY pane is currently resizing
+               if ( s.isResizing || state.paneResizing ) return;
+
+               if (options.maskPanesEarly)
+                       showMasks( pane, { resizing: true });
+       }
+,      onResizerLeave  = function (evt, el) {
+               var     e               = el || this // el is only passed when 
called by the timer
+               ,       pane    = $(e).data("layoutEdge")
+               ,       name    = pane +"ResizerLeave"
+               ,       $d              = $(document)
+               ;
+               timer.clear(pane+"_openSlider"); // cancel slideOpen timer, if 
set
+               timer.clear(name); // cancel enableSelection timer - may re/set 
below
+               // this method calls itself on a timer because it needs to allow
+               // enough time for dragging to kick-in and set the isResizing 
flag
+               // dragging has a 100ms delay set, so this delay must be >100
+               if (!el) // 1st call - mouseleave event
+                       timer.set(name, function(){ onResizerLeave(evt, e); }, 
200);
+               // if user is resizing, dragStop will reset everything, so skip 
it here
+               else if (options.maskPanesEarly && !state.paneResizing) // 2nd 
call - by timer
+                       hideMasks();
+       }
+
+/*
+ * ###########################
+ *   INITIALIZATION METHODS
+ * ###########################
+ */
+
+       /**
+        * Initialize the layout - called automatically whenever an instance of 
layout is created
+        *
+        * @see  none - triggered onInit
+        * @return  mixed       true = fully initialized | false = panes not 
initialized (yet) | 'cancel' = abort
+        */
+,      _create = function () {
+               // initialize config/options
+               initOptions();
+               var o = options
+               ,       s = state;
+
+               // TEMP state so isInitialized returns true during init process
+               s.creatingLayout = true;
+
+               // init plugins for this layout, if there are any (eg: 
stateManagement)
+               runPluginCallbacks( Instance, $.layout.onCreate );
+
+               // options & state have been initialized, so now run beforeLoad 
callback
+               // onload will CANCEL layout creation if it returns false
+               if (false === _runCallbacks("onload_start"))
+                       return 'cancel';
+
+               // initialize the container element
+               _initContainer();
+
+               // bind hotkey function - keyDown - if required
+               initHotkeys();
+
+               // bind window.onunload
+               $(window).bind("unload."+ sID, unload);
+
+               // init plugins for this layout, if there are any (eg: 
customButtons)
+               runPluginCallbacks( Instance, $.layout.onLoad );
+
+               // if layout elements are hidden, then layout WILL NOT complete 
initialization!
+               // initLayoutElements will set initialized=true and run the 
onload callback IF successful
+               if (o.initPanes) _initLayoutElements();
+
+               delete s.creatingLayout;
+
+               return state.initialized;
+       }
+
+       /**
+        * Initialize the layout IF not already
+        *
+        * @see  All methods in Instance run this test
+        * @return  boolean     true = layoutElements have been initialized | 
false = panes are not initialized (yet)
+        */
+,      isInitialized = function () {
+               if (state.initialized || state.creatingLayout) return true;     
// already initialized
+               else return _initLayoutElements();      // try to init panes NOW
+       }
+
+       /**
+        * Initialize the layout - called automatically whenever an instance of 
layout is created
+        *
+        * @see  _create() & isInitialized
+        * @param {boolean=}            [retry=false]   // indicates this is a 
2nd try
+        * @return  An object pointer to the instance created
+        */
+,      _initLayoutElements = function (retry) {
+               // initialize config/options
+               var o = options;
+               // CANNOT init panes inside a hidden container!
+               if (!$N.is(":visible")) {
+                       // handle Chrome bug where popup window 'has no height'
+                       // if layout is BODY element, try again in 50ms
+                       // SEE: 
http://layout.jquery-dev.com/samples/test_popup_window.html
+                       if ( !retry && browser.webkit && $N[0].tagName === 
"BODY" )
+                               setTimeout(function(){ 
_initLayoutElements(true); }, 50);
+                       return false;
+               }
+
+               // a center pane is required, so make sure it exists
+               if (!getPane("center").length) {
+                       return _log( o.errors.centerPaneMissing );
+               }
+
+               // TEMP state so isInitialized returns true during init process
+               state.creatingLayout = true;
+
+               // update Container dims
+               $.extend(sC, elDims( $N, o.inset )); // passing inset means DO 
NOT include insetX values
+
+               // initialize all layout elements
+               initPanes();    // size & position panes - calls initHandles() 
- which calls initResizable()
+
+               if (o.scrollToBookmarkOnLoad) {
+                       var l = self.location;
+                       if (l.hash) l.replace( l.hash ); // scrollTo Bookmark
+               }
+
+               // check to see if this layout 'nested' inside a pane
+               if (Instance.hasParentLayout)
+                       o.resizeWithWindow = false;
+               // bind resizeAll() for 'this layout instance' to window.resize 
event
+               else if (o.resizeWithWindow)
+                       $(window).bind("resize."+ sID, windowResize);
+
+               delete state.creatingLayout;
+               state.initialized = true;
+
+               // init plugins for this layout, if there are any
+               runPluginCallbacks( Instance, $.layout.onReady );
+
+               // now run the onload callback, if exists
+               _runCallbacks("onload_end");
+
+               return true; // elements initialized successfully
+       }
+
+       /**
+        * Initialize nested layouts for a specific pane - can optionally pass 
layout-options
+        *
+        * @param {(string|Object)}     evt_or_pane     The pane being opened, 
ie: north, south, east, or west
+        * @param {Object=}                     [opts]          Layout-options 
- if passed, will OVERRRIDE options[pane].children
+        * @return  An object pointer to the layout instance created - or null
+        */
+,      createChildren = function (evt_or_pane, opts) {
+               var     pane = evtPane.call(this, evt_or_pane)
+               ,       $P      = $Ps[pane]
+               ;
+               if (!$P) return;
+               var     $C      = $Cs[pane]
+               ,       s       = state[pane]
+               ,       o       = options[pane]
+               ,       sm      = options.stateManagement || {}
+               ,       cos = opts ? (o.children = opts) : o.children
+               ;
+               if ( $.isPlainObject( cos ) )
+                       cos = [ cos ]; // convert a hash to a 1-elem array
+               else if (!cos || !$.isArray( cos ))
+                       return;
+
+               $.each( cos, function (idx, co) {
+                       if ( !$.isPlainObject( co ) ) return;
+
+                       // determine which element is supposed to be the 'child 
container'
+                       // if pane has a 'containerSelector' OR a 
'content-div', use those instead of the pane
+                       var $containers = co.containerSelector ? $P.find( 
co.containerSelector ) : ($C || $P);
+
+                       $containers.each(function(){
+                               var $cont       = $(this)
+                               ,       child   = $cont.data("layout") //       
see if a child-layout ALREADY exists on this element
+                               ;
+                               // if no layout exists, but children are set, 
try to create the layout now
+                               if (!child) {
+                                       // TODO: see about moving this to the 
stateManagement plugin, as a method
+                                       // set a unique child-instance key for 
this layout, if not already set
+                                       setInstanceKey({ container: $cont, 
options: co }, s );
+                                       // If THIS layout has a hash in 
stateManagement.autoLoad,
+                                       // then see if it also contains 
state-data for this child-layout
+                                       // If so, copy the stateData to 
child.options.stateManagement.autoLoad
+                                       if ( sm.includeChildren && 
state.stateData[pane] ) {
+                                               //      THIS layout's state was 
cached when its state was loaded
+                                               var     paneChildren = 
state.stateData[pane].children || {}
+                                               ,       childState      = 
paneChildren[ co.instanceKey ]
+                                               ,       co_sm           = 
co.stateManagement || (co.stateManagement = { autoLoad: true })
+                                               ;
+                                               // COPY the stateData into the 
autoLoad key
+                                               if ( co_sm.autoLoad === true && 
childState ) {
+                                                       co_sm.autoSave          
        = false; // disable autoSave because saving handled by parent-layout
+                                                       co_sm.includeChildren   
= true;  // cascade option - FOR NOW
+                                                       co_sm.autoLoad = 
$.extend(true, {}, childState); // COPY the state-hash
+                                               }
+                                       }
+
+                                       // create the layout
+                                       child = $cont.layout( co );
+
+                                       // if successful, update data
+                                       if (child) {
+                                               // add the child and update all 
layout-pointers
+                                               // MAY have already been done 
by child-layout calling parent.refreshChildren()
+                                               refreshChildren( pane, child );
+                                       }
+                               }
+                       });
+               });
+       }
+
+,      setInstanceKey = function (child, parentPaneState) {
+               // create a named key for use in state and instance branches
+               var     $c      = child.container
+               ,       o       = child.options
+               ,       sm      = o.stateManagement
+               ,       key     = o.instanceKey || $c.data("layoutInstanceKey")
+               ;
+               if (!key) key = (sm && sm.cookie ? sm.cookie.name : '') || 
o.name; // look for a name/key
+               if (!key) key = "layout"+ (++parentPaneState.childIdx); // if 
no name/key found, generate one
+               else key = key.replace(/[^\w-]/gi, '_').replace(/_{2,}/g, '_'); 
 // ensure is valid as a hash key
+               o.instanceKey = key;
+               $c.data("layoutInstanceKey", key); // useful if layout is 
destroyed and then recreated
+               return key;
+       }
+
+       /**
+        * @param {string}              pane            The pane being opened, 
ie: north, south, east, or west
+        * @param {Object=}             newChild        New child-layout 
Instance to add to this pane
+        */
+,      refreshChildren = function (pane, newChild) {
+               var     $P      = $Ps[pane]
+               ,       pC      = children[pane]
+               ,       s       = state[pane]
+               ,       o
+               ;
+               // check for destroy()ed layouts and update the child pointers 
& arrays
+               if ($.isPlainObject( pC )) {
+                       $.each( pC, function (key, child) {
+                               if (child.destroyed) delete pC[key]
+                       });
+                       // if no more children, remove the children hash
+                       if ($.isEmptyObject( pC ))
+                               pC = children[pane] = null; // clear children 
hash
+               }
+
+               // see if there is a directly-nested layout inside this pane
+               // if there is, then there can be only ONE child-layout, so 
check that...
+               if (!newChild && !pC) {
+                       newChild = $P.data("layout");
+               }
+
+               // if a newChild instance was passed, add it to children[pane]
+               if (newChild) {
+                       // update child.state
+                       newChild.hasParentLayout = true; // set parent-flag in 
child
+                       // instanceKey is a key-name used in both state and 
children
+                       o = newChild.options;
+                       // set a unique child-instance key for this layout, if 
not already set
+                       setInstanceKey( newChild, s );
+                       // add pointer to pane.children hash
+                       if (!pC) pC = children[pane] = {}; // create an empty 
children hash
+                       pC[ o.instanceKey ] = 
newChild.container.data("layout"); // add childLayout instance
+               }
+
+               // ALWAYS refresh the pane.children alias, even if null
+               Instance[pane].children = children[pane];
+
+               // if newChild was NOT passed - see if there is a child layout 
NOW
+               if (!newChild) {
+                       createChildren(pane); // MAY create a child and re-call 
this method
+               }
+       }
+
+,      windowResize = function () {
+               var     o = options
+               ,       delay = Number(o.resizeWithWindowDelay);
+               if (delay < 10) delay = 100; // MUST have a delay!
+               // resizing uses a delay-loop because the resize event fires 
repeatly - except in FF, but delay anyway
+               timer.clear("winResize"); // if already running
+               timer.set("winResize", function(){
+                       timer.clear("winResize");
+                       timer.clear("winResizeRepeater");
+                       var dims = elDims( $N, o.inset );
+                       // only trigger resizeAll() if container has changed 
size
+                       if (dims.innerWidth !== sC.innerWidth || 
dims.innerHeight !== sC.innerHeight)
+                               resizeAll();
+               }, delay);
+               // ALSO set fixed-delay timer, if not already running
+               if (!timer.data["winResizeRepeater"]) setWindowResizeRepeater();
+       }
+
+,      setWindowResizeRepeater = function () {
+               var delay = Number(options.resizeWithWindowMaxDelay);
+               if (delay > 0)
+                       timer.set("winResizeRepeater", function(){ 
setWindowResizeRepeater(); resizeAll(); }, delay);
+       }
+
+,      unload = function () {
+               var o = options;
+
+               _runCallbacks("onunload_start");
+
+               // trigger plugin callabacks for this layout (eg: 
stateManagement)
+               runPluginCallbacks( Instance, $.layout.onUnload );
+
+               _runCallbacks("onunload_end");
+       }
+
+       /**
+        * Validate and initialize container CSS and events
+        *
+        * @see  _create()
+        */
+,      _initContainer = function () {
+               var
+                       N               = $N[0] 
+               ,       $H              = $("html")
+               ,       tag             = sC.tagName = N.tagName
+               ,       id              = sC.id = N.id
+               ,       cls             = sC.className = N.className
+               ,       o               = options
+               ,       name    = o.name
+               ,       props   = "position,margin,padding,border"
+               ,       css             = "layoutCSS"
+               ,       CSS             = {}
+               ,       hid             = "hidden" // used A LOT!
+               //      see if this container is a 'pane' inside an outer-layout
+               ,       parent  = $N.data("parentLayout")       // 
parent-layout Instance
+               ,       pane    = $N.data("layoutEdge")         // pane-name in 
parent-layout
+               ,       isChild = parent && pane
+               ,       num             = $.layout.cssNum
+               ,       $parent, n
+               ;
+               // sC = state.container
+               sC.selector = $N.selector.split(".slice")[0];
+               sC.ref          = (o.name ? o.name +' layout / ' : '') + tag + 
(id ? "#"+id : cls ? '.['+cls+']' : ''); // used in messages
+               sC.isBody       = (tag === "BODY");
+
+               // try to find a parent-layout
+               if (!isChild && !sC.isBody) {
+                       $parent = $N.closest("."+ 
$.layout.defaults.panes.paneClass);
+                       parent  = $parent.data("parentLayout");
+                       pane    = $parent.data("layoutEdge");
+                       isChild = parent && pane;
+               }
+
+               $N      .data({
+                               layout: Instance
+                       ,       layoutContainer: sID // FLAG to indicate this 
is a layout-container - contains unique internal ID
+                       })
+                       .addClass(o.containerClass)
+               ;
+               var layoutMethods = {
+                       destroy:        ''
+               ,       initPanes:      ''
+               ,       resizeAll:      'resizeAll'
+               ,       resize:         'resizeAll'
+               };
+               // loop hash and bind all methods - include layoutID namespacing
+               for (name in layoutMethods) {
+                       $N.bind("layout"+ name.toLowerCase() +"."+ sID, 
Instance[ layoutMethods[name] || name ]);
+               }
+
+               // if this container is another layout's 'pane', then set 
child/parent pointers
+               if (isChild) {
+                       // update parent flag
+                       Instance.hasParentLayout = true;
+                       // set pointers to THIS child-layout (Instance) in 
parent-layout
+                       parent.refreshChildren( pane, Instance );
+               }
+
+               // SAVE original container CSS for use in destroy()
+               if (!$N.data(css)) {
+                       // handle props like overflow different for BODY & HTML 
- has 'system default' values
+                       if (sC.isBody) {
+                               // SAVE <BODY> CSS
+                               $N.data(css, $.extend( styles($N, props), {
+                                       height:         $N.css("height")
+                               ,       overflow:       $N.css("overflow")
+                               ,       overflowX:      $N.css("overflowX")
+                               ,       overflowY:      $N.css("overflowY")
+                               }));
+                               // ALSO SAVE <HTML> CSS
+                               $H.data(css, $.extend( styles($H, 'padding'), {
+                                       height:         "auto" // FF would 
return a fixed px-size!
+                               ,       overflow:       $H.css("overflow")
+                               ,       overflowX:      $H.css("overflowX")
+                               ,       overflowY:      $H.css("overflowY")
+                               }));
+                       }
+                       else // handle props normally for non-body elements
+                               $N.data(css, styles($N, 
props+",top,bottom,left,right,width,height,overflow,overflowX,overflowY") );
+               }
+
+               try {
+                       // common container CSS
+                       CSS = {
+                               overflow:       hid
+                       ,       overflowX:      hid
+                       ,       overflowY:      hid
+                       };
+                       $N.css( CSS );
+
+                       if (o.inset && !$.isPlainObject(o.inset)) {
+                               // can specify a single number for equal outset 
all-around
+                               n = parseInt(o.inset, 10) || 0
+                               o.inset = {
+                                       top:    n
+                               ,       bottom: n
+                               ,       left:   n
+                               ,       right:  n
+                               };
+                       }
+
+                       // format html & body if this is a full page layout
+                       if (sC.isBody) {
+                               // if HTML has padding, use this as an 
outer-spacing around BODY
+                               if (!o.outset) {
+                                       // use padding from parent-elem (HTML) 
as outset
+                                       o.outset = {
+                                               top:    num($H, "paddingTop")
+                                       ,       bottom: num($H, "paddingBottom")
+                                       ,       left:   num($H, "paddingLeft")
+                                       ,       right:  num($H, "paddingRight")
+                                       };
+                               }
+                               else if (!$.isPlainObject(o.outset)) {
+                                       // can specify a single number for 
equal outset all-around
+                                       n = parseInt(o.outset, 10) || 0
+                                       o.outset = {
+                                               top:    n
+                                       ,       bottom: n
+                                       ,       left:   n
+                                       ,       right:  n
+                                       };
+                               }
+                               // HTML
+                               $H.css( CSS ).css({
+                                       height:         "100%"
+                               ,       border:         "none"  // no border or 
padding allowed when using height = 100%
+                               ,       padding:        0               // ditto
+                               ,       margin:         0
+                               });
+                               // BODY
+                               if (browser.isIE6) {
+                                       // IE6 CANNOT use the trick of setting 
absolute positioning on all 4 sides - must have 'height'
+                                       $N.css({
+                                               width:          "100%"
+                                       ,       height:         "100%"
+                                       ,       border:         "none"  // no 
border or padding allowed when using height = 100%
+                                       ,       padding:        0               
// ditto
+                                       ,       margin:         0
+                                       ,       position:       "relative"
+                                       });
+                                       // convert body padding to an inset 
option - the border cannot be measured in IE6!
+                                       if (!o.inset) o.inset = elDims( $N 
).inset;
+                               }
+                               else { // use absolute positioning for BODY to 
allow borders & padding without overflow
+                                       $N.css({
+                                               width:          "auto"
+                                       ,       height:         "auto"
+                                       ,       margin:         0
+                                       ,       position:       "absolute"      
// allows for border and padding on BODY
+                                       });
+                                       // apply edge-positioning created above
+                                       $N.css( o.outset );
+                               }
+                               // set current layout-container dimensions
+                               $.extend(sC, elDims( $N, o.inset )); // passing 
inset means DO NOT include insetX values
+                       }
+                       else {
+                               // container MUST have 'position'
+                               var     p = $N.css("position");
+                               if (!p || !p.match(/(fixed|absolute|relative)/))
+                                       $N.css("position","relative");
+
+                               // set current layout-container dimensions
+                               if ( $N.is(":visible") ) {
+                                       $.extend(sC, elDims( $N, o.inset )); // 
passing inset means DO NOT change insetX (padding) values
+                                       if (sC.innerHeight < 1) // container 
has no 'height' - warn developer
+                                               _log( 
o.errors.noContainerHeight.replace(/CONTAINER/, sC.ref) );
+                               }
+                       }
+
+                       // if container has min-width/height, then enable 
scrollbar(s)
+                       if ( num($N, "minWidth")  ) 
$N.parent().css("overflowX","auto");
+                       if ( num($N, "minHeight") ) 
$N.parent().css("overflowY","auto");
+
+               } catch (ex) {}
+       }
+
+       /**
+        * Bind layout hotkeys - if options enabled
+        *
+        * @see  _create() and addPane()
+        * @param {string=}     [panes=""]      The edge(s) to process
+        */
+,      initHotkeys = function (panes) {
+               panes = panes ? panes.split(",") : _c.borderPanes;
+               // bind keyDown to capture hotkeys, if option enabled for ANY 
pane
+               $.each(panes, function (i, pane) {
+                       var o = options[pane];
+                       if (o.enableCursorHotkey || o.customHotkey) {
+                               $(document).bind("keydown."+ sID, keyDown); // 
only need to bind this ONCE
+                               return false; // BREAK - binding was done
+                       }
+               });
+       }
+
+       /**
+        * Build final OPTIONS data
+        *
+        * @see  _create()
+        */
+,      initOptions = function () {
+               var data, d, pane, key, val, i, c, o;
+
+               // reprocess user's layout-options to have correct options 
sub-key structure
+               opts = $.layout.transformData( opts, true ); // panes = default 
subkey
+
+               // auto-rename old options for backward compatibility
+               opts = $.layout.backwardCompatibility.renameAllOptions( opts );
+
+               // if user-options has 'panes' key (pane-defaults), clean it...
+               if (!$.isEmptyObject(opts.panes)) {
+                       // REMOVE any pane-defaults that MUST be set per-pane
+                       data = $.layout.optionsMap.noDefault;
+                       for (i=0, c=data.length; i<c; i++) {
+                               key = data[i];
+                               delete opts.panes[key]; // OK if does not exist
+                       }
+                       // REMOVE any layout-options specified under opts.panes
+                       data = $.layout.optionsMap.layout;
+                       for (i=0, c=data.length; i<c; i++) {
+                               key = data[i];
+                               delete opts.panes[key]; // OK if does not exist
+                       }
+               }
+
+               // MOVE any NON-layout-options from opts-root to opts.panes
+               data = $.layout.optionsMap.layout;
+               var rootKeys = $.layout.config.optionRootKeys;
+               for (key in opts) {
+                       val = opts[key];
+                       if ($.inArray(key, rootKeys) < 0 && $.inArray(key, 
data) < 0) {
+                               if (!opts.panes[key])
+                                       opts.panes[key] = $.isPlainObject(val) 
? $.extend(true, {}, val) : val;
+                               delete opts[key]
+                       }
+               }
+
+               // START by updating ALL options from opts
+               $.extend(true, options, opts);
+
+               // CREATE final options (and config) for EACH pane
+               $.each(_c.allPanes, function (i, pane) {
+
+                       // apply 'pane-defaults' to CONFIG.[PANE]
+                       _c[pane] = $.extend(true, {}, _c.panes, _c[pane]);
+
+                       d = options.panes;
+                       o = options[pane];
+
+                       // center-pane uses SOME keys in defaults.panes branch
+                       if (pane === 'center') {
+                               // ONLY copy keys from opts.panes listed in: 
$.layout.optionsMap.center
+                               data = $.layout.optionsMap.center;              
// list of 'center-pane keys'
+                               for (i=0, c=data.length; i<c; i++) {    // loop 
the list...
+                                       key = data[i];
+                                       // only need to use pane-default if 
pane-specific value not set
+                                       if (!opts.center[key] && 
(opts.panes[key] || !o[key]))
+                                               o[key] = d[key]; // pane-default
+                               }
+                       }
+                       else {
+                               // border-panes use ALL keys in defaults.panes 
branch
+                               o = options[pane] = $.extend(true, {}, d, o); 
// re-apply pane-specific opts AFTER pane-defaults
+                               createFxOptions( pane );
+                               // ensure all border-pane-specific base-classes 
exist
+                               if (!o.resizerClass)    o.resizerClass  = 
"ui-layout-resizer";
+                               if (!o.togglerClass)    o.togglerClass  = 
"ui-layout-toggler";
+                       }
+                       // ensure we have base pane-class (ALL panes)
+                       if (!o.paneClass) o.paneClass = "ui-layout-pane";
+               });
+
+               // update options.zIndexes if a zIndex-option specified
+               var zo  = opts.zIndex
+               ,       z       = options.zIndexes;
+               if (zo > 0) {
+                       z.pane_normal           = zo;
+                       z.content_mask          = max(zo+1, z.content_mask);    
// MIN = +1
+                       z.resizer_normal        = max(zo+2, z.resizer_normal);  
// MIN = +2
+               }
+
+               // DELETE 'panes' key now that we are done - values were copied 
to EACH pane
+               delete options.panes;
+
+
+               function createFxOptions ( pane ) {
+                       var     o = options[pane]
+                       ,       d = options.panes;
+                       // ensure fxSettings key to avoid errors
+                       if (!o.fxSettings) o.fxSettings = {};
+                       if (!d.fxSettings) d.fxSettings = {};
+
+                       $.each(["_open","_close","_size"], function (i,n) { 
+                               var
+                                       sName           = "fxName"+ n
+                               ,       sSpeed          = "fxSpeed"+ n
+                               ,       sSettings       = "fxSettings"+ n
+                                       // recalculate fxName according to 
specificity rules
+                               ,       fxName = o[sName] =
+                                               o[sName]        // 
options.west.fxName_open
+                                       ||      d[sName]        // 
options.panes.fxName_open
+                                       ||      o.fxName        // 
options.west.fxName
+                                       ||      d.fxName        // 
options.panes.fxName
+                                       ||      "none"          // MEANS 
$.layout.defaults.panes.fxName == "" || false || null || 0
+                               ,       fxExists        = $.effects && 
($.effects[fxName] || ($.effects.effect && $.effects.effect[fxName]))
+                               ;
+                               // validate fxName to ensure is valid effect - 
MUST have effect-config data in options.effects
+                               if (fxName === "none" || 
!options.effects[fxName] || !fxExists)
+                                       fxName = o[sName] = "none"; // effect 
not loaded OR unrecognized fxName
+
+                               // set vars for effects subkeys to simplify 
logic
+                               var     fx              = 
options.effects[fxName] || {} // effects.slide
+                               ,       fx_all  = fx.all        || null         
                // effects.slide.all
+                               ,       fx_pane = fx[pane]      || null         
                // effects.slide.west
+                               ;
+                               // create fxSpeed[_open|_close|_size]
+                               o[sSpeed] =
+                                       o[sSpeed]                               
// options.west.fxSpeed_open
+                               ||      d[sSpeed]                               
// options.west.fxSpeed_open
+                               ||      o.fxSpeed                               
// options.west.fxSpeed
+                               ||      d.fxSpeed                               
// options.panes.fxSpeed
+                               ||      null                                    
// DEFAULT - let fxSetting.duration control speed
+                               ;
+                               // create fxSettings[_open|_close|_size]
+                               o[sSettings] = $.extend(
+                                       true
+                               ,       {}
+                               ,       fx_all                                  
// effects.slide.all
+                               ,       fx_pane                                 
// effects.slide.west
+                               ,       d.fxSettings                    // 
options.panes.fxSettings
+                               ,       o.fxSettings                    // 
options.west.fxSettings
+                               ,       d[sSettings]                    // 
options.panes.fxSettings_open
+                               ,       o[sSettings]                    // 
options.west.fxSettings_open
+                               );
+                       });
+
+                       // DONE creating action-specific-settings for this pane,
+                       // so DELETE generic options - are no longer meaningful
+                       delete o.fxName;
+                       delete o.fxSpeed;
+                       delete o.fxSettings;
+               }
+       }
+
+       /**
+        * Initialize module objects, styling, size and position for all panes
+        *
+        * @see  _initElements()
+        * @param {string}      pane            The pane to process
+        */
+,      getPane = function (pane) {
+               var sel = options[pane].paneSelector
+               if (sel.substr(0,1)==="#") // ID selector
+                       // NOTE: elements selected 'by ID' DO NOT have to be 
'children'
+                       return $N.find(sel).eq(0);
+               else { // class or other selector
+                       var $P = $N.children(sel).eq(0);
+                       // look for the pane nested inside a 'form' element
+                       return $P.length ? $P : 
$N.children("form:first").children(sel).eq(0);
+               }
+       }
+
+       /**
+        * @param {Object=}             evt
+        */
+,      initPanes = function (evt) {
+               // stopPropagation if called by trigger("layoutinitpanes") - 
use evtPane utility 
+               evtPane(evt);
+
+               // NOTE: do north & south FIRST so we can measure their height 
- do center LAST
+               $.each(_c.allPanes, function (idx, pane) {
+                       addPane( pane, true );
+               });
+
+               // init the pane-handles NOW in case we have to hide or close 
the pane below
+               initHandles();
+
+               // now that all panes have been initialized and initially-sized,
+               // make sure there is really enough space available for each 
pane
+               $.each(_c.borderPanes, function (i, pane) {
+                       if ($Ps[pane] && state[pane].isVisible) { // pane is 
OPEN
+                               setSizeLimits(pane);
+                               makePaneFit(pane); // pane may be Closed, 
Hidden or Resized by makePaneFit()
+                       }
+               });
+               // size center-pane AGAIN in case we 'closed' a border-pane in 
loop above
+               sizeMidPanes("center");
+
+               //      Chrome/Webkit sometimes fires callbacks BEFORE it 
completes resizing!
+               //      Before RC30.3, there was a 10ms delay here, but that 
caused layout 
+               //      to load asynchrously, which is BAD, so try skipping 
delay for now
+
+               // process pane contents and callbacks, and init/resize 
child-layout if exists
+               $.each(_c.allPanes, function (idx, pane) {
+                       afterInitPane(pane);
+               });
+       }
+
+       /**
+        * Add a pane to the layout - subroutine of initPanes()
+        *
+        * @see  initPanes()
+        * @param {string}      pane                    The pane to process
+        * @param {boolean=}    [force=false]   Size content after init
+        */
+,      addPane = function (pane, force) {
+               if ( !force && !isInitialized() ) return;
+               var
+                       o               = options[pane]
+               ,       s               = state[pane]
+               ,       c               = _c[pane]
+               ,       dir             = c.dir
+               ,       fx              = s.fx
+               ,       spacing = o.spacing_open || 0
+               ,       isCenter = (pane === "center")
+               ,       CSS             = {}
+               ,       $P              = $Ps[pane]
+               ,       size, minSize, maxSize, child
+               ;
+               // if pane-pointer already exists, remove the old one first
+               if ($P)
+                       removePane( pane, false, true, false );
+               else
+                       $Cs[pane] = false; // init
+
+               $P = $Ps[pane] = getPane(pane);
+               if (!$P.length) {
+                       $Ps[pane] = false; // logic
+                       return;
+               }
+
+               // SAVE original Pane CSS
+               if (!$P.data("layoutCSS")) {
+                       var props = 
"position,top,left,bottom,right,width,height,overflow,zIndex,display,backgroundColor,padding,margin,border";
+                       $P.data("layoutCSS", styles($P, props));
+               }
+
+               // create alias for pane data in Instance - initHandles will 
add more
+               Instance[pane] = {
+                       name:           pane
+               ,       pane:           $Ps[pane]
+               ,       content:        $Cs[pane]
+               ,       options:        options[pane]
+               ,       state:          state[pane]
+               ,       children:       children[pane]
+               };
+
+               // add classes, attributes & events
+               $P      .data({
+                               parentLayout:   Instance                // 
pointer to Layout Instance
+                       ,       layoutPane:             Instance[pane]  // NEW 
pointer to pane-alias-object
+                       ,       layoutEdge:             pane
+                       ,       layoutRole:             "pane"
+                       })
+                       .css(c.cssReq).css("zIndex", 
options.zIndexes.pane_normal)
+                       .css(o.applyDemoStyles ? c.cssDemo : {}) // demo styles
+                       .addClass( o.paneClass +" "+ o.paneClass+"-"+pane ) // 
default = "ui-layout-pane ui-layout-pane-west" - may be a dupe of 'paneSelector'
+                       .bind("mouseenter."+ sID, addHover )
+                       .bind("mouseleave."+ sID, removeHover )
+                       ;
+               var paneMethods = {
+                               hide:                           ''
+                       ,       show:                           ''
+                       ,       toggle:                         ''
+                       ,       close:                          ''
+                       ,       open:                           ''
+                       ,       slideOpen:                      ''
+                       ,       slideClose:                     ''
+                       ,       slideToggle:            ''
+                       ,       size:                           'sizePane'
+                       ,       sizePane:                       'sizePane'
+                       ,       sizeContent:            ''
+                       ,       sizeHandles:            ''
+                       ,       enableClosable:         ''
+                       ,       disableClosable:        ''
+                       ,       enableSlideable:        ''
+                       ,       disableSlideable:       ''
+                       ,       enableResizable:        ''
+                       ,       disableResizable:       ''
+                       ,       swapPanes:                      'swapPanes'
+                       ,       swap:                           'swapPanes'
+                       ,       move:                           'swapPanes'
+                       ,       removePane:                     'removePane'
+                       ,       remove:                         'removePane'
+                       ,       createChildren:         ''
+                       ,       resizeChildren:         ''
+                       ,       resizeAll:                      'resizeAll'
+                       ,       resizeLayout:           'resizeAll'
+                       }
+               ,       name;
+               // loop hash and bind all methods - include layoutID namespacing
+               for (name in paneMethods) {
+                       $P.bind("layoutpane"+ name.toLowerCase() +"."+ sID, 
Instance[ paneMethods[name] || name ]);
+               }
+
+               // see if this pane has a 'scrolling-content element'
+               initContent(pane, false); // false = do NOT sizeContent() - 
called later
+
+               if (!isCenter) {
+                       // call _parseSize AFTER applying pane classes & styles 
- but before making visible (if hidden)
+                       // if o.size is auto or not valid, then MEASURE the 
pane and use that as its 'size'
+                       size    = s.size = _parseSize(pane, o.size);
+                       minSize = _parseSize(pane,o.minSize) || 1;
+                       maxSize = _parseSize(pane,o.maxSize) || 100000;
+                       if (size > 0) size = max(min(size, maxSize), minSize);
+                       s.autoResize = o.autoResize; // used with percentage 
sizes
+
+                       // state for border-panes
+                       s.isClosed  = false; // true = pane is closed
+                       s.isSliding = false; // true = pane is currently open 
by 'sliding' over adjacent panes
+                       s.isResizing= false; // true = pane is in process of 
being resized
+                       s.isHidden      = false; // true = pane is hidden - no 
spacing, resizer or toggler is visible!
+
+                       // array for 'pin buttons' whose classNames are 
auto-updated on pane-open/-close
+                       if (!s.pins) s.pins = [];
+               }
+               //      states common to ALL panes
+               s.tagName       = $P[0].tagName;
+               s.edge          = pane;         // useful if pane is (or about 
to be) 'swapped' - easy find out where it is (or is going)
+               s.noRoom        = false;        // true = pane 'automatically' 
hidden due to insufficient room - will unhide automatically
+               s.isVisible     = true;         // false = pane is invisible - 
closed OR hidden - simplify logic
+
+               // init pane positioning
+               setPanePosition( pane );
+
+               // if pane is not visible, 
+               if (dir === "horz") // north or south pane
+                       CSS.height = cssH($P, size);
+               else if (dir === "vert") // east or west pane
+                       CSS.width = cssW($P, size);
+               //else if (isCenter) {}
+
+               $P.css(CSS); // apply size -- top, bottom & height will be set 
by sizeMidPanes
+               if (dir != "horz") sizeMidPanes(pane, true); // true = 
skipCallback
+
+               // if manually adding a pane AFTER layout initialization, 
then...
+               if (state.initialized) {
+                       initHandles( pane );
+                       initHotkeys( pane );
+               }
+
+               // close or hide the pane if specified in settings
+               if (o.initClosed && o.closable && !o.initHidden)
+                       close(pane, true, true); // true, true = force, 
noAnimation
+               else if (o.initHidden || o.initClosed)
+                       hide(pane); // will be completely invisible - no 
resizer or spacing
+               else if (!s.noRoom)
+                       // make the pane visible - in case was initially hidden
+                       $P.css("display","block");
+               // ELSE setAsOpen() - called later by initHandles()
+
+               // RESET visibility now - pane will appear IF display:block
+               $P.css("visibility","visible");
+
+               // check option for auto-handling of pop-ups & drop-downs
+               if (o.showOverflowOnHover)
+                       $P.hover( allowOverflow, resetOverflow );
+
+               // if manually adding a pane AFTER layout initialization, 
then...
+               if (state.initialized) {
+                       afterInitPane( pane );
+               }
+       }
+
+,      afterInitPane = function (pane) {
+               var     $P      = $Ps[pane]
+               ,       s       = state[pane]
+               ,       o       = options[pane]
+               ;
+               if (!$P) return;
+
+               // see if there is a directly-nested layout inside this pane
+               if ($P.data("layout"))
+                       refreshChildren( pane, $P.data("layout") );
+
+               // process pane contents and callbacks, and init/resize 
child-layout if exists
+               if (s.isVisible) { // pane is OPEN
+                       if (state.initialized) // this pane was added AFTER 
layout was created
+                               resizeAll(); // will also sizeContent
+                       else
+                               sizeContent(pane);
+
+                       if (o.triggerEventsOnLoad)
+                               _runCallbacks("onresize_end", pane);
+                       else // automatic if onresize called, otherwise call it 
specifically
+                               // resize child - IF inner-layout already 
exists (created before this layout)
+                               resizeChildren(pane, true); // a previously 
existing childLayout
+               }
+
+               // init childLayouts - even if pane is not visible
+               if (o.initChildren && o.children)
+                       createChildren(pane);
+       }
+
+       /**
+        * @param {string=}     panes           The pane(s) to process
+        */
+,      setPanePosition = function (panes) {
+               panes = panes ? panes.split(",") : _c.borderPanes;
+
+               // create toggler DIVs for each pane, and set object pointers 
for them, eg: $R.north = north toggler DIV
+               $.each(panes, function (i, pane) {
+                       var $P  = $Ps[pane]
+                       ,       $R      = $Rs[pane]
+                       ,       o       = options[pane]
+                       ,       s       = state[pane]
+                       ,       side =  _c[pane].side
+                       ,       CSS     = {}
+                       ;
+                       if (!$P) return; // pane does not exist - skip
+
+                       // set css-position to account for container borders & 
padding
+                       switch (pane) {
+                               case "north":   CSS.top         = sC.inset.top;
+                                                               CSS.left        
= sC.inset.left;
+                                                               CSS.right       
= sC.inset.right;
+                                                               break;
+                               case "south":   CSS.bottom      = 
sC.inset.bottom;
+                                                               CSS.left        
= sC.inset.left;
+                                                               CSS.right       
= sC.inset.right;
+                                                               break;
+                               case "west":    CSS.left        = 
sC.inset.left; // top, bottom & height set by sizeMidPanes()
+                                                               break;
+                               case "east":    CSS.right       = 
sC.inset.right; // ditto
+                                                               break;
+                               case "center":  // top, left, width & height 
set by sizeMidPanes()
+                       }
+                       // apply position
+                       $P.css(CSS); 
+
+                       // update resizer position
+                       if ($R && s.isClosed)
+                               $R.css(side, sC.inset[side]);
+                       else if ($R && !s.isHidden)
+                               $R.css(side, sC.inset[side] + 
getPaneSize(pane));
+               });
+       }
+
+       /**
+        * Initialize module objects, styling, size and position for all resize 
bars and toggler buttons
+        *
+        * @see  _create()
+        * @param {string=}     [panes=""]      The edge(s) to process
+        */
+,      initHandles = function (panes) {
+               panes = panes ? panes.split(",") : _c.borderPanes;
+
+               // create toggler DIVs for each pane, and set object pointers 
for them, eg: $R.north = north toggler DIV
+               $.each(panes, function (i, pane) {
+                       var $P          = $Ps[pane];
+                       $Rs[pane]       = false; // INIT
+                       $Ts[pane]       = false;
+                       if (!$P) return; // pane does not exist - skip
+
+                       var     o               = options[pane]
+                       ,       s               = state[pane]
+                       ,       c               = _c[pane]
+                       ,       paneId  = o.paneSelector.substr(0,1) === "#" ? 
o.paneSelector.substr(1) : ""
+                       ,       rClass  = o.resizerClass
+                       ,       tClass  = o.togglerClass
+                       ,       spacing = (s.isVisible ? o.spacing_open : 
o.spacing_closed)
+                       ,       _pane   = "-"+ pane // used for classNames
+                       ,       _state  = (s.isVisible ? "-open" : "-closed") 
// used for classNames
+                       ,       I               = Instance[pane]
+                               // INIT RESIZER BAR
+                       ,       $R              = I.resizer = $Rs[pane] = 
$("<div></div>")
+                               // INIT TOGGLER BUTTON
+                       ,       $T              = I.toggler = (o.closable ? 
$Ts[pane] = $("<div></div>") : false)
+                       ;
+
+                       //if (s.isVisible && o.resizable) ... handled by 
initResizable
+                       if (!s.isVisible && o.slidable)
+                               $R.attr("title", o.tips.Slide).css("cursor", 
o.sliderCursor);
+
+                       $R      // if paneSelector is an ID, then create a 
matching ID for the resizer, eg: "#paneLeft" => "paneLeft-resizer"
+                               .attr("id", paneId ? paneId +"-resizer" : "" )
+                               .data({
+                                       parentLayout:   Instance
+                               ,       layoutPane:             Instance[pane]  
// NEW pointer to pane-alias-object
+                               ,       layoutEdge:             pane
+                               ,       layoutRole:             "resizer"
+                               })
+                               .css(_c.resizers.cssReq).css("zIndex", 
options.zIndexes.resizer_normal)
+                               .css(o.applyDemoStyles ? _c.resizers.cssDemo : 
{}) // add demo styles
+                               .addClass(rClass +" "+ rClass+_pane)
+                               .hover(addHover, removeHover) // ALWAYS add 
hover-classes, even if resizing is not enabled - handle with CSS instead
+                               .hover(onResizerEnter, onResizerLeave) // 
ALWAYS NEED resizer.mouseleave to balance toggler.mouseenter
+                               .mousedown($.layout.disableTextSelection)       
// prevent text-selection OUTSIDE resizer
+                               .mouseup($.layout.enableTextSelection)          
// not really necessary, but just in case
+                               .appendTo($N) // append DIV to container
+                       ;
+                       if ($.fn.disableSelection)
+                               $R.disableSelection(); // prevent 
text-selection INSIDE resizer
+                       if (o.resizerDblClickToggle)
+                               $R.bind("dblclick."+ sID, toggle );
+
+                       if ($T) {
+                               $T      // if paneSelector is an ID, then 
create a matching ID for the resizer, eg: "#paneLeft" => "#paneLeft-toggler"
+                                       .attr("id", paneId ? paneId +"-toggler" 
: "" )
+                                       .data({
+                                               parentLayout:   Instance
+                                       ,       layoutPane:             
Instance[pane]  // NEW pointer to pane-alias-object
+                                       ,       layoutEdge:             pane
+                                       ,       layoutRole:             
"toggler"
+                                       })
+                                       .css(_c.togglers.cssReq) // add 
base/required styles
+                                       .css(o.applyDemoStyles ? 
_c.togglers.cssDemo : {}) // add demo styles
+                                       .addClass(tClass +" "+ tClass+_pane)
+                                       .hover(addHover, removeHover) // ALWAYS 
add hover-classes, even if toggling is not enabled - handle with CSS instead
+                                       .bind("mouseenter", onResizerEnter) // 
NEED toggler.mouseenter because mouseenter MAY NOT fire on resizer
+                                       .appendTo($R) // append SPAN to resizer 
DIV
+                               ;
+                               // ADD INNER-SPANS TO TOGGLER
+                               if (o.togglerContent_open) // ui-layout-open
+                                       $("<span>"+ o.togglerContent_open 
+"</span>")
+                                               .data({
+                                                       layoutEdge:             
pane
+                                               ,       layoutRole:             
"togglerContent"
+                                               })
+                                               .data("layoutRole", 
"togglerContent")
+                                               .data("layoutEdge", pane)
+                                               .addClass("content 
content-open")
+                                               .css("display","none")
+                                               .appendTo( $T )
+                                               //.hover( addHover, removeHover 
) // use ui-layout-toggler-west-hover .content-open instead!
+                                       ;
+                               if (o.togglerContent_closed) // ui-layout-closed
+                                       $("<span>"+ o.togglerContent_closed 
+"</span>")
+                                               .data({
+                                                       layoutEdge:             
pane
+                                               ,       layoutRole:             
"togglerContent"
+                                               })
+                                               .addClass("content 
content-closed")
+                                               .css("display","none")
+                                               .appendTo( $T )
+                                               //.hover( addHover, removeHover 
) // use ui-layout-toggler-west-hover .content-closed instead!
+                                       ;
+                               // ADD TOGGLER.click/.hover
+                               enableClosable(pane);
+                       }
+
+                       // add Draggable events
+                       initResizable(pane);
+
+                       // ADD CLASSNAMES & SLIDE-BINDINGS - eg: class="resizer 
resizer-west resizer-open"
+                       if (s.isVisible)
+                               setAsOpen(pane);        // onOpen will be 
called, but NOT onResize
+                       else {
+                               setAsClosed(pane);      // onClose will be 
called
+                               bindStartSlidingEvents(pane, true); // will 
enable events IF option is set
+                       }
+
+               });
+
+               // SET ALL HANDLE DIMENSIONS
+               sizeHandles();
+       }
+
+
+       /**
+        * Initialize scrolling ui-layout-content div - if exists
+        *
+        * @see  initPane() - or externally after an Ajax injection
+        * @param {string}      pane                    The pane to process
+        * @param {boolean=}    [resize=true]   Size content after init
+        */
+,      initContent = function (pane, resize) {
+               if (!isInitialized()) return;
+               var 
+                       o       = options[pane]
+               ,       sel     = o.contentSelector
+               ,       I       = Instance[pane]
+               ,       $P      = $Ps[pane]
+               ,       $C
+               ;
+               if (sel) $C = I.content = $Cs[pane] = (o.findNestedContent)
+                       ? $P.find(sel).eq(0) // match 1-element only
+                       : $P.children(sel).eq(0)
+               ;
+               if ($C && $C.length) {
+                       $C.data("layoutRole", "content");
+                       // SAVE original Content CSS
+                       if (!$C.data("layoutCSS"))
+                               $C.data("layoutCSS", styles($C, "height"));
+                       $C.css( _c.content.cssReq );
+                       if (o.applyDemoStyles) {
+                               $C.css( _c.content.cssDemo ); // add padding & 
overflow: auto to content-div
+                               $P.css( _c.content.cssDemoPane ); // REMOVE 
padding/scrolling from pane
+                       }
+                       // ensure no vertical scrollbar on pane - will mess up 
measurements
+                       if ($P.css("overflowX").match(/(scroll|auto)/)) {
+                               $P.css("overflow", "hidden");
+                       }
+                       state[pane].content = {}; // init content state
+                       if (resize !== false) sizeContent(pane);
+                       // sizeContent() is called AFTER init of all elements
+               }
+               else
+                       I.content = $Cs[pane] = false;
+       }
+
+
+       /**
+        * Add resize-bars to all panes that specify it in options
+        * -dependancy: $.fn.resizable - will skip if not found
+        *
+        * @see  _create()
+        * @param {string=}     [panes=""]      The edge(s) to process
+        */
+,      initResizable = function (panes) {
+               var     draggingAvailable = $.layout.plugins.draggable
+               ,       side // set in start()
+               ;
+               panes = panes ? panes.split(",") : _c.borderPanes;
+
+               $.each(panes, function (idx, pane) {

@@ Diff output truncated at 153600 characters. @@



reply via email to

[Prev in Thread] Current Thread [Next in Thread]