initial commit
authorJorge Gorbe <j.gorbe@stcsl.es>
Tue, 23 Oct 2012 14:15:13 +0000 (16:15 +0200)
committerJorge Gorbe <j.gorbe@stcsl.es>
Tue, 23 Oct 2012 14:15:13 +0000 (16:15 +0200)
75 files changed:
cool_story_bro.jpg [new file with mode: 0644]
cool_story_bro2.jpg [new file with mode: 0644]
deck.js/.gitignore [new file with mode: 0644]
deck.js/GPL-license.txt [new file with mode: 0644]
deck.js/MIT-license.txt [new file with mode: 0644]
deck.js/README.md [new file with mode: 0644]
deck.js/boilerplate.html [new file with mode: 0644]
deck.js/core/deck.core.css [new file with mode: 0644]
deck.js/core/deck.core.js [new file with mode: 0644]
deck.js/core/deck.core.scss [new file with mode: 0755]
deck.js/extensions/goto/deck.goto.css [new file with mode: 0644]
deck.js/extensions/goto/deck.goto.html [new file with mode: 0644]
deck.js/extensions/goto/deck.goto.js [new file with mode: 0644]
deck.js/extensions/goto/deck.goto.scss [new file with mode: 0755]
deck.js/extensions/hash/deck.hash.css [new file with mode: 0644]
deck.js/extensions/hash/deck.hash.html [new file with mode: 0644]
deck.js/extensions/hash/deck.hash.js [new file with mode: 0644]
deck.js/extensions/hash/deck.hash.scss [new file with mode: 0644]
deck.js/extensions/menu/deck.menu.css [new file with mode: 0644]
deck.js/extensions/menu/deck.menu.js [new file with mode: 0644]
deck.js/extensions/menu/deck.menu.scss [new file with mode: 0755]
deck.js/extensions/navigation/deck.navigation.css [new file with mode: 0644]
deck.js/extensions/navigation/deck.navigation.html [new file with mode: 0644]
deck.js/extensions/navigation/deck.navigation.js [new file with mode: 0644]
deck.js/extensions/navigation/deck.navigation.scss [new file with mode: 0755]
deck.js/extensions/scale/deck.scale.css [new file with mode: 0644]
deck.js/extensions/scale/deck.scale.js [new file with mode: 0644]
deck.js/extensions/scale/deck.scale.scss [new file with mode: 0644]
deck.js/extensions/status/deck.status.css [new file with mode: 0644]
deck.js/extensions/status/deck.status.html [new file with mode: 0644]
deck.js/extensions/status/deck.status.js [new file with mode: 0644]
deck.js/extensions/status/deck.status.scss [new file with mode: 0755]
deck.js/introduction/index.html [new file with mode: 0644]
deck.js/jquery-1.7.2.min.js [new file with mode: 0644]
deck.js/modernizr.custom.js [new file with mode: 0644]
deck.js/test/fixtures/complex.html [new file with mode: 0644]
deck.js/test/fixtures/empty.html [new file with mode: 0644]
deck.js/test/fixtures/iframe_simple.html [new file with mode: 0644]
deck.js/test/fixtures/iframes.html [new file with mode: 0644]
deck.js/test/fixtures/nesteds.html [new file with mode: 0644]
deck.js/test/fixtures/standard.html [new file with mode: 0644]
deck.js/test/index.html [new file with mode: 0644]
deck.js/test/lib/jasmine-html.js [new file with mode: 0755]
deck.js/test/lib/jasmine-jquery.js [new file with mode: 0755]
deck.js/test/lib/jasmine.css [new file with mode: 0755]
deck.js/test/lib/jasmine.js [new file with mode: 0755]
deck.js/test/settings.js [new file with mode: 0755]
deck.js/test/spec.core.js [new file with mode: 0755]
deck.js/test/spec.goto.js [new file with mode: 0644]
deck.js/test/spec.hash.js [new file with mode: 0644]
deck.js/test/spec.menu.js [new file with mode: 0644]
deck.js/test/spec.navigation.js [new file with mode: 0644]
deck.js/test/spec.scale.js [new file with mode: 0644]
deck.js/test/spec.status.js [new file with mode: 0644]
deck.js/themes/style/neon.css [new file with mode: 0644]
deck.js/themes/style/neon.scss [new file with mode: 0644]
deck.js/themes/style/swiss.css [new file with mode: 0644]
deck.js/themes/style/swiss.scss [new file with mode: 0644]
deck.js/themes/style/web-2.0.css [new file with mode: 0644]
deck.js/themes/style/web-2.0.scss [new file with mode: 0644]
deck.js/themes/transition/fade.css [new file with mode: 0644]
deck.js/themes/transition/fade.scss [new file with mode: 0644]
deck.js/themes/transition/horizontal-slide.css [new file with mode: 0644]
deck.js/themes/transition/horizontal-slide.scss [new file with mode: 0644]
deck.js/themes/transition/vertical-slide.css [new file with mode: 0644]
deck.js/themes/transition/vertical-slide.scss [new file with mode: 0644]
index.html [new file with mode: 0644]
oh_god_why.png [new file with mode: 0644]
resacon.css [new file with mode: 0644]
samples/test1.c [new file with mode: 0644]
samples/test1.exe [new file with mode: 0755]
samples/test2.c [new file with mode: 0644]
samples/test2.exe [new file with mode: 0755]
stallman.jpg [new file with mode: 0644]
visual_studio.jpg [new file with mode: 0644]

diff --git a/cool_story_bro.jpg b/cool_story_bro.jpg
new file mode 100644 (file)
index 0000000..183ba87
Binary files /dev/null and b/cool_story_bro.jpg differ
diff --git a/cool_story_bro2.jpg b/cool_story_bro2.jpg
new file mode 100644 (file)
index 0000000..6a9b97b
Binary files /dev/null and b/cool_story_bro2.jpg differ
diff --git a/deck.js/.gitignore b/deck.js/.gitignore
new file mode 100644 (file)
index 0000000..cedd4ec
--- /dev/null
@@ -0,0 +1,3 @@
+.DS_Store
+.sass-cache/
+progress/
\ No newline at end of file
diff --git a/deck.js/GPL-license.txt b/deck.js/GPL-license.txt
new file mode 100644 (file)
index 0000000..336e7be
--- /dev/null
@@ -0,0 +1,278 @@
+GNU GENERAL PUBLIC LICENSE
+           Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+          Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  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
+this service 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 make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  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.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+        GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+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
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the 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 a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+          NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE 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.
\ No newline at end of file
diff --git a/deck.js/MIT-license.txt b/deck.js/MIT-license.txt
new file mode 100644 (file)
index 0000000..de57ea6
--- /dev/null
@@ -0,0 +1,21 @@
+The MIT License\r
+\r
+Copyright (c) 2011 Caleb Troughton\r
+\r
+Permission is hereby granted, free of charge, to any person obtaining a copy\r
+of this software and associated documentation files (the "Software"), to deal\r
+in the Software without restriction, including without limitation the rights\r
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+copies of the Software, and to permit persons to whom the Software is\r
+furnished to do so, subject to the following conditions:\r
+\r
+The above copyright notice and this permission notice shall be included in\r
+all copies or substantial portions of the Software.\r
+\r
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
+THE SOFTWARE.
\ No newline at end of file
diff --git a/deck.js/README.md b/deck.js/README.md
new file mode 100644 (file)
index 0000000..0f6a96e
--- /dev/null
@@ -0,0 +1,64 @@
+#deck.js
+
+A JavaScript library for building modern HTML presentations. deck.js is flexible enough to let advanced CSS and JavaScript authors craft highly customized decks, but also provides templates and themes for the HTML novice to build a standard slideshow.
+
+## Quick Start
+
+This repository includes a `boilerplate.html` as a starting point, with all the extensions included. Just [download it](https://github.com/imakewebthings/deck.js/zipball/stable), open `boilerplate.html`, and start editing your slides.
+
+## Documentation
+
+Check out the [documentation page](http://imakewebthings.github.com/deck.js/docs) for more information on the methods, events, and options available in core and all the included extensions.  A sample standard slide deck is included in the package under the `introduction` folder.  You can also [view that sample deck](http://imakewebthings.github.com/deck.js/introduction) online to play with the available style and transition themes.
+
+## Extensions, Themes, and Related Projects
+
+Take a look at [the wiki](https://github.com/imakewebthings/deck.js/wiki) for lists of extensions, themes, and other related goodies.  If you have a publicly available project of your own, feel free to add to the list.
+
+## Dependencies (included in this repository)
+
+- [jQuery](http://jquery.com)
+- [Modernizr](http://modernizr.com)
+
+## Tests & Support
+
+Unit tests are written with [Jasmine](http://pivotal.github.com/jasmine/) and [jasmine-jquery](https://github.com/velesin/jasmine-jquery). You can [run them here](http://imakewebthings.github.com/deck.js/test).
+
+deck.js has been tested with jQuery 1.6+ and works in IE7+, Chrome, FF, Safari, and Opera. The more capable browsers receive greater enhancements, but a basic cutaway slideshow will work for all browsers listed above. Please don't give your presentations in IE6.
+
+For any questions or general discussion about deck.js please direct your attention to the [mailing list](http://groups.google.com/group/deckjs) (uses Google groups.)  If you would like to report a bug, please see the [issues page](https://github.com/imakewebthings/deck.js/issues).
+
+## Known Bug(s)
+
+There is an issue with certain builds of Chrome that result in a solid blue background and generally broken decks.  This is a bug in Chrome ([Issue 91518](http://code.google.com/p/chromium/issues/detail?id=91518)) that stems from hardware acceleration of 3d transforms.  Current workarounds:
+
+- Use a different browser. This problem doesn't exist in Safari, FF, Opera.
+- Disable hardware compositing by setting `--disable-accelerated-compositing` in the Chrome loading options
+- Replace instances of `translate3d` with `translate` in the CSS of your decks (though this will slow down performance on iOS devices and Safari.)
+
+Firefox contains a bug that allows users to scroll horizontally using the trackpad despite `overflow-x:hidden`. ([Bug 664275](https://bugzilla.mozilla.org/show_bug.cgi?id=664275) and [Bug 325942](https://bugzilla.mozilla.org/show_bug.cgi?id=325942).) If anyone knows of any workarounds to this issue please contact me.
+
+## Printing
+
+Core includes stripped down black and white print styles for the standard slide template that is suitable for handouts.
+
+## Awesome Contributors
+
+- [jbuck](https://github.com/jbuck)
+- [cykod](https://github.com/cykod)
+- [dougireton](https://github.com/dougireton)
+- [awirick](https://github.com/awirick)
+- Daniel Knittl-Frank
+- [alexch](https://github.com/alexch)
+
+If you would like to contribute a patch to deck.js please do as much as you can of the following:
+
+- Add or amend Jasmine tests.
+- Add inline documentation.
+- If the standard snippet of an extension changes, please change it in both the introduction deck and the snippet html in the extension folder.
+- If the API changes, it would be awesome to receive a parallel pull request to the gh-pages branch which updates the public-facing documentation.
+
+## License
+
+Copyright (c) 2011-2012 Caleb Troughton
+
+Dual licensed under the [MIT license](https://github.com/imakewebthings/deck.js/blob/master/MIT-license.txt) and [GPL license](https://github.com/imakewebthings/deck.js/blob/master/GPL-license.txt).
diff --git a/deck.js/boilerplate.html b/deck.js/boilerplate.html
new file mode 100644 (file)
index 0000000..9b76d94
--- /dev/null
@@ -0,0 +1,96 @@
+<!DOCTYPE html>
+<html>
+<head>
+       <meta charset="utf-8">
+       <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+       <meta name="viewport" content="width=1024, user-scalable=no">
+
+       <title>Your deck.js Presentation</title>
+       
+       <!-- Required stylesheet -->
+       <link rel="stylesheet" href="core/deck.core.css">
+       
+       <!-- Extension CSS files go here. Remove or add as needed. -->
+       <link rel="stylesheet" href="extensions/goto/deck.goto.css">
+       <link rel="stylesheet" href="extensions/menu/deck.menu.css">
+       <link rel="stylesheet" href="extensions/navigation/deck.navigation.css">
+       <link rel="stylesheet" href="extensions/status/deck.status.css">
+       <link rel="stylesheet" href="extensions/hash/deck.hash.css">
+       <link rel="stylesheet" href="extensions/scale/deck.scale.css">
+
+       <!-- Style theme. More available in /themes/style/ or create your own. -->
+       <link rel="stylesheet" href="themes/style/web-2.0.css">
+       
+       <!-- Transition theme. More available in /themes/transition/ or create your own. -->
+       <link rel="stylesheet" href="themes/transition/horizontal-slide.css">
+       
+       <!-- Required Modernizr file -->
+       <script src="modernizr.custom.js"></script>
+</head>
+<body class="deck-container">
+
+<!-- Begin slides. Just make elements with a class of slide. -->
+
+<section class="slide">
+       <h1>Slide</h1>
+</section>
+
+<section class="slide">
+       <h1>Content</h1>
+</section>
+
+<section class="slide">
+       <h1>Here</h1>
+</section>
+
+<!-- End slides. -->
+
+
+<!-- Begin extension snippets. Add or remove as needed. -->
+
+<!-- deck.navigation snippet -->
+<a href="#" class="deck-prev-link" title="Previous">&#8592;</a>
+<a href="#" class="deck-next-link" title="Next">&#8594;</a>
+
+<!-- deck.status snippet -->
+<p class="deck-status">
+       <span class="deck-status-current"></span>
+       /
+       <span class="deck-status-total"></span>
+</p>
+
+<!-- deck.goto snippet -->
+<form action="." method="get" class="goto-form">
+       <label for="goto-slide">Go to slide:</label>
+       <input type="text" name="slidenum" id="goto-slide" list="goto-datalist">
+       <datalist id="goto-datalist"></datalist>
+       <input type="submit" value="Go">
+</form>
+
+<!-- deck.hash snippet -->
+<a href="." title="Permalink to this slide" class="deck-permalink">#</a>
+
+<!-- End extension snippets. -->
+
+
+<!-- Required JS files. -->
+<script src="jquery-1.7.2.min.js"></script>
+<script src="core/deck.core.js"></script>
+
+<!-- Extension JS files. Add or remove as needed. -->
+<script src="../core/deck.core.js"></script>
+<script src="../extensions/hash/deck.hash.js"></script>
+<script src="../extensions/menu/deck.menu.js"></script>
+<script src="../extensions/goto/deck.goto.js"></script>
+<script src="../extensions/status/deck.status.js"></script>
+<script src="../extensions/navigation/deck.navigation.js"></script>
+<script src="../extensions/scale/deck.scale.js"></script>
+
+<!-- Initialize the deck. You can put this in an external file if desired. -->
+<script>
+       $(function() {
+               $.deck('.slide');
+       });
+</script>
+</body>
+</html>
diff --git a/deck.js/core/deck.core.css b/deck.js/core/deck.core.css
new file mode 100644 (file)
index 0000000..823af0f
--- /dev/null
@@ -0,0 +1,407 @@
+html, body {
+  height: 100%;
+  padding: 0;
+  margin: 0;
+}
+
+body.deck-container {
+  overflow-y: auto;
+  position: static;
+}
+
+.deck-container {
+  position: relative;
+  min-height: 100%;
+  margin: 0 auto;
+  padding: 0 48px;
+  font-size: 16px;
+  line-height: 1.25;
+  overflow: hidden;
+  /* Resets and base styles from HTML5 Boilerplate */
+  /* End HTML5 Boilerplate adaptations */
+}
+.js .deck-container {
+  visibility: hidden;
+}
+.ready .deck-container {
+  visibility: visible;
+}
+.touch .deck-container {
+  -webkit-text-size-adjust: none;
+  -moz-text-size-adjust: none;
+}
+.deck-container div, .deck-container span, .deck-container object, .deck-container iframe,
+.deck-container h1, .deck-container h2, .deck-container h3, .deck-container h4, .deck-container h5, .deck-container h6, .deck-container p, .deck-container blockquote, .deck-container pre,
+.deck-container abbr, .deck-container address, .deck-container cite, .deck-container code, .deck-container del, .deck-container dfn, .deck-container em, .deck-container img, .deck-container ins, .deck-container kbd, .deck-container q, .deck-container samp,
+.deck-container small, .deck-container strong, .deck-container sub, .deck-container sup, .deck-container var, .deck-container b, .deck-container i, .deck-container dl, .deck-container dt, .deck-container dd, .deck-container ol, .deck-container ul, .deck-container li,
+.deck-container fieldset, .deck-container form, .deck-container label, .deck-container legend,
+.deck-container table, .deck-container caption, .deck-container tbody, .deck-container tfoot, .deck-container thead, .deck-container tr, .deck-container th, .deck-container td,
+.deck-container article, .deck-container aside, .deck-container canvas, .deck-container details, .deck-container figcaption, .deck-container figure,
+.deck-container footer, .deck-container header, .deck-container hgroup, .deck-container menu, .deck-container nav, .deck-container section, .deck-container summary,
+.deck-container time, .deck-container mark, .deck-container audio, .deck-container video {
+  margin: 0;
+  padding: 0;
+  border: 0;
+  font-size: 100%;
+  font: inherit;
+  vertical-align: baseline;
+}
+.deck-container article, .deck-container aside, .deck-container details, .deck-container figcaption, .deck-container figure,
+.deck-container footer, .deck-container header, .deck-container hgroup, .deck-container menu, .deck-container nav, .deck-container section {
+  display: block;
+}
+.deck-container blockquote, .deck-container q {
+  quotes: none;
+}
+.deck-container blockquote:before, .deck-container blockquote:after, .deck-container q:before, .deck-container q:after {
+  content: "";
+  content: none;
+}
+.deck-container ins {
+  background-color: #ff9;
+  color: #000;
+  text-decoration: none;
+}
+.deck-container mark {
+  background-color: #ff9;
+  color: #000;
+  font-style: italic;
+  font-weight: bold;
+}
+.deck-container del {
+  text-decoration: line-through;
+}
+.deck-container abbr[title], .deck-container dfn[title] {
+  border-bottom: 1px dotted;
+  cursor: help;
+}
+.deck-container table {
+  border-collapse: collapse;
+  border-spacing: 0;
+}
+.deck-container hr {
+  display: block;
+  height: 1px;
+  border: 0;
+  border-top: 1px solid #ccc;
+  margin: 1em 0;
+  padding: 0;
+}
+.deck-container input, .deck-container select {
+  vertical-align: middle;
+}
+.deck-container select, .deck-container input, .deck-container textarea, .deck-container button {
+  font: 99% sans-serif;
+}
+.deck-container pre, .deck-container code, .deck-container kbd, .deck-container samp {
+  font-family: monospace, sans-serif;
+}
+.deck-container a {
+  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+}
+.deck-container a:hover, .deck-container a:active {
+  outline: none;
+}
+.deck-container ul, .deck-container ol {
+  margin-left: 2em;
+  vertical-align: top;
+}
+.deck-container ol {
+  list-style-type: decimal;
+}
+.deck-container nav ul, .deck-container nav li {
+  margin: 0;
+  list-style: none;
+  list-style-image: none;
+}
+.deck-container small {
+  font-size: 85%;
+}
+.deck-container strong, .deck-container th {
+  font-weight: bold;
+}
+.deck-container td {
+  vertical-align: top;
+}
+.deck-container sub, .deck-container sup {
+  font-size: 75%;
+  line-height: 0;
+  position: relative;
+}
+.deck-container sup {
+  top: -0.5em;
+}
+.deck-container sub {
+  bottom: -0.25em;
+}
+.deck-container textarea {
+  overflow: auto;
+}
+.ie6 .deck-container legend, .ie7 .deck-container legend {
+  margin-left: -7px;
+}
+.deck-container input[type="radio"] {
+  vertical-align: text-bottom;
+}
+.deck-container input[type="checkbox"] {
+  vertical-align: bottom;
+}
+.ie7 .deck-container input[type="checkbox"] {
+  vertical-align: baseline;
+}
+.ie6 .deck-container input {
+  vertical-align: text-bottom;
+}
+.deck-container label, .deck-container input[type="button"], .deck-container input[type="submit"], .deck-container input[type="image"], .deck-container button {
+  cursor: pointer;
+}
+.deck-container button, .deck-container input, .deck-container select, .deck-container textarea {
+  margin: 0;
+}
+.deck-container input:invalid, .deck-container textarea:invalid {
+  border-radius: 1px;
+  -moz-box-shadow: 0px 0px 5px red;
+  -webkit-box-shadow: 0px 0px 5px red;
+  box-shadow: 0px 0px 5px red;
+}
+.deck-container input:invalid .no-boxshadow, .deck-container textarea:invalid .no-boxshadow {
+  background-color: #f0dddd;
+}
+.deck-container button {
+  width: auto;
+  overflow: visible;
+}
+.ie7 .deck-container img {
+  -ms-interpolation-mode: bicubic;
+}
+.deck-container, .deck-container select, .deck-container input, .deck-container textarea {
+  color: #444;
+}
+.deck-container a {
+  color: #607890;
+}
+.deck-container a:hover, .deck-container a:focus {
+  color: #036;
+}
+.deck-container a:link {
+  -webkit-tap-highlight-color: #fff;
+}
+.deck-container.deck-loading {
+  display: none;
+}
+
+.slide {
+  width: auto;
+  min-height: 100%;
+  position: relative;
+}
+.slide h1 {
+  font-size: 4.5em;
+}
+.slide h1, .slide .vcenter {
+  font-weight: bold;
+  text-align: center;
+  padding-top: 1em;
+  max-height: 100%;
+}
+.csstransforms .slide h1, .csstransforms .slide .vcenter {
+  padding: 0 48px;
+  position: absolute;
+  left: 0;
+  right: 0;
+  top: 50%;
+  -webkit-transform: translate(0, -50%);
+  -moz-transform: translate(0, -50%);
+  -ms-transform: translate(0, -50%);
+  -o-transform: translate(0, -50%);
+  transform: translate(0, -50%);
+}
+.slide .vcenter h1 {
+  position: relative;
+  top: auto;
+  padding: 0;
+  -webkit-transform: none;
+  -moz-transform: none;
+  -ms-transform: none;
+  -o-transform: none;
+  transform: none;
+}
+.slide h2 {
+  font-size: 2.25em;
+  font-weight: bold;
+  padding-top: .5em;
+  margin: 0 0 .66666em 0;
+  border-bottom: 3px solid #888;
+}
+.slide h3 {
+  font-size: 1.4375em;
+  font-weight: bold;
+  margin-bottom: .30435em;
+}
+.slide h4 {
+  font-size: 1.25em;
+  font-weight: bold;
+  margin-bottom: .25em;
+}
+.slide h5 {
+  font-size: 1.125em;
+  font-weight: bold;
+  margin-bottom: .2222em;
+}
+.slide h6 {
+  font-size: 1em;
+  font-weight: bold;
+}
+.slide img, .slide iframe, .slide video {
+  display: block;
+  max-width: 100%;
+}
+.slide video, .slide iframe, .slide img {
+  display: block;
+  margin: 0 auto;
+}
+.slide p, .slide blockquote, .slide iframe, .slide img, .slide ul, .slide ol, .slide pre, .slide video {
+  margin-bottom: 1em;
+}
+.slide pre {
+  white-space: pre;
+  white-space: pre-wrap;
+  word-wrap: break-word;
+  padding: 1em;
+  border: 1px solid #888;
+}
+.slide em {
+  font-style: italic;
+}
+.slide li {
+  padding: .25em 0;
+  vertical-align: middle;
+}
+
+.deck-before, .deck-previous, .deck-next, .deck-after {
+  position: absolute;
+  left: -999em;
+  top: -999em;
+}
+
+.deck-current {
+  z-index: 2;
+}
+
+.slide .slide {
+  visibility: hidden;
+  position: static;
+  min-height: 0;
+}
+
+.deck-child-current {
+  position: static;
+  z-index: 2;
+}
+.deck-child-current .slide {
+  visibility: hidden;
+}
+.deck-child-current .deck-previous, .deck-child-current .deck-before, .deck-child-current .deck-current {
+  visibility: visible;
+}
+
+@media screen and (max-device-width: 480px) {
+  /* html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; } */
+}
+@media print {
+  * {
+    background: transparent !important;
+    color: black !important;
+    text-shadow: none !important;
+    filter: none !important;
+    -ms-filter: none !important;
+    -webkit-box-reflect: none !important;
+    -moz-box-reflect: none !important;
+    -webkit-box-shadow: none !important;
+    -moz-box-shadow: none !important;
+    box-shadow: none !important;
+  }
+  * :before, * :after {
+    display: none !important;
+  }
+
+  a, a:visited {
+    color: #444 !important;
+    text-decoration: underline;
+  }
+
+  a[href]:after {
+    content: " (" attr(href) ")";
+  }
+
+  abbr[title]:after {
+    content: " (" attr(title) ")";
+  }
+
+  .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after {
+    content: "";
+  }
+
+  pre, blockquote {
+    border: 1px solid #999;
+    page-break-inside: avoid;
+  }
+
+  thead {
+    display: table-header-group;
+  }
+
+  tr, img {
+    page-break-inside: avoid;
+  }
+
+  @page {
+    margin: 0.5cm;
+}
+
+  p, h2, h3 {
+    orphans: 3;
+    widows: 3;
+  }
+
+  h2, h3 {
+    page-break-after: avoid;
+  }
+
+  .slide {
+    position: static !important;
+    visibility: visible !important;
+    display: block !important;
+    -webkit-transform: none !important;
+    -moz-transform: none !important;
+    -o-transform: none !important;
+    -ms-transform: none !important;
+    transform: none !important;
+    opacity: 1 !important;
+  }
+
+  h1, .vcenter {
+    -webkit-transform: none !important;
+    -moz-transform: none !important;
+    -o-transform: none !important;
+    -ms-transform: none !important;
+    transform: none !important;
+    padding: 0 !important;
+    position: static !important;
+  }
+
+  .deck-container > .slide {
+    page-break-after: always;
+  }
+
+  .deck-container {
+    width: 100% !important;
+    height: auto !important;
+    padding: 0 !important;
+    display: block !important;
+  }
+
+  script {
+    display: none;
+  }
+}
diff --git a/deck.js/core/deck.core.js b/deck.js/core/deck.core.js
new file mode 100644 (file)
index 0000000..997942c
--- /dev/null
@@ -0,0 +1,498 @@
+/*!
+Deck JS - deck.core
+Copyright (c) 2011 Caleb Troughton
+Dual licensed under the MIT license and GPL license.
+https://github.com/imakewebthings/deck.js/blob/master/MIT-license.txt
+https://github.com/imakewebthings/deck.js/blob/master/GPL-license.txt
+*/
+
+/*
+The deck.core module provides all the basic functionality for creating and
+moving through a deck.  It does so by applying classes to indicate the state of
+the deck and its slides, allowing CSS to take care of the visual representation
+of each state.  It also provides methods for navigating the deck and inspecting
+its state, as well as basic key bindings for going to the next and previous
+slides.  More functionality is provided by wholly separate extension modules
+that use the API provided by core.
+*/
+(function($, deck, document, undefined) {
+       var slides, // Array of all the uh, slides...
+       current, // Array index of the current slide
+       $container, // Keeping this cached
+       
+       events = {
+               /*
+               This event fires whenever the current slide changes, whether by way of
+               next, prev, or go. The callback function is passed two parameters, from
+               and to, equal to the indices of the old slide and the new slide
+               respectively. If preventDefault is called on the event within this handler
+               the slide change does not occur.
+               
+               $(document).bind('deck.change', function(event, from, to) {
+                  alert('Moving from slide ' + from + ' to ' + to);
+               });
+               */
+               change: 'deck.change',
+               
+               /*
+               This event fires at the beginning of deck initialization, after the options
+               are set but before the slides array is created.  This event makes a good hook
+               for preprocessing extensions looking to modify the deck.
+               */
+               beforeInitialize: 'deck.beforeInit',
+               
+               /*
+               This event fires at the end of deck initialization. Extensions should
+               implement any code that relies on user extensible options (key bindings,
+               element selectors, classes) within a handler for this event. Native
+               events associated with Deck JS should be scoped under a .deck event
+               namespace, as with the example below:
+               
+               var $d = $(document);
+               $.deck.defaults.keys.myExtensionKeycode = 70; // 'h'
+               $d.bind('deck.init', function() {
+                  $d.bind('keydown.deck', function(event) {
+                     if (event.which === $.deck.getOptions().keys.myExtensionKeycode) {
+                        // Rock out
+                     }
+                  });
+               });
+               */
+               initialize: 'deck.init' 
+       },
+       
+       options = {},
+       $d = $(document),
+       
+       /*
+       Internal function. Updates slide and container classes based on which
+       slide is the current slide.
+       */
+       updateStates = function() {
+               var oc = options.classes,
+               osc = options.selectors.container,
+               old = $container.data('onSlide'),
+               $all = $();
+               
+               // Container state
+               $container.removeClass(oc.onPrefix + old)
+                       .addClass(oc.onPrefix + current)
+                       .data('onSlide', current);
+               
+               // Remove and re-add child-current classes for nesting
+               $('.' + oc.current).parentsUntil(osc).removeClass(oc.childCurrent);
+               slides[current].parentsUntil(osc).addClass(oc.childCurrent);
+               
+               // Remove previous states
+               $.each(slides, function(i, el) {
+                       $all = $all.add(el);
+               });
+               $all.removeClass([
+                       oc.before,
+                       oc.previous,
+                       oc.current,
+                       oc.next,
+                       oc.after
+               ].join(" "));
+               
+               // Add new states back in
+               slides[current].addClass(oc.current);
+               if (current > 0) {
+                       slides[current-1].addClass(oc.previous);
+               }
+               if (current + 1 < slides.length) {
+                       slides[current+1].addClass(oc.next);
+               }
+               if (current > 1) {
+                       $.each(slides.slice(0, current - 1), function(i, el) {
+                               el.addClass(oc.before);
+                       });
+               }
+               if (current + 2 < slides.length) {
+                       $.each(slides.slice(current+2), function(i, el) {
+                               el.addClass(oc.after);
+                       });
+               }
+       },
+       
+       /* Methods exposed in the jQuery.deck namespace */
+       methods = {
+               
+               /*
+               jQuery.deck(selector, options)
+               
+               selector: string | jQuery | array
+               options: object, optional
+                               
+               Initializes the deck, using each element matched by selector as a slide.
+               May also be passed an array of string selectors or jQuery objects, in
+               which case each selector in the array is considered a slide. The second
+               parameter is an optional options object which will extend the default
+               values.
+               
+               $.deck('.slide');
+               
+               or
+               
+               $.deck([
+                  '#first-slide',
+                  '#second-slide',
+                  '#etc'
+               ]);
+               */      
+               init: function(elements, opts) {
+                       var startTouch,
+                       tolerance,
+                       esp = function(e) {
+                               e.stopPropagation();
+                       };
+                       
+                       options = $.extend(true, {}, $[deck].defaults, opts);
+                       slides = [];
+                       current = 0;
+                       $container = $(options.selectors.container);
+                       tolerance = options.touch.swipeTolerance;
+                       
+                       // Pre init event for preprocessing hooks
+                       $d.trigger(events.beforeInitialize);
+                       
+                       // Hide the deck while states are being applied to kill transitions
+                       $container.addClass(options.classes.loading);
+                       
+                       // Fill slides array depending on parameter type
+                       if ($.isArray(elements)) {
+                               $.each(elements, function(i, e) {
+                                       slides.push($(e));
+                               });
+                       }
+                       else {
+                               $(elements).each(function(i, e) {
+                                       slides.push($(e));
+                               });
+                       }
+                       
+                       /* Remove any previous bindings, and rebind key events */
+                       $d.unbind('keydown.deck').bind('keydown.deck', function(e) {
+                               if (e.which === options.keys.next || $.inArray(e.which, options.keys.next) > -1) {
+                                       methods.next();
+                                       e.preventDefault();
+                               }
+                               else if (e.which === options.keys.previous || $.inArray(e.which, options.keys.previous) > -1) {
+                                       methods.prev();
+                                       e.preventDefault();
+                               }
+                       })
+                       /* Stop propagation of key events within editable elements */
+                       .undelegate('input, textarea, select, button, meter, progress, [contentEditable]', 'keydown', esp)
+                       .delegate('input, textarea, select, button, meter, progress, [contentEditable]', 'keydown', esp);
+                       
+                       /* Bind touch events for swiping between slides on touch devices */
+                       $container.unbind('touchstart.deck').bind('touchstart.deck', function(e) {
+                               if (!startTouch) {
+                                       startTouch = $.extend({}, e.originalEvent.targetTouches[0]);
+                               }
+                       })
+                       .unbind('touchmove.deck').bind('touchmove.deck', function(e) {
+                               $.each(e.originalEvent.changedTouches, function(i, t) {
+                                       if (startTouch && t.identifier === startTouch.identifier) {
+                                               if (t.screenX - startTouch.screenX > tolerance || t.screenY - startTouch.screenY > tolerance) {
+                                                       $[deck]('prev');
+                                                       startTouch = undefined;
+                                               }
+                                               else if (t.screenX - startTouch.screenX < -1 * tolerance || t.screenY - startTouch.screenY < -1 * tolerance) {
+                                                       $[deck]('next');
+                                                       startTouch = undefined;
+                                               }
+                                               return false;
+                                       }
+                               });
+                               e.preventDefault();
+                       })
+                       .unbind('touchend.deck').bind('touchend.deck', function(t) {
+                               $.each(t.originalEvent.changedTouches, function(i, t) {
+                                       if (startTouch && t.identifier === startTouch.identifier) {
+                                               startTouch = undefined;
+                                       }
+                               });
+                       })
+                       .scrollLeft(0).scrollTop(0);
+                       
+                       /*
+                       Kick iframe videos, which dont like to redraw w/ transforms.
+                       Remove this if Webkit ever fixes it.
+                        */
+                       $.each(slides, function(i, $el) {
+                               $el.unbind('webkitTransitionEnd.deck').bind('webkitTransitionEnd.deck',
+                               function(event) {
+                                       if ($el.hasClass($[deck]('getOptions').classes.current)) {
+                                               var embeds = $(this).find('iframe').css('opacity', 0);
+                                               window.setTimeout(function() {
+                                                       embeds.css('opacity', 1);
+                                               }, 100);
+                                       }
+                               });
+                       });
+                       
+                       if (slides.length) {
+                               updateStates();
+                       }
+                       
+                       // Show deck again now that slides are in place
+                       $container.removeClass(options.classes.loading);
+                       $d.trigger(events.initialize);
+               },
+               
+               /*
+               jQuery.deck('go', index)
+               
+               index: integer | string
+               
+               Moves to the slide at the specified index if index is a number. Index is
+               0-based, so $.deck('go', 0); will move to the first slide. If index is a
+               string this will move to the slide with the specified id. If index is out
+               of bounds or doesn't match a slide id the call is ignored.
+               */
+               go: function(index) {
+                       var e = $.Event(events.change),
+                       ndx;
+                       
+                       /* Number index, easy. */
+                       if (typeof index === 'number' && index >= 0 && index < slides.length) {
+                               ndx = index;
+                       }
+                       /* Id string index, search for it and set integer index */
+                       else if (typeof index === 'string') {
+                               $.each(slides, function(i, $slide) {
+                                       if ($slide.attr('id') === index) {
+                                               ndx = i;
+                                               return false;
+                                       }
+                               });
+                       };
+                       
+                       /* Out of bounds, id doesn't exist, illegal input, eject */
+                       if (typeof ndx === 'undefined') return;
+                       
+                       $d.trigger(e, [current, ndx]);
+                       if (e.isDefaultPrevented()) {
+                               /* Trigger the event again and undo the damage done by extensions. */
+                               $d.trigger(events.change, [ndx, current]);
+                       }
+                       else {
+                               current = ndx;
+                               updateStates();
+                       }
+               },
+               
+               /*
+               jQuery.deck('next')
+               
+               Moves to the next slide. If the last slide is already active, the call
+               is ignored.
+               */
+               next: function() {
+                       methods.go(current+1);
+               },
+               
+               /*
+               jQuery.deck('prev')
+               
+               Moves to the previous slide. If the first slide is already active, the
+               call is ignored.
+               */
+               prev: function() {
+                       methods.go(current-1);
+               },
+               
+               /*
+               jQuery.deck('getSlide', index)
+               
+               index: integer, optional
+               
+               Returns a jQuery object containing the slide at index. If index is not
+               specified, the current slide is returned.
+               */
+               getSlide: function(index) {
+                       var i = typeof index !== 'undefined' ? index : current;
+                       if (typeof i != 'number' || i < 0 || i >= slides.length) return null;
+                       return slides[i];
+               },
+               
+               /*
+               jQuery.deck('getSlides')
+               
+               Returns all slides as an array of jQuery objects.
+               */
+               getSlides: function() {
+                       return slides;
+               },
+               
+               /*
+               jQuery.deck('getContainer')
+               
+               Returns a jQuery object containing the deck container as defined by the
+               container option.
+               */
+               getContainer: function() {
+                       return $container;
+               },
+               
+               /*
+               jQuery.deck('getOptions')
+               
+               Returns the options object for the deck, including any overrides that
+               were defined at initialization.
+               */
+               getOptions: function() {
+                       return options;
+               },
+               
+               /*
+               jQuery.deck('extend', name, method)
+               
+               name: string
+               method: function
+               
+               Adds method to the deck namespace with the key of name. This doesn’t
+               give access to any private member data — public methods must still be
+               used within method — but lets extension authors piggyback on the deck
+               namespace rather than pollute jQuery.
+               
+               $.deck('extend', 'alert', function(msg) {
+                  alert(msg);
+               });
+
+               // Alerts 'boom'
+               $.deck('alert', 'boom');
+               */
+               extend: function(name, method) {
+                       methods[name] = method;
+               }
+       };
+       
+       /* jQuery extension */
+       $[deck] = function(method, arg) {
+               if (methods[method]) {
+                       return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
+               }
+               else {
+                       return methods.init(method, arg);
+               }
+       };
+       
+       /*
+       The default settings object for a deck. All deck extensions should extend
+       this object to add defaults for any of their options.
+       
+       options.classes.after
+               This class is added to all slides that appear after the 'next' slide.
+       
+       options.classes.before
+               This class is added to all slides that appear before the 'previous'
+               slide.
+               
+       options.classes.childCurrent
+               This class is added to all elements in the DOM tree between the
+               'current' slide and the deck container. For standard slides, this is
+               mostly seen and used for nested slides.
+               
+       options.classes.current
+               This class is added to the current slide.
+               
+       options.classes.loading
+               This class is applied to the deck container during loading phases and is
+               primarily used as a way to short circuit transitions between states
+               where such transitions are distracting or unwanted.  For example, this
+               class is applied during deck initialization and then removed to prevent
+               all the slides from appearing stacked and transitioning into place
+               on load.
+               
+       options.classes.next
+               This class is added to the slide immediately following the 'current'
+               slide.
+               
+       options.classes.onPrefix
+               This prefix, concatenated with the current slide index, is added to the
+               deck container as you change slides.
+               
+       options.classes.previous
+               This class is added to the slide immediately preceding the 'current'
+               slide.
+               
+       options.selectors.container
+               Elements matched by this CSS selector will be considered the deck
+               container. The deck container is used to scope certain states of the
+               deck, as with the onPrefix option, or with extensions such as deck.goto
+               and deck.menu.
+               
+       options.keys.next
+               The numeric keycode used to go to the next slide.
+               
+       options.keys.previous
+               The numeric keycode used to go to the previous slide.
+               
+       options.touch.swipeTolerance
+               The number of pixels the users finger must travel to produce a swipe
+               gesture.
+       */
+       $[deck].defaults = {
+               classes: {
+                       after: 'deck-after',
+                       before: 'deck-before',
+                       childCurrent: 'deck-child-current',
+                       current: 'deck-current',
+                       loading: 'deck-loading',
+                       next: 'deck-next',
+                       onPrefix: 'on-slide-',
+                       previous: 'deck-previous'
+               },
+               
+               selectors: {
+                       container: '.deck-container'
+               },
+               
+               keys: {
+                       // enter, space, page down, right arrow, down arrow,
+                       next: [13, 32, 34, 39, 40],
+                       // backspace, page up, left arrow, up arrow
+                       previous: [8, 33, 37, 38]
+               },
+               
+               touch: {
+                       swipeTolerance: 60
+               }
+       };
+       
+       $d.ready(function() {
+               $('html').addClass('ready');
+       });
+       
+       /*
+       FF + Transforms + Flash video don't get along...
+       Firefox will reload and start playing certain videos after a
+       transform.  Blanking the src when a previously shown slide goes out
+       of view prevents this.
+       */
+       $d.bind('deck.change', function(e, from, to) {
+               var oldFrames = $[deck]('getSlide', from).find('iframe'),
+               newFrames = $[deck]('getSlide', to).find('iframe');
+               
+               oldFrames.each(function() {
+               var $this = $(this),
+               curSrc = $this.attr('src');
+            
+            if(curSrc) {
+               $this.data('deck-src', curSrc).attr('src', '');
+            }
+               });
+               
+               newFrames.each(function() {
+                       var $this = $(this),
+                       originalSrc = $this.data('deck-src');
+                       
+                       if (originalSrc) {
+                               $this.attr('src', originalSrc);
+                       }
+               });
+       });
+})(jQuery, 'deck', document);
diff --git a/deck.js/core/deck.core.scss b/deck.js/core/deck.core.scss
new file mode 100755 (executable)
index 0000000..6721050
--- /dev/null
@@ -0,0 +1,450 @@
+html, body {
+       height:100%;
+       padding:0;
+       margin:0;
+}
+
+body.deck-container {
+       overflow-y:auto;
+       position:static;
+}
+
+.deck-container {
+       position:relative;
+       min-height:100%;
+       margin:0 auto;
+       padding:0 48px;
+       font-size:16px;
+       line-height:1.25;
+       overflow:hidden;
+       
+       .js & {
+               visibility:hidden;
+       }
+       
+       .ready & {
+               visibility:visible;
+       }
+       
+       .touch & {
+               -webkit-text-size-adjust:none;
+               -moz-text-size-adjust:none;
+       }
+       
+       /* Resets and base styles from HTML5 Boilerplate */
+       div, span, object, iframe,
+       h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+       abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp,
+       small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li,
+       fieldset, form, label, legend,
+       table, caption, tbody, tfoot, thead, tr, th, td,
+       article, aside, canvas, details, figcaption, figure,
+       footer, header, hgroup, menu, nav, section, summary,
+       time, mark, audio, video {
+         margin: 0;
+         padding: 0;
+         border: 0;
+         font-size: 100%;
+         font: inherit;
+         vertical-align: baseline;
+       }
+
+       article, aside, details, figcaption, figure,
+       footer, header, hgroup, menu, nav, section {
+         display: block;
+       }
+       
+       blockquote, q {
+               quotes:none;
+               
+               &:before, &:after {
+                       content:"";
+                       content:none;
+               }
+       }
+       
+       ins {
+               background-color:#ff9;
+               color:#000;
+               text-decoration:none;
+       }
+       
+       mark {
+               background-color:#ff9;
+               color:#000;
+               font-style:italic;
+               font-weight:bold;
+       }
+       
+       del {
+               text-decoration:line-through;
+       }
+       
+       abbr[title], dfn[title] {
+               border-bottom:1px dotted;
+               cursor:help;
+       }
+       
+       table {
+               border-collapse:collapse;
+               border-spacing:0;
+       }
+       
+       hr {
+               display:block;
+               height:1px;
+               border:0;
+               border-top:1px solid #ccc;
+               margin:1em 0;
+               padding:0;
+       }
+       
+       input, select {
+               vertical-align:middle;
+       }
+       
+       select, input, textarea, button {
+               font:99% sans-serif;
+       }
+       
+       pre, code, kbd, samp {
+               font-family:monospace, sans-serif;
+       }
+       
+       a {
+               -webkit-tap-highlight-color:rgba(0,0,0,0);
+               
+               &:hover, &:active {
+                       outline:none;
+               }
+       }
+       
+       ul, ol {
+               margin-left:2em;
+               vertical-align:top;
+       }
+       
+       ol {
+               list-style-type:decimal;
+       }
+       
+       nav {
+               ul, li {
+                       margin:0;
+                       list-style:none;
+                       list-style-image:none;
+               }
+       }
+       
+       small {
+               font-size:85%;
+       }
+       
+       strong, th {
+               font-weight:bold;
+       }
+       
+       td {
+               vertical-align:top;
+       }
+       
+       sub, sup {
+               font-size:75%;
+               line-height:0;
+               position:relative;
+       }
+       
+       sup {
+               top:-0.5em;
+       }
+       
+       sub { bottom: -0.25em; }
+       
+       textarea {
+               overflow:auto;
+       }
+       
+       legend {
+               .ie6 &, .ie7 & {
+                       margin-left:-7px;
+               }
+       }
+       
+       input[type="radio"] {
+               vertical-align:text-bottom;
+       }
+       
+       input[type="checkbox"] {
+               vertical-align:bottom;
+       }
+       
+       .ie7 & input[type="checkbox"] {
+               vertical-align:baseline;
+       }
+       
+       .ie6 & input {
+               vertical-align:text-bottom;
+       }
+       
+       label, input[type="button"], input[type="submit"], input[type="image"], button {
+               cursor:pointer;
+       }
+       
+       button, input, select, textarea {
+               margin: 0;
+       }
+       
+       input, textarea {
+               &:invalid {
+                       border-radius:1px;
+                       -moz-box-shadow:0px 0px 5px red;
+                       -webkit-box-shadow:0px 0px 5px red;
+                       box-shadow: 0px 0px 5px red;
+                       
+                       .no-boxshadow {
+                               background-color: #f0dddd;
+                       }
+               }
+       }
+       
+       button {
+               width:auto;
+               overflow:visible;
+       }
+       
+       .ie7 & img {
+               -ms-interpolation-mode: bicubic; }
+       
+       &, select, input, textarea {
+               color:#444;
+       }
+       
+       a {
+               color:#607890;
+               
+               &:hover, &:focus {
+                       color:#036;
+               }
+               
+               &:link {
+                       -webkit-tap-highlight-color: #fff;
+               }
+       }
+       /* End HTML5 Boilerplate adaptations */
+       
+       &.deck-loading {
+               display:none;
+       }
+}
+
+.slide {
+       width:auto;
+       min-height:100%;
+       position:relative;
+       
+       h1 {
+               font-size:4.5em;
+       }
+
+       h1, .vcenter {
+               font-weight:bold;
+               text-align:center;
+               padding-top:1em;
+               max-height:100%;
+               
+               .csstransforms & {
+                       padding:0 48px;
+                       position:absolute;
+                       left:0;
+                       right:0;
+                       top:50%;
+                       -webkit-transform:translate(0, -50%);
+                       -moz-transform:translate(0, -50%);
+                       -ms-transform:translate(0, -50%);
+                       -o-transform:translate(0, -50%);
+                       transform:translate(0, -50%);
+               }
+       }
+
+       .vcenter h1 {
+               position:relative;
+               top:auto;
+               padding:0;
+               -webkit-transform:none;
+               -moz-transform:none;
+               -ms-transform:none;
+               -o-transform:none;
+               transform:none;
+       }
+
+       h2 {
+               font-size:2.25em;
+               font-weight:bold;
+               padding-top:.5em;
+               margin:0 0 .66666em 0;
+               border-bottom:3px solid #888;
+       }
+
+       h3 {
+               font-size:1.4375em;
+               font-weight:bold;
+               margin-bottom:.30435em;
+       }
+
+       h4 {
+               font-size:1.25em;
+               font-weight:bold;
+               margin-bottom:.25em;
+       }
+
+       h5 {
+               font-size:1.125em;
+               font-weight:bold;
+               margin-bottom:.2222em;
+       }
+
+       h6 {
+               font-size:1em;
+               font-weight:bold;
+       }
+
+       img, iframe, video {
+               display:block;
+               max-width:100%;
+       }
+
+       video, iframe, img {
+               display:block;
+               margin:0 auto;
+       }
+
+       p, blockquote, iframe, img, ul, ol, pre, video {
+               margin-bottom:1em;
+       }
+
+       pre {
+               white-space:pre;
+               white-space:pre-wrap;
+               word-wrap:break-word;
+               padding: 1em;
+               border:1px solid #888;
+       }
+
+       em {
+               font-style:italic;
+       }
+       
+       li {
+               padding:.25em 0;
+               vertical-align:middle;
+       }
+}
+
+.deck-before, .deck-previous, .deck-next, .deck-after {
+       position:absolute;
+       left:-999em;
+       top:-999em;
+}
+
+.deck-current {
+       z-index:2;
+}
+
+.slide .slide {
+       visibility:hidden;
+       position:static;
+       min-height:0;
+}
+
+.deck-child-current {
+       position:static;
+       z-index:2;
+       
+       .slide {
+               visibility:hidden;
+       }
+       
+       .deck-previous, .deck-before, .deck-current {
+               visibility:visible;
+       }
+}
+
+@media all and (orientation:portrait) {
+
+}
+
+@media all and (orientation:landscape) {
+
+}
+
+@media screen and (max-device-width: 480px) {
+  
+  /* html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; } */
+}
+
+
+@media print {
+  * {
+       background: transparent !important;
+       color: black !important;
+       text-shadow: none !important;
+       filter:none !important;
+       -ms-filter: none !important;
+       -webkit-box-reflect:none !important;
+       -moz-box-reflect:none !important;
+       -webkit-box-shadow:none !important;
+       -moz-box-shadow:none !important;
+       box-shadow:none !important;
+       
+       :before, :after {
+               display:none !important;
+       }
+} 
+  a, a:visited { color: #444 !important; text-decoration: underline; }
+  a[href]:after { content: " (" attr(href) ")"; }
+  abbr[title]:after { content: " (" attr(title) ")"; }
+  .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }  
+  pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
+  thead { display: table-header-group; } 
+  tr, img { page-break-inside: avoid; }
+  @page { margin: 0.5cm; }
+  p, h2, h3 { orphans: 3; widows: 3; }
+  h2, h3{ page-break-after: avoid; }
+
+       .slide {
+               position:static !important;
+               visibility:visible !important;
+               display:block !important;
+               -webkit-transform:none !important;
+               -moz-transform:none !important;
+               -o-transform:none !important;
+               -ms-transform:none !important;
+               transform:none !important;
+               opacity:1 !important;
+       }
+       
+       h1, .vcenter {
+               -webkit-transform:none !important;
+               -moz-transform:none !important;
+               -o-transform:none !important;
+               -ms-transform:none !important;
+               transform:none !important;
+               padding:0 !important;
+               position:static !important;
+       }
+       
+       .deck-container > .slide {
+               page-break-after: always;
+       }
+       
+       .deck-container {
+               width:100% !important;
+               height:auto !important;
+               padding:0 !important;
+               display:block !important;
+       }
+       
+       script {
+               display:none;
+       }
+}
diff --git a/deck.js/extensions/goto/deck.goto.css b/deck.js/extensions/goto/deck.goto.css
new file mode 100644 (file)
index 0000000..108e4f9
--- /dev/null
@@ -0,0 +1,41 @@
+.deck-container .goto-form {
+  position: absolute;
+  z-index: 3;
+  bottom: 10px;
+  left: 50%;
+  height: 1.75em;
+  margin: 0 0 0 -9.125em;
+  line-height: 1.75em;
+  padding: 0.625em;
+  display: none;
+  background: #ccc;
+  overflow: hidden;
+}
+.borderradius .deck-container .goto-form {
+  -webkit-border-radius: 10px;
+  -moz-border-radius: 10px;
+  border-radius: 10px;
+}
+.deck-container .goto-form label {
+  font-weight: bold;
+}
+.deck-container .goto-form label, .deck-container .goto-form input {
+  display: inline-block;
+  font-family: inherit;
+}
+
+.deck-goto .goto-form {
+  display: block;
+}
+
+#goto-slide {
+  width: 8.375em;
+  margin: 0 0.625em;
+  height: 1.4375em;
+}
+
+@media print {
+  .goto-form, #goto-slide {
+    display: none !important;
+  }
+}
diff --git a/deck.js/extensions/goto/deck.goto.html b/deck.js/extensions/goto/deck.goto.html
new file mode 100644 (file)
index 0000000..e3b6a18
--- /dev/null
@@ -0,0 +1,7 @@
+<!-- Place the following snippet at the bottom of the deck container. -->
+<form action="." method="get" class="goto-form">
+       <label for="goto-slide">Go to slide:</label>
+       <input type="text" name="slidenum" id="goto-slide" list="goto-datalist">
+       <datalist id="goto-datalist"></datalist>
+       <input type="submit" value="Go">
+</form>
\ No newline at end of file
diff --git a/deck.js/extensions/goto/deck.goto.js b/deck.js/extensions/goto/deck.goto.js
new file mode 100644 (file)
index 0000000..eedba10
--- /dev/null
@@ -0,0 +1,170 @@
+/*!
+Deck JS - deck.goto
+Copyright (c) 2011 Caleb Troughton
+Dual licensed under the MIT license and GPL license.
+https://github.com/imakewebthings/deck.js/blob/master/MIT-license.txt
+https://github.com/imakewebthings/deck.js/blob/master/GPL-license.txt
+*/
+
+/*
+This module adds the necessary methods and key bindings to show and hide a form
+for jumping to any slide number/id in the deck (and processes that form
+accordingly). The form-showing state is indicated by the presence of a class on
+the deck container.
+*/
+(function($, deck, undefined) {
+       var $d = $(document);
+       
+       /*
+       Extends defaults/options.
+       
+       options.classes.goto
+               This class is added to the deck container when showing the Go To Slide
+               form.
+               
+       options.selectors.gotoDatalist
+               The element that matches this selector is the datalist element that will
+               be populated with options for each of the slide ids.  In browsers that
+               support the datalist element, this provides a drop list of slide ids to
+               aid the user in selecting a slide.
+               
+       options.selectors.gotoForm
+               The element that matches this selector is the form that is submitted
+               when a user hits enter after typing a slide number/id in the gotoInput
+               element.
+       
+       options.selectors.gotoInput
+               The element that matches this selector is the text input field for
+               entering a slide number/id in the Go To Slide form.
+               
+       options.keys.goto
+               The numeric keycode used to show the Go To Slide form.
+               
+       options.countNested
+               If false, only top level slides will be counted when entering a
+               slide number.
+       */
+       $.extend(true, $[deck].defaults, {
+               classes: {
+                       goto: 'deck-goto'
+               },
+               
+               selectors: {
+                       gotoDatalist: '#goto-datalist',
+                       gotoForm: '.goto-form',
+                       gotoInput: '#goto-slide'
+               },
+               
+               keys: {
+                       goto: 71 // g
+               },
+               
+               countNested: true
+       });
+
+       /*
+       jQuery.deck('showGoTo')
+       
+       Shows the Go To Slide form by adding the class specified by the goto class
+       option to the deck container.
+       */
+       $[deck]('extend', 'showGoTo', function() {
+               $[deck]('getContainer').addClass($[deck]('getOptions').classes.goto);
+               $($[deck]('getOptions').selectors.gotoInput).focus();
+       });
+
+       /*
+       jQuery.deck('hideGoTo')
+       
+       Hides the Go To Slide form by removing the class specified by the goto class
+       option from the deck container.
+       */
+       $[deck]('extend', 'hideGoTo', function() {
+               $($[deck]('getOptions').selectors.gotoInput).blur();
+               $[deck]('getContainer').removeClass($[deck]('getOptions').classes.goto);
+       });
+
+       /*
+       jQuery.deck('toggleGoTo')
+       
+       Toggles between showing and hiding the Go To Slide form.
+       */
+       $[deck]('extend', 'toggleGoTo', function() {
+               $[deck]($[deck]('getContainer').hasClass($[deck]('getOptions').classes.goto) ? 'hideGoTo' : 'showGoTo');
+       });
+       
+       $d.bind('deck.init', function() {
+               var opts = $[deck]('getOptions'),
+               $datalist = $(opts.selectors.gotoDatalist),
+               slideTest = $.map([
+                       opts.classes.before,
+                       opts.classes.previous,
+                       opts.classes.current,
+                       opts.classes.next,
+                       opts.classes.after
+               ], function(el, i) {
+                       return '.' + el;
+               }).join(', '),
+               rootCounter = 1;
+               
+               // Bind key events
+               $d.unbind('keydown.deckgoto').bind('keydown.deckgoto', function(e) {
+                       var key = $[deck]('getOptions').keys.goto;
+                       
+                       if (e.which === key || $.inArray(e.which, key) > -1) {
+                               e.preventDefault();
+                               $[deck]('toggleGoTo');
+                       }
+               });
+               
+               /* Populate datalist and work out countNested*/
+               $.each($[deck]('getSlides'), function(i, $slide) {
+                       var id = $slide.attr('id'),
+                       $parentSlides = $slide.parentsUntil(opts.selectors.container, slideTest);
+                       
+                       if (id) {
+                               $datalist.append('<option value="' + id + '">');
+                       }
+                       
+                       if ($parentSlides.length) {
+                               $slide.removeData('rootIndex');
+                       }
+                       else if (!opts.countNested) {
+                               $slide.data('rootIndex', rootCounter);
+                               ++rootCounter;
+                       }
+               });
+               
+               // Process form submittal, go to the slide entered
+               $(opts.selectors.gotoForm)
+               .unbind('submit.deckgoto')
+               .bind('submit.deckgoto', function(e) {
+                       var $field = $($[deck]('getOptions').selectors.gotoInput),
+                       ndx = parseInt($field.val(), 10);
+                       
+                       if (!$[deck]('getOptions').countNested) {
+                         if (ndx >= rootCounter) return false;
+                               $.each($[deck]('getSlides'), function(i, $slide) {
+                                       if ($slide.data('rootIndex') === ndx) {
+                                               ndx = i + 1;
+                                               return false;
+                                       }
+                               });
+                       }
+                       
+                       $[deck]('go', isNaN(ndx) ? $field.val() : ndx - 1);
+                       $[deck]('hideGoTo');
+                       $field.val('');
+                       
+                       e.preventDefault();
+               });
+               
+               // Dont let keys in the input trigger deck actions
+               $(opts.selectors.gotoInput)
+               .unbind('keydown.deckgoto')
+               .bind('keydown.deckgoto', function(e) {
+                       e.stopPropagation();
+               });
+       });
+})(jQuery, 'deck');
+
diff --git a/deck.js/extensions/goto/deck.goto.scss b/deck.js/extensions/goto/deck.goto.scss
new file mode 100755 (executable)
index 0000000..9170d5d
--- /dev/null
@@ -0,0 +1,46 @@
+.deck-container {      
+       .goto-form {
+               position:absolute;
+               z-index:3;
+               bottom:10px;
+               left:50%;
+               height:1.75em;
+               margin:0 0 0 -9.125em;
+               line-height:1.75em;
+               padding:0.625em;
+               display:none;
+               background:#ccc;
+               overflow:hidden;
+       
+               .borderradius & {
+                       -webkit-border-radius:10px;
+                       -moz-border-radius:10px;
+                       border-radius:10px;
+               }
+       
+               label {
+                       font-weight:bold;
+               }
+       
+               label, input {
+                       display:inline-block;
+                       font-family:inherit;
+               }
+       }
+}
+
+.deck-goto .goto-form {
+       display:block;
+}
+
+#goto-slide {
+       width:8.375em;
+       margin:0 0.625em;
+       height:1.4375em;
+}
+
+@media print {
+       .goto-form, #goto-slide {
+               display:none !important;
+       }
+}
\ No newline at end of file
diff --git a/deck.js/extensions/hash/deck.hash.css b/deck.js/extensions/hash/deck.hash.css
new file mode 100644 (file)
index 0000000..28f0732
--- /dev/null
@@ -0,0 +1,13 @@
+.deck-container .deck-permalink {
+  display: none;
+  position: absolute;
+  z-index: 4;
+  bottom: 30px;
+  right: 0;
+  width: 48px;
+  text-align: center;
+}
+
+.no-history .deck-container:hover .deck-permalink {
+  display: block;
+}
diff --git a/deck.js/extensions/hash/deck.hash.html b/deck.js/extensions/hash/deck.hash.html
new file mode 100644 (file)
index 0000000..102579c
--- /dev/null
@@ -0,0 +1,2 @@
+<!-- Place the following snippet at the bottom of the deck container. -->
+<a href="." title="Permalink to this slide" class="deck-permalink">#</a>
\ No newline at end of file
diff --git a/deck.js/extensions/hash/deck.hash.js b/deck.js/extensions/hash/deck.hash.js
new file mode 100644 (file)
index 0000000..048b647
--- /dev/null
@@ -0,0 +1,142 @@
+/*!
+Deck JS - deck.hash
+Copyright (c) 2011 Caleb Troughton
+Dual licensed under the MIT license and GPL license.
+https://github.com/imakewebthings/deck.js/blob/master/MIT-license.txt
+https://github.com/imakewebthings/deck.js/blob/master/GPL-license.txt
+*/
+
+/*
+This module adds deep linking to individual slides, enables internal links
+to slides within decks, and updates the address bar with the hash as the user
+moves through the deck. A permalink anchor is also updated. Standard themes
+hide this link in browsers that support the History API, and show it for
+those that do not. Slides that do not have an id are assigned one according to
+the hashPrefix option. In addition to the on-slide container state class
+kept by core, this module adds an on-slide state class that uses the id of each
+slide.
+*/
+(function ($, deck, window, undefined) {
+       var $d = $(document),
+       $window = $(window),
+       
+       /* Collection of internal fragment links in the deck */
+       $internals,
+       
+       /*
+       Internal only function.  Given a string, extracts the id from the hash,
+       matches it to the appropriate slide, and navigates there.
+       */
+       goByHash = function(str) {
+               var id = str.substr(str.indexOf("#") + 1),
+               slides = $[deck]('getSlides');
+               
+               $.each(slides, function(i, $el) {
+                       if ($el.attr('id') === id) {
+                               $[deck]('go', i);
+                               return false;
+                       }
+               });
+               
+               // If we don't set these to 0 the container scrolls due to hashchange
+               $[deck]('getContainer').scrollLeft(0).scrollTop(0);
+       };
+       
+       /*
+       Extends defaults/options.
+       
+       options.selectors.hashLink
+               The element matching this selector has its href attribute updated to
+               the hash of the current slide as the user navigates through the deck.
+               
+       options.hashPrefix
+               Every slide that does not have an id is assigned one at initialization.
+               Assigned ids take the form of hashPrefix + slideIndex, e.g., slide-0,
+               slide-12, etc.
+
+       options.preventFragmentScroll
+               When deep linking to a hash of a nested slide, this scrolls the deck
+               container to the top, undoing the natural browser behavior of scrolling
+               to the document fragment on load.
+       */
+       $.extend(true, $[deck].defaults, {
+               selectors: {
+                       hashLink: '.deck-permalink'
+               },
+               
+               hashPrefix: 'slide-',
+               preventFragmentScroll: true
+       });
+       
+       
+       $d.bind('deck.init', function() {
+          var opts = $[deck]('getOptions');
+               $internals = $(),
+               slides = $[deck]('getSlides');
+               
+               $.each(slides, function(i, $el) {
+                       var hash;
+                       
+                       /* Hand out ids to the unfortunate slides born without them */
+                       if (!$el.attr('id') || $el.data('deckAssignedId') === $el.attr('id')) {
+                               $el.attr('id', opts.hashPrefix + i);
+                               $el.data('deckAssignedId', opts.hashPrefix + i);
+                       }
+                       
+                       hash ='#' + $el.attr('id');
+                       
+                       /* Deep link to slides on init */
+                       if (hash === window.location.hash) {
+                               $[deck]('go', i);
+                       }
+                       
+                       /* Add internal links to this slide */
+                       $internals = $internals.add('a[href="' + hash + '"]');
+               });
+               
+               if (!Modernizr.hashchange) {
+                       /* Set up internal links using click for the poor browsers
+                       without a hashchange event. */
+                       $internals.unbind('click.deckhash').bind('click.deckhash', function(e) {
+                               goByHash($(this).attr('href'));
+                       });
+               }
+               
+               /* Set up first id container state class */
+               if (slides.length) {
+                       $[deck]('getContainer').addClass(opts.classes.onPrefix + $[deck]('getSlide').attr('id'));
+               };
+       })
+       /* Update permalink, address bar, and state class on a slide change */
+       .bind('deck.change', function(e, from, to) {
+               var hash = '#' + $[deck]('getSlide', to).attr('id'),
+               hashPath = window.location.href.replace(/#.*/, '') + hash,
+               opts = $[deck]('getOptions'),
+               osp = opts.classes.onPrefix,
+               $c = $[deck]('getContainer');
+               
+               $c.removeClass(osp + $[deck]('getSlide', from).attr('id'));
+               $c.addClass(osp + $[deck]('getSlide', to).attr('id'));
+               
+               $(opts.selectors.hashLink).attr('href', hashPath);
+               if (Modernizr.history) {
+                       window.history.replaceState({}, "", hashPath);
+               }
+       });
+       
+       /* Deals with internal links in modern browsers */
+       $window.bind('hashchange.deckhash', function(e) {
+               if (e.originalEvent && e.originalEvent.newURL) {
+                       goByHash(e.originalEvent.newURL);
+               }
+               else {
+                       goByHash(window.location.hash);
+               }
+       })
+       /* Prevent scrolling on deep links */
+       .bind('load', function() {
+               if ($[deck]('getOptions').preventFragmentScroll) {
+                       $[deck]('getContainer').scrollLeft(0).scrollTop(0);
+               }
+       });
+})(jQuery, 'deck', this);
\ No newline at end of file
diff --git a/deck.js/extensions/hash/deck.hash.scss b/deck.js/extensions/hash/deck.hash.scss
new file mode 100644 (file)
index 0000000..03b412d
--- /dev/null
@@ -0,0 +1,15 @@
+.deck-container {
+       .deck-permalink {
+               display:none;
+               position:absolute;
+               z-index:4;
+               bottom:30px;
+               right:0;
+               width:48px;
+               text-align:center;
+       }
+}
+
+.no-history .deck-container:hover .deck-permalink {
+       display:block;
+}
\ No newline at end of file
diff --git a/deck.js/extensions/menu/deck.menu.css b/deck.js/extensions/menu/deck.menu.css
new file mode 100644 (file)
index 0000000..c664a3f
--- /dev/null
@@ -0,0 +1,47 @@
+.deck-menu .slide {
+  background: #eee;
+  position: relative;
+  left: 0;
+  top: 0;
+  visibility: visible;
+  cursor: pointer;
+}
+.no-csstransforms .deck-menu > .slide {
+  float: left;
+  width: 22%;
+  height: 22%;
+  min-height: 0;
+  margin: 1%;
+  font-size: 0.22em;
+  overflow: hidden;
+  padding: 0 0.5%;
+}
+.csstransforms .deck-menu > .slide {
+  -webkit-transform: scale(0.22) !important;
+  -moz-transform: scale(0.22) !important;
+  -o-transform: scale(0.22) !important;
+  -ms-transform: scale(0.22) !important;
+  transform: scale(0.22) !important;
+  -webkit-transform-origin: 0 0;
+  -moz-transform-origin: 0 0;
+  -o-transform-origin: 0 0;
+  -ms-transform-origin: 0 0;
+  transform-origin: 0 0;
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+  width: 100%;
+  height: 100%;
+  overflow: hidden;
+  padding: 0 48px;
+  margin: 12px;
+}
+.deck-menu iframe, .deck-menu img, .deck-menu video {
+  max-width: 100%;
+}
+.deck-menu .deck-current, .no-touch .deck-menu .slide:hover {
+  background: #ddf;
+}
+.deck-menu.deck-container:hover .deck-prev-link, .deck-menu.deck-container:hover .deck-next-link {
+  display: none;
+}
diff --git a/deck.js/extensions/menu/deck.menu.js b/deck.js/extensions/menu/deck.menu.js
new file mode 100644 (file)
index 0000000..743cf77
--- /dev/null
@@ -0,0 +1,187 @@
+/*!
+Deck JS - deck.menu
+Copyright (c) 2011 Caleb Troughton
+Dual licensed under the MIT license and GPL license.
+https://github.com/imakewebthings/deck.js/blob/master/MIT-license.txt
+https://github.com/imakewebthings/deck.js/blob/master/GPL-license.txt
+*/
+
+/*
+This module adds the methods and key binding to show and hide a menu of all
+slides in the deck. The deck menu state is indicated by the presence of a class
+on the deck container.
+*/
+(function($, deck, undefined) {
+       var $d = $(document),
+       rootSlides; // Array of top level slides
+       
+       /*
+       Extends defaults/options.
+       
+       options.classes.menu
+               This class is added to the deck container when showing the slide menu.
+       
+       options.keys.menu
+               The numeric keycode used to toggle between showing and hiding the slide
+               menu.
+               
+       options.touch.doubletapWindow
+               Two consecutive touch events within this number of milliseconds will
+               be considered a double tap, and will toggle the menu on touch devices.
+       */
+       $.extend(true, $[deck].defaults, {
+               classes: {
+                       menu: 'deck-menu'
+               },
+               
+               keys: {
+                       menu: 77 // m
+               },
+               
+               touch: {
+                       doubletapWindow: 400
+               }
+       });
+
+       /*
+       jQuery.deck('showMenu')
+       
+       Shows the slide menu by adding the class specified by the menu class option
+       to the deck container.
+       */
+       $[deck]('extend', 'showMenu', function() {
+               var $c = $[deck]('getContainer'),
+               opts = $[deck]('getOptions');
+               
+               if ($c.hasClass(opts.classes.menu)) return;
+               
+               // Hide through loading class to short-circuit transitions (perf)
+               $c.addClass([opts.classes.loading, opts.classes.menu].join(' '));
+               
+               /* Forced to do this in JS until CSS learns second-grade math. Save old
+               style value for restoration when menu is hidden. */
+               if (Modernizr.csstransforms) {
+                       $.each(rootSlides, function(i, $slide) {
+                               $slide.data('oldStyle', $slide.attr('style'));
+                               $slide.css({
+                                       'position': 'absolute',
+                                       'left': ((i % 4) * 25) + '%',
+                                       'top': (Math.floor(i / 4) * 25) + '%'
+                               });
+                       });
+               }
+               
+               // Need to ensure the loading class renders first, then remove
+               window.setTimeout(function() {
+                       $c.removeClass(opts.classes.loading)
+                               .scrollTop($[deck]('getSlide').offset().top);
+               }, 0);
+       });
+
+       /*
+       jQuery.deck('hideMenu')
+       
+       Hides the slide menu by removing the class specified by the menu class
+       option from the deck container.
+       */
+       $[deck]('extend', 'hideMenu', function() {
+               var $c = $[deck]('getContainer'),
+               opts = $[deck]('getOptions');
+               
+               if (!$c.hasClass(opts.classes.menu)) return;
+               
+               $c.removeClass(opts.classes.menu);
+               $c.addClass(opts.classes.loading);
+               
+               /* Restore old style value */
+               if (Modernizr.csstransforms) {
+                       $.each(rootSlides, function(i, $slide) {
+                               var oldStyle = $slide.data('oldStyle');
+
+                               $slide.attr('style', oldStyle ? oldStyle : '');
+                       });
+               }
+               
+               window.setTimeout(function() {
+                       $c.removeClass(opts.classes.loading).scrollTop(0);
+               }, 0);
+       });
+
+       /*
+       jQuery.deck('toggleMenu')
+       
+       Toggles between showing and hiding the slide menu.
+       */
+       $[deck]('extend', 'toggleMenu', function() {
+               $[deck]('getContainer').hasClass($[deck]('getOptions').classes.menu) ?
+               $[deck]('hideMenu') : $[deck]('showMenu');
+       });
+
+       $d.bind('deck.init', function() {
+               var opts = $[deck]('getOptions'),
+               touchEndTime = 0,
+               currentSlide,
+               slideTest = $.map([
+                       opts.classes.before,
+                       opts.classes.previous,
+                       opts.classes.current,
+                       opts.classes.next,
+                       opts.classes.after
+               ], function(el, i) {
+                       return '.' + el;
+               }).join(', ');
+               
+               // Build top level slides array
+               rootSlides = [];
+               $.each($[deck]('getSlides'), function(i, $el) {
+                       if (!$el.parentsUntil(opts.selectors.container, slideTest).length) {
+                               rootSlides.push($el);
+                       }
+               });
+               
+               // Bind key events
+               $d.unbind('keydown.deckmenu').bind('keydown.deckmenu', function(e) {
+                       if (e.which === opts.keys.menu || $.inArray(e.which, opts.keys.menu) > -1) {
+                               $[deck]('toggleMenu');
+                               e.preventDefault();
+                       }
+               });
+               
+               // Double tap to toggle slide menu for touch devices
+               $[deck]('getContainer').unbind('touchstart.deckmenu').bind('touchstart.deckmenu', function(e) {
+                       currentSlide = $[deck]('getSlide');
+               })
+               .unbind('touchend.deckmenu').bind('touchend.deckmenu', function(e) {
+                       var now = Date.now();
+                       
+                       // Ignore this touch event if it caused a nav change (swipe)
+                       if (currentSlide !== $[deck]('getSlide')) return;
+                       
+                       if (now - touchEndTime < opts.touch.doubletapWindow) {
+                               $[deck]('toggleMenu');
+                               e.preventDefault();
+                       }
+                       touchEndTime = now;
+               });
+               
+               // Selecting slides from the menu
+               $.each($[deck]('getSlides'), function(i, $s) {
+                       $s.unbind('click.deckmenu').bind('click.deckmenu', function(e) {
+                               if (!$[deck]('getContainer').hasClass(opts.classes.menu)) return;
+
+                               $[deck]('go', i);
+                               $[deck]('hideMenu');
+                               e.stopPropagation();
+                               e.preventDefault();
+                       });
+               });
+       })
+       .bind('deck.change', function(e, from, to) {
+               var container = $[deck]('getContainer');
+               
+               if (container.hasClass($[deck]('getOptions').classes.menu)) {
+                       container.scrollTop($[deck]('getSlide', to).offset().top);
+               }
+       });
+})(jQuery, 'deck');
+
diff --git a/deck.js/extensions/menu/deck.menu.scss b/deck.js/extensions/menu/deck.menu.scss
new file mode 100755 (executable)
index 0000000..0bd576d
--- /dev/null
@@ -0,0 +1,58 @@
+.deck-menu {
+       .slide {
+               background:#eee;
+               position:relative;
+               left:0;
+               top:0;
+               visibility:visible;
+               cursor:pointer;
+       }
+       
+       > .slide {
+               .no-csstransforms & {
+                       float:left;
+                       width:22%;
+                       height:22%;
+                       min-height:0;
+                       margin:1%;
+                       font-size:0.22em;
+                       overflow:hidden;
+                       padding:0 0.5%;
+               }
+               
+               .csstransforms & {
+                       -webkit-transform:scale(.22) !important;
+                       -moz-transform:scale(.22) !important;
+                       -o-transform:scale(.22) !important;
+                       -ms-transform:scale(.22) !important;
+                       transform:scale(.22) !important;
+                       -webkit-transform-origin:0 0;
+                       -moz-transform-origin:0 0;
+                       -o-transform-origin:0 0;
+                       -ms-transform-origin:0 0;
+                       transform-origin:0 0;
+                       -webkit-box-sizing: border-box;
+                       -moz-box-sizing: border-box;
+                       box-sizing: border-box;
+                       width:100%;
+                       height:100%;
+                       overflow:hidden;
+                       padding:0 48px;
+                       margin:12px;
+               }
+       }
+       
+       iframe, img, video {
+               max-width:100%;
+       }
+       
+       .deck-current, .no-touch & .slide:hover {
+               background:#ddf;
+       }
+       
+       &.deck-container:hover {
+               .deck-prev-link, .deck-next-link {
+                       display:none;
+               }
+       }
+}
\ No newline at end of file
diff --git a/deck.js/extensions/navigation/deck.navigation.css b/deck.js/extensions/navigation/deck.navigation.css
new file mode 100644 (file)
index 0000000..e1ebad8
--- /dev/null
@@ -0,0 +1,43 @@
+.deck-container .deck-prev-link, .deck-container .deck-next-link {
+  display: none;
+  position: absolute;
+  z-index: 3;
+  top: 50%;
+  width: 32px;
+  height: 32px;
+  margin-top: -16px;
+  font-size: 20px;
+  font-weight: bold;
+  line-height: 32px;
+  vertical-align: middle;
+  text-align: center;
+  text-decoration: none;
+  color: #fff;
+  background: #888;
+}
+.borderradius .deck-container .deck-prev-link, .borderradius .deck-container .deck-next-link {
+  -webkit-border-radius: 16px;
+  -moz-border-radius: 16px;
+  border-radius: 16px;
+}
+.deck-container .deck-prev-link:hover, .deck-container .deck-prev-link:focus, .deck-container .deck-prev-link:active, .deck-container .deck-prev-link:visited, .deck-container .deck-next-link:hover, .deck-container .deck-next-link:focus, .deck-container .deck-next-link:active, .deck-container .deck-next-link:visited {
+  color: #fff;
+}
+.deck-container .deck-prev-link {
+  left: 8px;
+}
+.deck-container .deck-next-link {
+  right: 8px;
+}
+.deck-container:hover .deck-prev-link, .deck-container:hover .deck-next-link {
+  display: block;
+}
+.deck-container:hover .deck-prev-link.deck-nav-disabled, .touch .deck-container:hover .deck-prev-link, .deck-container:hover .deck-next-link.deck-nav-disabled, .touch .deck-container:hover .deck-next-link {
+  display: none;
+}
+
+@media print {
+  .deck-prev-link, .deck-next-link {
+    display: none !important;
+  }
+}
diff --git a/deck.js/extensions/navigation/deck.navigation.html b/deck.js/extensions/navigation/deck.navigation.html
new file mode 100644 (file)
index 0000000..c756624
--- /dev/null
@@ -0,0 +1,3 @@
+<!-- Place the following snippet at the bottom of the deck container. -->
+<a href="#" class="deck-prev-link" title="Previous">&#8592;</a>
+<a href="#" class="deck-next-link" title="Next">&#8594;</a>
\ No newline at end of file
diff --git a/deck.js/extensions/navigation/deck.navigation.js b/deck.js/extensions/navigation/deck.navigation.js
new file mode 100644 (file)
index 0000000..a07f7ea
--- /dev/null
@@ -0,0 +1,92 @@
+/*!
+Deck JS - deck.navigation
+Copyright (c) 2011 Caleb Troughton
+Dual licensed under the MIT license and GPL license.
+https://github.com/imakewebthings/deck.js/blob/master/MIT-license.txt
+https://github.com/imakewebthings/deck.js/blob/master/GPL-license.txt
+*/
+
+/*
+This module adds clickable previous and next links to the deck.
+*/
+(function($, deck, undefined) {
+       var $d = $(document),
+       
+       /* Updates link hrefs, and disabled states if last/first slide */
+       updateButtons = function(e, from, to) {
+               var opts = $[deck]('getOptions'),
+               last = $[deck]('getSlides').length - 1,
+               prevSlide = $[deck]('getSlide', to - 1),
+               nextSlide = $[deck]('getSlide', to + 1),
+               hrefBase = window.location.href.replace(/#.*/, ''),
+               prevId = prevSlide ? prevSlide.attr('id') : undefined,
+               nextId = nextSlide ? nextSlide.attr('id') : undefined;
+               
+               $(opts.selectors.previousLink)
+                       .toggleClass(opts.classes.navDisabled, !to)
+                       .attr('href', hrefBase + '#' + (prevId ? prevId : ''));
+               $(opts.selectors.nextLink)
+                       .toggleClass(opts.classes.navDisabled, to === last)
+                       .attr('href', hrefBase + '#' + (nextId ? nextId : ''));
+       };
+       
+       /*
+       Extends defaults/options.
+       
+       options.classes.navDisabled
+               This class is added to a navigation link when that action is disabled.
+               It is added to the previous link when on the first slide, and to the
+               next link when on the last slide.
+               
+       options.selectors.nextLink
+               The elements that match this selector will move the deck to the next
+               slide when clicked.
+               
+       options.selectors.previousLink
+               The elements that match this selector will move to deck to the previous
+               slide when clicked.
+       */
+       $.extend(true, $[deck].defaults, {
+               classes: {
+                       navDisabled: 'deck-nav-disabled'
+               },
+               
+               selectors: {
+                       nextLink: '.deck-next-link',
+                       previousLink: '.deck-prev-link'
+               }
+       });
+
+       $d.bind('deck.init', function() {
+               var opts = $[deck]('getOptions'),
+               slides = $[deck]('getSlides'),
+               $current = $[deck]('getSlide'),
+               ndx;
+               
+               // Setup prev/next link events
+               $(opts.selectors.previousLink)
+               .unbind('click.decknavigation')
+               .bind('click.decknavigation', function(e) {
+                       $[deck]('prev');
+                       e.preventDefault();
+               });
+               
+               $(opts.selectors.nextLink)
+               .unbind('click.decknavigation')
+               .bind('click.decknavigation', function(e) {
+                       $[deck]('next');
+                       e.preventDefault();
+               });
+               
+               // Find where we started in the deck and set initial states
+               $.each(slides, function(i, $slide) {
+                       if ($slide === $current) {
+                               ndx = i;
+                               return false;
+                       }
+               });
+               updateButtons(null, ndx, ndx);
+       })
+       .bind('deck.change', updateButtons);
+})(jQuery, 'deck');
+
diff --git a/deck.js/extensions/navigation/deck.navigation.scss b/deck.js/extensions/navigation/deck.navigation.scss
new file mode 100755 (executable)
index 0000000..815602f
--- /dev/null
@@ -0,0 +1,56 @@
+@mixin border-radius($r) {
+       -webkit-border-radius:$r;
+       -moz-border-radius:$r;
+       border-radius:$r;
+}
+
+.deck-container {
+       .deck-prev-link, .deck-next-link {
+               display:none;
+               position:absolute;
+               z-index:3;
+               top:50%;
+               width:32px;
+               height:32px;
+               margin-top:-16px;
+               font-size:20px;
+               font-weight:bold;
+               line-height:32px;
+               vertical-align:middle;
+               text-align:center;
+               text-decoration:none;
+               color:#fff;
+               background:#888;
+
+               .borderradius & {
+                       @include border-radius(16px);
+               }
+
+               &:hover, &:focus, &:active, &:visited {
+                       color:#fff;
+               }
+       }
+
+       .deck-prev-link {
+               left:8px;
+       }
+
+       .deck-next-link {
+               right:8px;
+       }
+       
+       &:hover .deck-prev-link, &:hover .deck-next-link {
+               display:block;
+
+               &.deck-nav-disabled, .touch & {
+                       display:none;
+               }
+       }
+}
+
+
+@media print {
+       .deck-prev-link, .deck-next-link {
+               display:none !important;
+       }
+}
diff --git a/deck.js/extensions/scale/deck.scale.css b/deck.js/extensions/scale/deck.scale.css
new file mode 100644 (file)
index 0000000..d6a4eb0
--- /dev/null
@@ -0,0 +1,28 @@
+/* Remove this line if you are embedding deck.js in a page and
+using the scale extension. */
+.csstransforms {
+  overflow: hidden;
+}
+
+.csstransforms .deck-container.deck-scale:not(.deck-menu) > .slide {
+  -webkit-box-sizing: padding-box;
+  -moz-box-sizing: padding-box;
+  box-sizing: padding-box;
+  width: 100%;
+  padding-bottom: 20px;
+}
+.csstransforms .deck-container.deck-scale:not(.deck-menu) > .slide > .deck-slide-scaler {
+  -webkit-transform-origin: 50% 0;
+  -moz-transform-origin: 50% 0;
+  -o-transform-origin: 50% 0;
+  -ms-transform-origin: 50% 0;
+  transform-origin: 50% 0;
+}
+
+.csstransforms .deck-container.deck-menu .deck-slide-scaler {
+  -webkit-transform: none !important;
+  -moz-transform: none !important;
+  -o-transform: none !important;
+  -ms-transform: none !important;
+  transform: none !important;
+}
diff --git a/deck.js/extensions/scale/deck.scale.js b/deck.js/extensions/scale/deck.scale.js
new file mode 100644 (file)
index 0000000..14feb1a
--- /dev/null
@@ -0,0 +1,170 @@
+/*!
+Deck JS - deck.scale
+Copyright (c) 2011-2012 Caleb Troughton
+Dual licensed under the MIT license and GPL license.
+https://github.com/imakewebthings/deck.js/blob/master/MIT-license.txt
+https://github.com/imakewebthings/deck.js/blob/master/GPL-license.txt
+*/
+
+/*
+This module adds automatic scaling to the deck.  Slides are scaled down
+using CSS transforms to fit within the deck container. If the container is
+big enough to hold the slides without scaling, no scaling occurs. The user
+can disable and enable scaling with a keyboard shortcut.
+
+Note: CSS transforms may make Flash videos render incorrectly.  Presenters
+that need to use video may want to disable scaling to play them.  HTML5 video
+works fine.
+*/
+(function($, deck, window, undefined) {
+       var $d = $(document),
+       $w = $(window),
+       baseHeight, // Value to scale against
+       timer, // Timeout id for debouncing
+       rootSlides,
+
+       /*
+       Internal function to do all the dirty work of scaling the slides.
+       */
+       scaleDeck = function() {
+               var opts = $[deck]('getOptions'),
+               obh = opts.baseHeight,
+               $container = $[deck]('getContainer'),
+               baseHeight = obh ? obh : $container.height();
+
+               // Scale each slide down if necessary (but don't scale up)
+               $.each(rootSlides, function(i, $slide) {
+                       var slideHeight = $slide.innerHeight(),
+                       $scaler = $slide.find('.' + opts.classes.scaleSlideWrapper),
+                       scale = $container.hasClass(opts.classes.scale) ?
+                               baseHeight / slideHeight :
+                               1;
+                       
+                       $.each('Webkit Moz O ms Khtml'.split(' '), function(i, prefix) {
+                               if (scale === 1) {
+                                       $scaler.css(prefix + 'Transform', '');
+                               }
+                               else {
+                                       $scaler.css(prefix + 'Transform', 'scale(' + scale + ')');
+                               }
+                       });
+               });
+       }
+
+       /*
+       Extends defaults/options.
+
+       options.classes.scale
+               This class is added to the deck container when scaling is enabled.
+               It is enabled by default when the module is included.
+       
+       options.classes.scaleSlideWrapper
+               Scaling is done using a wrapper around the contents of each slide. This
+               class is applied to that wrapper.
+
+       options.keys.scale
+               The numeric keycode used to toggle enabling and disabling scaling.
+
+       options.baseHeight
+               When baseHeight is falsy, as it is by default, the deck is scaled in
+               proportion to the height of the deck container. You may instead specify
+               a height as a number of px, and slides will be scaled against this
+               height regardless of the container size.
+
+       options.scaleDebounce
+               Scaling on the browser resize event is debounced. This number is the
+               threshold in milliseconds. You can learn more about debouncing here:
+               http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
+
+       */
+       $.extend(true, $[deck].defaults, {
+               classes: {
+                       scale: 'deck-scale',
+                       scaleSlideWrapper: 'deck-slide-scaler'
+               },
+
+               keys: {
+                       scale: 83 // s
+               },
+
+               baseHeight: null,
+               scaleDebounce: 200
+       });
+
+       /*
+       jQuery.deck('disableScale')
+
+       Disables scaling and removes the scale class from the deck container.
+       */
+       $[deck]('extend', 'disableScale', function() {
+               $[deck]('getContainer').removeClass($[deck]('getOptions').classes.scale);
+               scaleDeck();
+       });
+
+       /*
+       jQuery.deck('enableScale')
+
+       Enables scaling and adds the scale class to the deck container.
+       */
+       $[deck]('extend', 'enableScale', function() {
+               $[deck]('getContainer').addClass($[deck]('getOptions').classes.scale);
+               scaleDeck();
+       });
+
+       /*
+       jQuery.deck('toggleScale')
+
+       Toggles between enabling and disabling scaling.
+       */
+       $[deck]('extend', 'toggleScale', function() {
+               var $c = $[deck]('getContainer');
+               $[deck]($c.hasClass($[deck]('getOptions').classes.scale) ?
+                       'disableScale' : 'enableScale');
+       });
+
+       $d.bind('deck.init', function() {
+               var opts = $[deck]('getOptions'),
+               slideTest = $.map([
+                       opts.classes.before,
+                       opts.classes.previous,
+                       opts.classes.current,
+                       opts.classes.next,
+                       opts.classes.after
+               ], function(el, i) {
+                       return '.' + el;
+               }).join(', ');
+               
+               // Build top level slides array
+               rootSlides = [];
+               $.each($[deck]('getSlides'), function(i, $el) {
+                       if (!$el.parentsUntil(opts.selectors.container, slideTest).length) {
+                               rootSlides.push($el);
+                       }
+               });
+               
+               // Use a wrapper on each slide to handle content scaling
+               $.each(rootSlides, function(i, $slide) {
+                       $slide.children().wrapAll('<div class="' + opts.classes.scaleSlideWrapper + '"/>');
+               });
+
+               // Debounce the resize scaling
+               $w.unbind('resize.deckscale').bind('resize.deckscale', function() {
+                       window.clearTimeout(timer);
+                       timer = window.setTimeout(scaleDeck, opts.scaleDebounce);
+               })
+               // Scale once on load, in case images or something change layout
+               .unbind('load.deckscale').bind('load.deckscale', scaleDeck);
+
+               // Bind key events
+               $d.unbind('keydown.deckscale').bind('keydown.deckscale', function(e) {
+                       if (e.which === opts.keys.scale || $.inArray(e.which, opts.keys.scale) > -1) {
+                               $[deck]('toggleScale');
+                               e.preventDefault();
+                       }
+               });
+
+               // Enable scale on init
+               $[deck]('enableScale');
+       });
+})(jQuery, 'deck', this);
+
diff --git a/deck.js/extensions/scale/deck.scale.scss b/deck.js/extensions/scale/deck.scale.scss
new file mode 100644 (file)
index 0000000..2fa0851
--- /dev/null
@@ -0,0 +1,31 @@
+/* Remove this line if you are embedding deck.js in a page and
+using the scale extension. */
+.csstransforms {
+       overflow:hidden;
+}
+
+.csstransforms .deck-container.deck-scale:not(.deck-menu) {
+       > .slide {
+               -webkit-box-sizing: padding-box;
+               -moz-box-sizing: padding-box;
+               box-sizing: padding-box;
+               width:100%;
+               padding-bottom:20px;
+               
+               > .deck-slide-scaler {
+                       -webkit-transform-origin: 50% 0;
+                       -moz-transform-origin: 50% 0;
+                       -o-transform-origin: 50% 0;
+                       -ms-transform-origin: 50% 0;
+                       transform-origin: 50% 0;
+               }
+       }
+}
+
+.csstransforms .deck-container.deck-menu .deck-slide-scaler {
+       -webkit-transform:none !important;
+       -moz-transform:none !important;
+       -o-transform:none !important;
+       -ms-transform:none !important;
+       transform:none !important;
+}
\ No newline at end of file
diff --git a/deck.js/extensions/status/deck.status.css b/deck.js/extensions/status/deck.status.css
new file mode 100644 (file)
index 0000000..17d55ad
--- /dev/null
@@ -0,0 +1,18 @@
+.deck-container .deck-status {
+  position: absolute;
+  bottom: 10px;
+  right: 5px;
+  color: #888;
+  z-index: 3;
+  margin: 0;
+}
+
+body.deck-container .deck-status {
+  position: fixed;
+}
+
+@media print {
+  .deck-status {
+    display: none;
+  }
+}
diff --git a/deck.js/extensions/status/deck.status.html b/deck.js/extensions/status/deck.status.html
new file mode 100644 (file)
index 0000000..310a025
--- /dev/null
@@ -0,0 +1,6 @@
+<!-- Place the following snippet at the bottom of the deck container. -->
+<p class="deck-status">
+       <span class="deck-status-current"></span>
+       /
+       <span class="deck-status-total"></span>
+</p>
\ No newline at end of file
diff --git a/deck.js/extensions/status/deck.status.js b/deck.js/extensions/status/deck.status.js
new file mode 100644 (file)
index 0000000..b876554
--- /dev/null
@@ -0,0 +1,95 @@
+/*!
+Deck JS - deck.status
+Copyright (c) 2011 Caleb Troughton
+Dual licensed under the MIT license and GPL license.
+https://github.com/imakewebthings/deck.js/blob/master/MIT-license.txt
+https://github.com/imakewebthings/deck.js/blob/master/GPL-license.txt
+*/
+
+/*
+This module adds a (current)/(total) style status indicator to the deck.
+*/
+(function($, deck, undefined) {
+       var $d = $(document),
+       
+       updateCurrent = function(e, from, to) {
+               var opts = $[deck]('getOptions');
+               
+               $(opts.selectors.statusCurrent).text(opts.countNested ?
+                       to + 1 :
+                       $[deck]('getSlide', to).data('rootSlide')
+               );
+       };
+       
+       /*
+       Extends defaults/options.
+       
+       options.selectors.statusCurrent
+               The element matching this selector displays the current slide number.
+               
+       options.selectors.statusTotal
+               The element matching this selector displays the total number of slides.
+               
+       options.countNested
+               If false, only top level slides will be counted in the current and
+               total numbers.
+       */
+       $.extend(true, $[deck].defaults, {
+               selectors: {
+                       statusCurrent: '.deck-status-current',
+                       statusTotal: '.deck-status-total'
+               },
+               
+               countNested: true
+       });
+       
+       $d.bind('deck.init', function() {
+               var opts = $[deck]('getOptions'),
+               slides = $[deck]('getSlides'),
+               $current = $[deck]('getSlide'),
+               ndx;
+               
+               // Set total slides once
+               if (opts.countNested) {
+                       $(opts.selectors.statusTotal).text(slides.length);
+               }
+               else {
+                       /* Determine root slides by checking each slide's ancestor tree for
+                       any of the slide classes. */
+                       var rootIndex = 1,
+                       slideTest = $.map([
+                               opts.classes.before,
+                               opts.classes.previous,
+                               opts.classes.current,
+                               opts.classes.next,
+                               opts.classes.after
+                       ], function(el, i) {
+                               return '.' + el;
+                       }).join(', ');
+                       
+                       /* Store the 'real' root slide number for use during slide changes. */
+                       $.each(slides, function(i, $el) {
+                               var $parentSlides = $el.parentsUntil(opts.selectors.container, slideTest);
+
+                               $el.data('rootSlide', $parentSlides.length ?
+                                       $parentSlides.last().data('rootSlide') :
+                                       rootIndex++
+                               );
+                       });
+                       
+                       $(opts.selectors.statusTotal).text(rootIndex - 1);
+               }
+               
+               // Find where we started in the deck and set initial state
+               $.each(slides, function(i, $el) {
+                       if ($el === $current) {
+                               ndx = i;
+                               return false;
+                       }
+               });
+               updateCurrent(null, ndx, ndx);
+       })
+       /* Update current slide number with each change event */
+       .bind('deck.change', updateCurrent);
+})(jQuery, 'deck');
+
diff --git a/deck.js/extensions/status/deck.status.scss b/deck.js/extensions/status/deck.status.scss
new file mode 100755 (executable)
index 0000000..d57af24
--- /dev/null
@@ -0,0 +1,22 @@
+.deck-container {
+       .deck-status {
+               position:absolute;
+               bottom:10px;
+               right:5px;
+               color:#888;
+               z-index:3;
+               margin:0;
+       }
+}
+
+body.deck-container {
+       .deck-status {
+               position:fixed;
+       }
+}
+
+@media print {
+       .deck-status {
+               display:none;
+       }
+}
diff --git a/deck.js/introduction/index.html b/deck.js/introduction/index.html
new file mode 100644 (file)
index 0000000..71d7c04
--- /dev/null
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<!--[if lt IE 7]> <html class="no-js ie6" lang="en"> <![endif]-->
+<!--[if IE 7]>    <html class="no-js ie7" lang="en"> <![endif]-->
+<!--[if IE 8]>    <html class="no-js ie8" lang="en"> <![endif]-->
+<!--[if gt IE 8]><!-->  <html class="no-js" lang="en"> <!--<![endif]-->
+<head>
+       <meta charset="utf-8">
+       <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+       
+       <title>Getting Started with deck.js</title>
+       
+       <meta name="description" content="A jQuery library for modern HTML presentations">
+       <meta name="author" content="Caleb Troughton">
+       <meta name="viewport" content="width=1024, user-scalable=no">
+       
+       <!-- Core and extension CSS files -->
+       <link rel="stylesheet" href="../core/deck.core.css">
+       <link rel="stylesheet" href="../extensions/goto/deck.goto.css">
+       <link rel="stylesheet" href="../extensions/menu/deck.menu.css">
+       <link rel="stylesheet" href="../extensions/navigation/deck.navigation.css">
+       <link rel="stylesheet" href="../extensions/status/deck.status.css">
+       <link rel="stylesheet" href="../extensions/hash/deck.hash.css">
+       <link rel="stylesheet" href="../extensions/scale/deck.scale.css">
+       
+       <!-- Style theme. More available in /themes/style/ or create your own. -->
+       <link rel="stylesheet" href="../themes/style/web-2.0.css">
+       
+       <!-- Transition theme. More available in /themes/transition/ or create your own. -->
+       <link rel="stylesheet" href="../themes/transition/horizontal-slide.css">
+       
+       <script src="../modernizr.custom.js"></script>
+</head>
+
+<body class="deck-container">
+
+<!-- Begin slides -->
+<section class="slide" id="title-slide">
+       <h1>Getting Started with deck.js</h1>
+</section>
+
+<section class="slide" id="how-to-overview">
+       <h2>How to Make a Deck</h2>
+       <ol>
+               <li>
+                       <h3>Write Slides</h3>
+                       <p>Slide content is simple&nbsp;HTML.</p>
+               </li>
+               <li>
+                       <h3>Choose Themes</h3>
+                       <p>One for slide styles and one for deck&nbsp;transitions.</p>
+               </li>
+               <li>
+                       <h3>Include Extensions</h3>
+                       <p>Add extra functionality to your deck, or leave it stripped&nbsp;down.</p>
+               </li>
+       </ol>
+</section>
+
+<section class="slide" id="markup">
+       <h2>The Markup</h2>
+       <p>Slides are just HTML elements with a class of <code>slide</code>.</p>
+       <pre><code>&lt;section class=&quot;slide&quot;&gt;
+   &lt;h2&gt;How to Make a Deck&lt;/h2&gt;
+   &lt;ol&gt;
+      &lt;li&gt;
+         &lt;h3&gt;Write Slides&lt;/h3&gt;
+         &lt;p&gt;Slide content is simple HTML.&lt;/p&gt;
+      &lt;/li&gt;
+      &lt;li&gt;
+         &lt;h3&gt;Choose Themes&lt;/h3&gt;
+         &lt;p&gt;One for slide styles and one for deck transitions.&lt;/p&gt;
+      &lt;/li&gt;
+      &hellip;
+   &lt;/ol&gt;
+&lt;/section&gt;</code></pre>
+</section>
+
+<section class="slide" id="themes">
+       <h2>Style Themes</h2>
+       <p>Customizes the colors, typography, and layout of slide&nbsp;content.</p>
+       <pre><code>&lt;link rel=&quot;stylesheet&quot; href=&quot;/path/to/css/style-theme.css&quot;&gt;</code></pre>
+       <h2>Transition Themes</h2>
+       <p>Defines transitions between slides using CSS3 transitions.  Less capable browsers fall back to cutaways. But <strong>you</strong> aren&rsquo;t using <em>those</em> browsers to give your presentations, are&nbsp;you&hellip;</p>
+       <pre><code>&lt;link rel=&quot;stylesheet&quot; href=&quot;/path/to/css/transition-theme.css&quot;&gt;</code></pre>
+</section>
+
+<section class="slide" id="extensions">
+       <h2>Extensions</h2>
+       <p>Core gives you basic slide functionality with left and right arrow navigation, but you may want more. Here are the ones included in this&nbsp;deck:</p>
+       
+       <ul>
+               <li class="slide" id="extensions-goto">
+                       <strong>deck.goto</strong>: Adds a shortcut key to jump to any slide number.  Hit g, type in the slide number, and hit&nbsp;enter.
+               </li>
+               
+               <li class="slide" id="extensions-hash">
+                       <strong>deck.hash</strong>: Enables internal linking within slides, deep linking to individual slides, and updates the address bar &amp; a permalink anchor with each slide&nbsp;change.
+               </li>
+
+               <li class="slide" id="extensions-menu">
+                       <strong>deck.menu</strong>: Adds a menu view, letting you see all slides in a grid. Hit m to toggle to menu view, continue navigating your deck, and hit m to return to normal view. Touch devices can double-tap the deck to switch between&nbsp;views.
+               </li>
+
+               <li class="slide" id="extensions-navigation">
+                       <strong>deck.navigation</strong>: Adds clickable left and right buttons for the less keyboard&nbsp;inclined.
+               </li>
+
+               <li class="slide" id="extensions-status">
+                       <strong>deck.status</strong>: Adds a page number indicator. (current/total)
+               </li>
+
+               <li class="slide" id="extensions-scale">
+                       <strong>deck.scale</strong>: Scales each slide to fit within the deck container using CSS Transforms for those browsers that support them.
+               </li>
+       </ul>
+       
+       <p class="slide" id="extension-folders">Each extension folder in the download package contains the necessary JavaScript, CSS, and HTML&nbsp;files. For a complete list of extension modules included in deck.js, check out the&nbsp;<a href="http://imakewebthings.github.com/deck.js/docs">documentation</a>.</p>
+</section>
+
+<section class="slide" id="nested">
+       <h2>Nested Slides</h2>
+       <p>That last slide had a few steps.  To create substeps in slides, just nest them:</p>
+       <pre><code>&lt;section class=&quot;slide&quot;&gt;
+  &lt;h2&gt;Extensions&lt;/h2&gt;
+  &lt;p&gt;Core gives you basic slide functionality...&lt;/p&gt;               
+  &lt;ul&gt;
+     &lt;li class=&quot;slide&quot;&gt;
+        &lt;h3&gt;deck.goto&lt;/h3&gt;
+        &lt;p&gt;Adds a shortcut key to jump to any slide number...&lt;/p&gt;
+     &lt;/li&gt;
+     &lt;li class=&quot;slide&quot;&gt;...&lt;/li&gt;  
+     &lt;li class=&quot;slide&quot;&gt;...&lt;/li&gt;
+     &lt;li class=&quot;slide&quot;&gt;...&lt;/li&gt;
+  &lt;/ul&gt;
+&lt;/section&gt;</code></pre>
+</section>
+
+<section class="slide" id="elements-images">
+       <h2>Other Elements: Images</h2>
+       <img src="http://placekitten.com/600/375" alt="Kitties">
+       <pre><code>&lt;img src=&quot;http://placekitten.com/600/375&quot; alt=&quot;Kitties&quot;&gt;</code></pre>
+</section>
+
+<section class="slide" id="elements-blockquotes">
+       <h2>Other Elements: Blockquotes</h2>
+       <blockquote cite="http://example.org">
+               <p>Food is an important part of a balanced diet.</p>
+               <p><cite>Fran Lebowitz</cite></p>
+       </blockquote>
+       <pre><code>&lt;blockquote cite=&quot;http://example.org&quot;&gt;
+  &lt;p&gt;Food is an important part of a balanced diet.&lt;/p&gt;
+  &lt;p&gt;&lt;cite&gt;Fran Lebowitz&lt;/cite&gt;&lt;/p&gt;
+&lt;/blockquote&gt;</code></pre>
+</section>
+
+
+<section class="slide" id="elements-videos">
+       <h2>Other Elements: Video Embeds</h2>
+       <p>Embed videos from your favorite online video service or with an HTML5 video&nbsp;element.</p>
+       
+       <iframe src="http://player.vimeo.com/video/1063136?title=0&amp;byline=0&amp;portrait=0" width="400" height="225" frameborder="0"></iframe>
+       
+       <pre><code>&lt;iframe src=&quot;http://player.vimeo.com/video/1063136?title=0&amp;amp;byline=0&amp;amp;portrait=0&quot; width=&quot;400&quot; height=&quot;225&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;</code></pre>
+</section>
+
+<section class="slide" id="digging-deeper">
+       <h2>Digging Deeper</h2>
+       <p>If you want to learn about making your own themes, extending deck.js, and more, check out the&nbsp;<a href="../docs/">documentation</a>.</p>
+</section>
+
+<!-- deck.navigation snippet -->
+<a href="#" class="deck-prev-link" title="Previous">&#8592;</a>
+<a href="#" class="deck-next-link" title="Next">&#8594;</a>
+
+<!-- deck.status snippet -->
+<p class="deck-status">
+       <span class="deck-status-current"></span>
+       /
+       <span class="deck-status-total"></span>
+</p>
+
+<!-- deck.goto snippet -->
+<form action="." method="get" class="goto-form">
+       <label for="goto-slide">Go to slide:</label>
+       <input type="text" name="slidenum" id="goto-slide" list="goto-datalist">
+       <datalist id="goto-datalist"></datalist>
+       <input type="submit" value="Go">
+</form>
+
+<!-- deck.hash snippet -->
+<a href="." title="Permalink to this slide" class="deck-permalink">#</a>
+
+
+<!-- Grab CDN jQuery, with a protocol relative URL; fall back to local if offline -->
+<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
+<script>window.jQuery || document.write('<script src="../jquery-1.7.2.min.js"><\/script>')</script>
+
+<!-- Deck Core and extensions -->
+<script src="../core/deck.core.js"></script>
+<script src="../extensions/hash/deck.hash.js"></script>
+<script src="../extensions/menu/deck.menu.js"></script>
+<script src="../extensions/goto/deck.goto.js"></script>
+<script src="../extensions/status/deck.status.js"></script>
+<script src="../extensions/navigation/deck.navigation.js"></script>
+<script src="../extensions/scale/deck.scale.js"></script>
+
+<!-- Initialize the deck -->
+<script>
+$(function() {
+       $.deck('.slide');
+});
+</script>
+
+</body>
+</html>
diff --git a/deck.js/jquery-1.7.2.min.js b/deck.js/jquery-1.7.2.min.js
new file mode 100644 (file)
index 0000000..93adea1
--- /dev/null
@@ -0,0 +1,4 @@
+/*! jQuery v1.7.2 jquery.com | jquery.org/license */
+(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&f.type(b)==="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0;return d+"px"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d=parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h,i){var j,k=d==null,l=0,m=a.length;if(d&&typeof d=="object"){for(l in d)e.access(a,c,l,d[l],1,h,f);g=1}else if(f!==b){j=i===b&&e.isFunction(f),k&&(j?(j=c,c=function(a,b,c){return j.call(e(a),c)}):(c.call(a,f),c=null));if(c)for(;l<m;l++)c(a[l],d,j?f.call(a[l],l,c(a[l],d)):f,i);g=1}return g?a:k?c.call(a):m?c(a[0],d):h},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m,n=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?n(g):h==="function"&&(!a.unique||!p.has(g))&&c.push(g)},o=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,j=!0,m=k||0,k=0,l=c.length;for(;c&&m<l;m++)if(c[m].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}j=!1,c&&(a.once?e===!0?p.disable():c=[]:d&&d.length&&(e=d.shift(),p.fireWith(e[0],e[1])))},p={add:function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){j&&f<=l&&(l--,f<=m&&m--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&p.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(j?a.once||d.push([b,c]):(!a.once||!e)&&o(b,c));return this},fire:function(){p.fireWith(this,arguments);return this},fired:function(){return!!i}};return p};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p=c.createElement("div"),q=c.documentElement;p.setAttribute("className","t"),p.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="<div "+n+"display:block;'><div style='"+t+"0;display:block;overflow:hidden;'></div></div>"+"<table "+n+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="<table><tr><td style='"+t+"0;display:none'></td><td>t</td></tr></table>",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="<div style='width:5px;'></div>",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h,i,j=this[0],k=0,m=null;if(a===b){if(this.length){m=f.data(j);if(j.nodeType===1&&!f._data(j,"parsedAttrs")){g=j.attributes;for(i=g.length;k<i;k++)h=g[k].name,h.indexOf("data-")===0&&(h=f.camelCase(h.substring(5)),l(j,h,m[h]));f._data(j,"parsedAttrs",!0)}}return m}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!";return f.access(this,function(c){if(c===b){m=this.triggerHandler("getData"+e,[d[0]]),m===b&&j&&(m=f.data(j,a),m=l(j,a,m));return m===b&&d[1]?this.data(d[0]):m}d[1]=c,this.each(function(){var b=f(this);b.triggerHandler("setData"+e,d),f.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length<d)return f.queue(this[0],a);return c===b?this:this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise(c)}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,f.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i<g;i++)e=d[i],e&&(c=f.propFix[e]||e,h=u.test(e),h||f.attr(a,e,""),a.removeAttribute(v?e:c),h&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0,coords:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(
+a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:g&&G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=f.event.special[c.type]||{},j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(!i.preDispatch||i.preDispatch.call(this,c)!==!1){if(e&&(!c.button||c.type!=="click")){n=f(this),n.context=this.ownerDocument||this;for(m=c.target;m!=this;m=m.parentNode||this)if(m.disabled!==!0){p={},r=[],n[0]=m;for(k=0;k<e;k++)s=d[k],t=s.selector,p[t]===b&&(p[t]=s.quick?H(m,s.quick):n.is(t)),p[t]&&r.push(s);r.length&&j.push({elem:m,matches:r})}}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){q=j[k],c.currentTarget=q.elem;for(l=0;l<q.matches.length&&!c.isImmediatePropagationStopped();l++){s=q.matches[l];if(h||!c.namespace&&!s.namespace||c.namespace_re&&c.namespace_re.test(s.namespace))c.data=s.data,c.handleObj=s,o=((f.event.special[s.origType]||{}).handle||s.handler).apply(q.elem,g),o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()))}}i.postDispatch&&i.postDispatch.call(this,c);return c.result}},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),d._submit_attached=!0)})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9||d===11){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.globalPOS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")[\\s/>]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f
+.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(f.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(g){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,function(a,b){b.src?f.ajax({type:"GET",global:!1,url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1></$2>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]==="<table>"&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i<u;i++)bn(l[i]);else bn(l);l.nodeType?j.push(l):j=f.merge(j,l)}if(d){g=function(a){return!a.type||be.test(a.type)};for(k=0;j[k];k++){h=j[k];if(e&&f.nodeName(h,"script")&&(!h.type||be.test(h.type)))e.push(h.parentNode?h.parentNode.removeChild(h):h);else{if(h.nodeType===1){var v=f.grep(h.getElementsByTagName("script"),g);j.splice.apply(j,[k+1,0].concat(v))}d.appendChild(h)}}}return j},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bp=/alpha\([^)]*\)/i,bq=/opacity=([^)]*)/,br=/([A-Z]|^ms)/g,bs=/^[\-+]?(?:\d*\.)?\d+$/i,bt=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,bu=/^([\-+])=([\-+.\de]+)/,bv=/^margin/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Top","Right","Bottom","Left"],by,bz,bA;f.fn.css=function(a,c){return f.access(this,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)},a,c,arguments.length>1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),(e===""&&f.css(d,"display")==="none"||!f.contains(d.ownerDocument.documentElement,d))&&f._data(d,"olddisplay",cu(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(ct("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(ct("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o,p,q;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]);if((k=f.cssHooks[g])&&"expand"in k){l=k.expand(a[g]),delete a[g];for(i in l)i in a||(a[i]=l[i])}}for(g in a){h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cu(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cm.test(h)?(q=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),q?(f._data(this,"toggle"+i,q==="show"?"hide":"show"),j[q]()):j[h]()):(m=cn.exec(h),n=j.cur(),m?(o=parseFloat(m[2]),p=m[3]||(f.cssNumber[i]?"":"px"),p!=="px"&&(f.style(this,i,(o||1)+p),n=(o||1)/j.cur()*n,f.style(this,i,n+p)),m[1]&&(o=(m[1]==="-="?-1:1)*o+n),j.custom(n,o,p)):j.custom(n,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:ct("show",1),slideUp:ct("hide",1),slideToggle:ct("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a){return a},swing:function(a){return-Math.cos(a*Math.PI)/2+.5}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cq||cr(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){f._data(e.elem,"fxshow"+e.prop)===b&&(e.options.hide?f._data(e.elem,"fxshow"+e.prop,e.start):e.options.show&&f._data(e.elem,"fxshow"+e.prop,e.end))},h()&&f.timers.push(h)&&!co&&(co=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cq||cr(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(co),co=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(cp.concat.apply([],cp),function(a,b){b.indexOf("margin")&&(f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)})}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cv,cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?cv=function(a,b,c,d){try{d=a.getBoundingClientRect()}catch(e){}if(!d||!f.contains(c,a))return d?{top:d.top,left:d.left}:{top:0,left:0};var g=b.body,h=cy(b),i=c.clientTop||g.clientTop||0,j=c.clientLeft||g.clientLeft||0,k=h.pageYOffset||f.support.boxModel&&c.scrollTop||g.scrollTop,l=h.pageXOffset||f.support.boxModel&&c.scrollLeft||g.scrollLeft,m=d.top+k-i,n=d.left+l-j;return{top:m,left:n}}:cv=function(a,b,c){var d,e=a.offsetParent,g=a,h=b.body,i=b.defaultView,j=i?i.getComputedStyle(a,null):a.currentStyle,k=a.offsetTop,l=a.offsetLeft;while((a=a.parentNode)&&a!==h&&a!==c){if(f.support.fixedPosition&&j.position==="fixed")break;d=i?i.getComputedStyle(a,null):a.currentStyle,k-=a.scrollTop,l-=a.scrollLeft,a===e&&(k+=a.offsetTop,l+=a.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(a.nodeName))&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),g=e,e=a.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),j=d}if(j.position==="relative"||j.position==="static")k+=h.offsetTop,l+=h.offsetLeft;f.support.fixedPosition&&j.position==="fixed"&&(k+=Math.max(c.scrollTop,h.scrollTop),l+=Math.max(c.scrollLeft,h.scrollLeft));return{top:k,left:l}},f.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){f.offset.setOffset(this,a,b)});var c=this[0],d=c&&c.ownerDocument;if(!d)return null;if(c===d.body)return f.offset.bodyOffset(c);return cv(c,d,d.documentElement)},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);
\ No newline at end of file
diff --git a/deck.js/modernizr.custom.js b/deck.js/modernizr.custom.js
new file mode 100644 (file)
index 0000000..964fb40
--- /dev/null
@@ -0,0 +1,4 @@
+/* Modernizr 2.0.6 (Custom Build) | MIT & BSD
+ * Contains: fontface | backgroundsize | borderimage | borderradius | boxshadow | flexbox | hsla | multiplebgs | opacity | rgba | textshadow | cssanimations | csscolumns | generatedcontent | cssgradients | cssreflections | csstransforms | csstransforms3d | csstransitions | applicationcache | canvas | canvastext | draganddrop | hashchange | history | audio | video | indexeddb | input | inputtypes | localstorage | postmessage | sessionstorage | websockets | websqldatabase | webworkers | geolocation | inlinesvg | smil | svg | svgclippaths | touch | webgl | iepp | cssclasses | addtest | teststyles | testprop | testallprops | hasevent | prefixes | domprefixes | load
+ */
+;window.Modernizr=function(a,b,c){function H(){e.input=function(a){for(var b=0,c=a.length;b<c;b++)t[a[b]]=a[b]in l;return t}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)l.setAttribute("type",f=a[d]),e=l.type!=="text",e&&(l.value=m,l.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&l.style.WebkitAppearance!==c?(g.appendChild(l),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(l,null).WebkitAppearance!=="textfield"&&l.offsetHeight!==0,g.removeChild(l)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=l.checkValidity&&l.checkValidity()===!1:/^color$/.test(f)?(g.appendChild(l),g.offsetWidth,e=l.value!=m,g.removeChild(l)):e=l.value!=m)),s[a[d]]=!!e;return s}("search tel url email datetime date month week time datetime-local number range color".split(" "))}function F(a,b){var c=a.charAt(0).toUpperCase()+a.substr(1),d=(a+" "+p.join(c+" ")+c).split(" ");return E(d,b)}function E(a,b){for(var d in a)if(k[a[d]]!==c)return b=="pfx"?a[d]:!0;return!1}function D(a,b){return!!~(""+a).indexOf(b)}function C(a,b){return typeof a===b}function B(a,b){return A(o.join(a+";")+(b||""))}function A(a){k.cssText=a}var d="2.0.6",e={},f=!0,g=b.documentElement,h=b.head||b.getElementsByTagName("head")[0],i="modernizr",j=b.createElement(i),k=j.style,l=b.createElement("input"),m=":)",n=Object.prototype.toString,o=" -webkit- -moz- -o- -ms- -khtml- ".split(" "),p="Webkit Moz O ms Khtml".split(" "),q={svg:"http://www.w3.org/2000/svg"},r={},s={},t={},u=[],v=function(a,c,d,e){var f,h,j,k=b.createElement("div");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:i+(d+1),k.appendChild(j);f=["&shy;","<style>",a,"</style>"].join(""),k.id=i,k.innerHTML+=f,g.appendChild(k),h=c(k,a),k.parentNode.removeChild(k);return!!h},w=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=C(e[d],"function"),C(e[d],c)||(e[d]=c),e.removeAttribute(d))),e=null;return f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),x,y={}.hasOwnProperty,z;!C(y,c)&&!C(y.call,c)?z=function(a,b){return y.call(a,b)}:z=function(a,b){return b in a&&C(a.constructor.prototype[b],c)};var G=function(c,d){var f=c.join(""),g=d.length;v(f,function(c,d){var f=b.styleSheets[b.styleSheets.length-1],h=f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"",i=c.childNodes,j={};while(g--)j[i[g].id]=i[g];e.touch="ontouchstart"in a||j.touch.offsetTop===9,e.csstransforms3d=j.csstransforms3d.offsetLeft===9,e.generatedcontent=j.generatedcontent.offsetHeight>=1,e.fontface=/src/i.test(h)&&h.indexOf(d.split(" ")[0])===0},g,d)}(['@font-face {font-family:"font";src:url("https://")}',["@media (",o.join("touch-enabled),("),i,")","{#touch{top:9px;position:absolute}}"].join(""),["@media (",o.join("transform-3d),("),i,")","{#csstransforms3d{left:9px;position:absolute}}"].join(""),['#generatedcontent:after{content:"',m,'";visibility:hidden}'].join("")],["fontface","touch","csstransforms3d","generatedcontent"]);r.flexbox=function(){function c(a,b,c,d){a.style.cssText=o.join(b+":"+c+";")+(d||"")}function a(a,b,c,d){b+=":",a.style.cssText=(b+o.join(c+";"+b)).slice(0,-b.length)+(d||"")}var d=b.createElement("div"),e=b.createElement("div");a(d,"display","box","width:42px;padding:0;"),c(e,"box-flex","1","width:10px;"),d.appendChild(e),g.appendChild(d);var f=e.offsetWidth===42;d.removeChild(e),g.removeChild(d);return f},r.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},r.canvastext=function(){return!!e.canvas&&!!C(b.createElement("canvas").getContext("2d").fillText,"function")},r.webgl=function(){return!!a.WebGLRenderingContext},r.touch=function(){return e.touch},r.geolocation=function(){return!!navigator.geolocation},r.postmessage=function(){return!!a.postMessage},r.websqldatabase=function(){var b=!!a.openDatabase;return b},r.indexedDB=function(){for(var b=-1,c=p.length;++b<c;)if(a[p[b].toLowerCase()+"IndexedDB"])return!0;return!!a.indexedDB},r.hashchange=function(){return w("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},r.history=function(){return!!a.history&&!!history.pushState},r.draganddrop=function(){return w("dragstart")&&w("drop")},r.websockets=function(){for(var b=-1,c=p.length;++b<c;)if(a[p[b]+"WebSocket"])return!0;return"WebSocket"in a},r.rgba=function(){A("background-color:rgba(150,255,150,.5)");return D(k.backgroundColor,"rgba")},r.hsla=function(){A("background-color:hsla(120,40%,100%,.5)");return D(k.backgroundColor,"rgba")||D(k.backgroundColor,"hsla")},r.multiplebgs=function(){A("background:url(https://),url(https://),red url(https://)");return/(url\s*\(.*?){3}/.test(k.background)},r.backgroundsize=function(){return F("backgroundSize")},r.borderimage=function(){return F("borderImage")},r.borderradius=function(){return F("borderRadius")},r.boxshadow=function(){return F("boxShadow")},r.textshadow=function(){return b.createElement("div").style.textShadow===""},r.opacity=function(){B("opacity:.55");return/^0.55$/.test(k.opacity)},r.cssanimations=function(){return F("animationName")},r.csscolumns=function(){return F("columnCount")},r.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";A((a+o.join(b+a)+o.join(c+a)).slice(0,-a.length));return D(k.backgroundImage,"gradient")},r.cssreflections=function(){return F("boxReflect")},r.csstransforms=function(){return!!E(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])},r.csstransforms3d=function(){var a=!!E(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);a&&"webkitPerspective"in g.style&&(a=e.csstransforms3d);return a},r.csstransitions=function(){return F("transitionProperty")},r.fontface=function(){return e.fontface},r.generatedcontent=function(){return e.generatedcontent},r.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType){c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"');var d='video/mp4; codecs="avc1.42E01E';c.h264=a.canPlayType(d+'"')||a.canPlayType(d+', mp4a.40.2"'),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}}catch(e){}return c},r.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"'),c.mp3=a.canPlayType("audio/mpeg;"),c.wav=a.canPlayType('audio/wav; codecs="1"'),c.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")}catch(d){}return c},r.localstorage=function(){try{return!!localStorage.getItem}catch(a){return!1}},r.sessionstorage=function(){try{return!!sessionStorage.getItem}catch(a){return!1}},r.webworkers=function(){return!!a.Worker},r.applicationcache=function(){return!!a.applicationCache},r.svg=function(){return!!b.createElementNS&&!!b.createElementNS(q.svg,"svg").createSVGRect},r.inlinesvg=function(){var a=b.createElement("div");a.innerHTML="<svg/>";return(a.firstChild&&a.firstChild.namespaceURI)==q.svg},r.smil=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"animate")))},r.svgclippaths=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"clipPath")))};for(var I in r)z(r,I)&&(x=I.toLowerCase(),e[x]=r[I](),u.push((e[x]?"":"no-")+x));e.input||H(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)z(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return;b=typeof b=="boolean"?b:!!b(),g.className+=" "+(b?"":"no-")+a,e[a]=b}return e},A(""),j=l=null,a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1}()&&function(a,b){function s(a){var b=-1;while(++b<g)a.createElement(f[b])}a.iepp=a.iepp||{};var d=a.iepp,e=d.html5elements||"abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",f=e.split("|"),g=f.length,h=new RegExp("(^|\\s)("+e+")","gi"),i=new RegExp("<(/*)("+e+")","gi"),j=/^\s*[\{\}]\s*$/,k=new RegExp("(^|[^\\n]*?\\s)("+e+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),l=b.createDocumentFragment(),m=b.documentElement,n=m.firstChild,o=b.createElement("body"),p=b.createElement("style"),q=/print|all/,r;d.getCSS=function(a,b){if(a+""===c)return"";var e=-1,f=a.length,g,h=[];while(++e<f){g=a[e];if(g.disabled)continue;b=g.media||b,q.test(b)&&h.push(d.getCSS(g.imports,b),g.cssText),b="all"}return h.join("")},d.parseCSS=function(a){var b=[],c;while((c=k.exec(a))!=null)b.push(((j.exec(c[1])?"\n":c[1])+c[2]+c[3]).replace(h,"$1.iepp_$2")+c[4]);return b.join("\n")},d.writeHTML=function(){var a=-1;r=r||b.body;while(++a<g){var c=b.getElementsByTagName(f[a]),d=c.length,e=-1;while(++e<d)c[e].className.indexOf("iepp_")<0&&(c[e].className+=" iepp_"+f[a])}l.appendChild(r),m.appendChild(o),o.className=r.className,o.id=r.id,o.innerHTML=r.innerHTML.replace(i,"<$1font")},d._beforePrint=function(){p.styleSheet.cssText=d.parseCSS(d.getCSS(b.styleSheets,"all")),d.writeHTML()},d.restoreHTML=function(){o.innerHTML="",m.removeChild(o),m.appendChild(r)},d._afterPrint=function(){d.restoreHTML(),p.styleSheet.cssText=""},s(b),s(l);d.disablePP||(n.insertBefore(p,n.firstChild),p.media="print",p.className="iepp-printshim",a.attachEvent("onbeforeprint",d._beforePrint),a.attachEvent("onafterprint",d._afterPrint))}(a,b),e._version=d,e._prefixes=o,e._domPrefixes=p,e.hasEvent=w,e.testProp=function(a){return E([a])},e.testAllProps=F,e.testStyles=v,g.className=g.className.replace(/\bno-js\b/,"")+(f?" js "+u.join(" "):"");return e}(this,this.document),function(a,b,c){function k(a){return!a||a=="loaded"||a=="complete"}function j(){var a=1,b=-1;while(p.length- ++b)if(p[b].s&&!(a=p[b].r))break;a&&g()}function i(a){var c=b.createElement("script"),d;c.src=a.s,c.onreadystatechange=c.onload=function(){!d&&k(c.readyState)&&(d=1,j(),c.onload=c.onreadystatechange=null)},m(function(){d||(d=1,j())},H.errorTimeout),a.e?c.onload():n.parentNode.insertBefore(c,n)}function h(a){var c=b.createElement("link"),d;c.href=a.s,c.rel="stylesheet",c.type="text/css";if(!a.e&&(w||r)){var e=function(a){m(function(){if(!d)try{a.sheet.cssRules.length?(d=1,j()):e(a)}catch(b){b.code==1e3||b.message=="security"||b.message=="denied"?(d=1,m(function(){j()},0)):e(a)}},0)};e(c)}else c.onload=function(){d||(d=1,m(function(){j()},0))},a.e&&c.onload();m(function(){d||(d=1,j())},H.errorTimeout),!a.e&&n.parentNode.insertBefore(c,n)}function g(){var a=p.shift();q=1,a?a.t?m(function(){a.t=="c"?h(a):i(a)},0):(a(),j()):q=0}function f(a,c,d,e,f,h){function i(){!o&&k(l.readyState)&&(r.r=o=1,!q&&j(),l.onload=l.onreadystatechange=null,m(function(){u.removeChild(l)},0))}var l=b.createElement(a),o=0,r={t:d,s:c,e:h};l.src=l.data=c,!s&&(l.style.display="none"),l.width=l.height="0",a!="object"&&(l.type=d),l.onload=l.onreadystatechange=i,a=="img"?l.onerror=i:a=="script"&&(l.onerror=function(){r.e=r.r=1,g()}),p.splice(e,0,r),u.insertBefore(l,s?null:n),m(function(){o||(u.removeChild(l),r.r=r.e=o=1,j())},H.errorTimeout)}function e(a,b,c){var d=b=="c"?z:y;q=0,b=b||"j",C(a)?f(d,a,b,this.i++,l,c):(p.splice(this.i++,0,a),p.length==1&&g());return this}function d(){var a=H;a.loader={load:e,i:0};return a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=r&&!s,u=s?l:n.parentNode,v=a.opera&&o.call(a.opera)=="[object Opera]",w="webkitAppearance"in l.style,x=w&&"async"in b.createElement("script"),y=r?"object":v||x?"img":"script",z=w?"img":y,A=Array.isArray||function(a){return o.call(a)=="[object Array]"},B=function(a){return Object(a)===a},C=function(a){return typeof a=="string"},D=function(a){return o.call(a)=="[object Function]"},E=[],F={},G,H;H=function(a){function f(a){var b=a.split("!"),c=E.length,d=b.pop(),e=b.length,f={url:d,origUrl:d,prefixes:b},g,h;for(h=0;h<e;h++)g=F[b[h]],g&&(f=g(f));for(h=0;h<c;h++)f=E[h](f);return f}function e(a,b,e,g,h){var i=f(a),j=i.autoCallback;if(!i.bypass){b&&(b=D(b)?b:b[a]||b[g]||b[a.split("/").pop().split("?")[0]]);if(i.instead)return i.instead(a,b,e,g,h);e.load(i.url,i.forceCSS||!i.forceJS&&/css$/.test(i.url)?"c":c,i.noexec),(D(b)||D(j))&&e.load(function(){d(),b&&b(i.origUrl,h,g),j&&j(i.origUrl,h,g)})}}function b(a,b){function c(a){if(C(a))e(a,h,b,0,d);else if(B(a))for(i in a)a.hasOwnProperty(i)&&e(a[i],h,b,i,d)}var d=!!a.test,f=d?a.yep:a.nope,g=a.load||a.both,h=a.callback,i;c(f),c(g),a.complete&&b.load(a.complete)}var g,h,i=this.yepnope.loader;if(C(a))e(a,0,i,0);else if(A(a))for(g=0;g<a.length;g++)h=a[g],C(h)?e(h,0,i,0):A(h)?H(h):B(h)&&b(h,i);else B(a)&&b(a,i)},H.addPrefix=function(a,b){F[a]=b},H.addFilter=function(a){E.push(a)},H.errorTimeout=1e4,b.readyState==null&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",G=function(){b.removeEventListener("DOMContentLoaded",G,0),b.readyState="complete"},0)),a.yepnope=d()}(this,this.document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
\ No newline at end of file
diff --git a/deck.js/test/fixtures/complex.html b/deck.js/test/fixtures/complex.html
new file mode 100644 (file)
index 0000000..00f8d6f
--- /dev/null
@@ -0,0 +1,24 @@
+<div class="deck-container">
+       <div class="slide1"></div>
+       
+       <div class="slide2 slide3 slide4">
+               <div class="slide2 slide10"></div>
+               <div class="slide3 slide4"></div>
+       </div>
+       
+       <div class="slide3 slide5"></div>
+       
+       <div class="slide6 slide7 slide8 slide9 slide10"></div>
+       
+       <p class="deck-status">
+               <span class="deck-status-current"></span>
+               /
+               <span class="deck-status-total"></span>
+       </p>
+       
+       <form action="." method="get" class="goto-form">
+               <label for="goto-slide">Go to slide:</label>
+               <input type="number" name="slidenum" id="goto-slide" value="">
+               <input type="submit" value="Go">
+       </form>
+</div>
\ No newline at end of file
diff --git a/deck.js/test/fixtures/empty.html b/deck.js/test/fixtures/empty.html
new file mode 100644 (file)
index 0000000..d669ac5
--- /dev/null
@@ -0,0 +1,19 @@
+<div class="deck-container">
+       <a href="#" class="deck-prev-link">Previous</a>
+       <a href="#" class="deck-next-link">Next</a>
+       
+       <p class="deck-status">
+               <span class="deck-status-current"></span>
+               /
+               <span class="deck-status-total"></span>
+       </p>
+       
+       <form action="." method="get" class="goto-form">
+               <label for="goto-slide">Go to slide:</label>
+               <input type="number" name="slidenum" id="goto-slide" value="">
+               <input type="submit" value="Go">
+       </form>
+       
+       <a href="#" class="deck-permalink">#</a>
+       <a href="#custom-id" id="internal-test">Internal Test Link</a>
+</div>
\ No newline at end of file
diff --git a/deck.js/test/fixtures/iframe_simple.html b/deck.js/test/fixtures/iframe_simple.html
new file mode 100644 (file)
index 0000000..a64e9c0
--- /dev/null
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html lang="en">
+<head>
+       <meta charset="UTF-8">
+       <title></title>
+</head>
+<body>
+Simple Iframe  
+</body>
+</html>
diff --git a/deck.js/test/fixtures/iframes.html b/deck.js/test/fixtures/iframes.html
new file mode 100644 (file)
index 0000000..016665e
--- /dev/null
@@ -0,0 +1,32 @@
+<div class="deck-container">
+       <div class="slide1"></div>
+       
+       <div class="slide2 slide3 slide4">
+       </div>
+       
+        <div class="slide5">
+          <iframe src='fixtures/iframe_simple.html'></iframe>
+        </div>
+
+        <div class='slide6'>
+
+        </div>
+
+        <div class="slide7">
+          <iframe></iframe>
+        </div>
+       
+       <div class="slide8 slide9 slide10"></div>
+       
+       <p class="deck-status">
+               <span class="deck-status-current"></span>
+               /
+               <span class="deck-status-total"></span>
+       </p>
+       
+       <form action="." method="get" class="goto-form">
+               <label for="goto-slide">Go to slide:</label>
+               <input type="number" name="slidenum" id="goto-slide" value="">
+               <input type="submit" value="Go">
+       </form>
+</div>
diff --git a/deck.js/test/fixtures/nesteds.html b/deck.js/test/fixtures/nesteds.html
new file mode 100644 (file)
index 0000000..a19f5d3
--- /dev/null
@@ -0,0 +1,36 @@
+<div class="deck-container">
+       <div class="slide">
+       </div>
+       
+       <div class="slide">
+       </div>
+       
+       <div class="slide root">
+               <div class="slide"></div>
+               <div class="slide"></div>
+               <div class="slide"></div>
+               <div class="slide">
+                               <div class="slide"></div>
+                               <div class="slide"></div>
+                               <div class="slide"></div>
+               </div>
+       </div>
+       
+       <div class="slide" id="after">
+       </div>
+       
+       <div class="slide">
+       </div>
+       
+       <p class="deck-status">
+               <span class="deck-status-current"></span>
+               /
+               <span class="deck-status-total"></span>
+       </p>
+       
+       <form action="." method="get" class="goto-form">
+               <label for="goto-slide">Go to slide:</label>
+               <input type="number" name="slidenum" id="goto-slide" value="">
+               <input type="submit" value="Go">
+       </form>
+</div>
\ No newline at end of file
diff --git a/deck.js/test/fixtures/standard.html b/deck.js/test/fixtures/standard.html
new file mode 100644 (file)
index 0000000..b9e307b
--- /dev/null
@@ -0,0 +1,42 @@
+<div class="deck-container">
+       <div class="slide slide1"></div>
+       
+       <div class="slide slide2" id="custom-id"></div>
+       
+       <div class="slide slide3"></div>
+       
+       <div class="slide slide4"></div>
+       
+       <div class="slide slide5"></div>
+       
+       <a href="#" class="deck-prev-link">Previous</a>
+       <a href="#" class="deck-next-link">Next</a>
+       
+       <p class="deck-status">
+               <span class="deck-status-current"></span>
+               /
+               <span class="deck-status-total"></span>
+       </p>
+       
+       <form action="." method="get" class="goto-form">
+               <label for="goto-slide">Go to slide:</label>
+               <input type="number" name="slidenum" id="goto-slide" value="" list="goto-datalist">
+               <datalist id="goto-datalist"></datalist>
+               <input type="submit" value="Go">
+       </form>
+       
+       <a href="#" class="deck-permalink">#</a>
+       <a href="#custom-id" id="internal-test">Internal Test Link</a>
+</div>
+
+<div class="alt-container">
+       <div class="alt-slide alt-slide1"><input></div>
+       
+       <div class="alt-slide alt-slide2"></div>
+       
+       <div class="alt-slide alt-slide3"></div>
+       
+       <div class="alt-slide alt-slide4"></div>
+       
+       <div class="alt-slide alt-slide5"></div>
+</div>
\ No newline at end of file
diff --git a/deck.js/test/index.html b/deck.js/test/index.html
new file mode 100644 (file)
index 0000000..8a7ff2f
--- /dev/null
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+  "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+       <title>deck.js - Jasmine Test Runner</title>
+       <link rel="stylesheet" type="text/css" href="lib/jasmine.css">
+       <script type="text/javascript" src="../modernizr.custom.js"></script>
+       <script type="text/javascript" src="lib/jasmine.js"></script>
+       <script type="text/javascript" src="lib/jasmine-html.js"></script>
+       <script src="../jquery-1.7.2.min.js"></script>
+       <script type="text/javascript" src="lib/jasmine-jquery.js"></script>
+
+       <!-- include source files here... -->
+       <script type="text/javascript" src="../core/deck.core.js"></script>
+       <script type="text/javascript" src="../extensions/hash/deck.hash.js"></script>
+       <script type="text/javascript" src="../extensions/menu/deck.menu.js"></script>
+       <script type="text/javascript" src="../extensions/goto/deck.goto.js"></script>
+       <script type="text/javascript" src="../extensions/status/deck.status.js"></script>
+       <script type="text/javascript" src="../extensions/navigation/deck.navigation.js"></script>
+       <script type="text/javascript" src="../extensions/scale/deck.scale.js"></script>
+
+       <!-- include spec files here... -->
+       <script type="text/javascript" src="settings.js"></script>
+       <script type="text/javascript" src="spec.core.js"></script>
+       <script type="text/javascript" src="spec.menu.js"></script>
+       <script type="text/javascript" src="spec.goto.js"></script>
+       <script type="text/javascript" src="spec.navigation.js"></script>
+       <script type="text/javascript" src="spec.hash.js"></script>
+       <script type="text/javascript" src="spec.status.js"></script>
+       <script type="text/javascript" src="spec.scale.js"></script>
+</head>
+
+<body>
+<script type="text/javascript">
+       jasmine.getEnv().addReporter(new jasmine.TrivialReporter());
+       jasmine.getEnv().execute();
+</script>
+</body>
+</html>
diff --git a/deck.js/test/lib/jasmine-html.js b/deck.js/test/lib/jasmine-html.js
new file mode 100755 (executable)
index 0000000..7383401
--- /dev/null
@@ -0,0 +1,190 @@
+jasmine.TrivialReporter = function(doc) {
+  this.document = doc || document;
+  this.suiteDivs = {};
+  this.logRunningSpecs = false;
+};
+
+jasmine.TrivialReporter.prototype.createDom = function(type, attrs, childrenVarArgs) {
+  var el = document.createElement(type);
+
+  for (var i = 2; i < arguments.length; i++) {
+    var child = arguments[i];
+
+    if (typeof child === 'string') {
+      el.appendChild(document.createTextNode(child));
+    } else {
+      if (child) { el.appendChild(child); }
+    }
+  }
+
+  for (var attr in attrs) {
+    if (attr == "className") {
+      el[attr] = attrs[attr];
+    } else {
+      el.setAttribute(attr, attrs[attr]);
+    }
+  }
+
+  return el;
+};
+
+jasmine.TrivialReporter.prototype.reportRunnerStarting = function(runner) {
+  var showPassed, showSkipped;
+
+  this.outerDiv = this.createDom('div', { className: 'jasmine_reporter' },
+      this.createDom('div', { className: 'banner' },
+        this.createDom('div', { className: 'logo' },
+            this.createDom('span', { className: 'title' }, "Jasmine"),
+            this.createDom('span', { className: 'version' }, runner.env.versionString())),
+        this.createDom('div', { className: 'options' },
+            "Show ",
+            showPassed = this.createDom('input', { id: "__jasmine_TrivialReporter_showPassed__", type: 'checkbox' }),
+            this.createDom('label', { "for": "__jasmine_TrivialReporter_showPassed__" }, " passed "),
+            showSkipped = this.createDom('input', { id: "__jasmine_TrivialReporter_showSkipped__", type: 'checkbox' }),
+            this.createDom('label', { "for": "__jasmine_TrivialReporter_showSkipped__" }, " skipped")
+            )
+          ),
+
+      this.runnerDiv = this.createDom('div', { className: 'runner running' },
+          this.createDom('a', { className: 'run_spec', href: '?' }, "run all"),
+          this.runnerMessageSpan = this.createDom('span', {}, "Running..."),
+          this.finishedAtSpan = this.createDom('span', { className: 'finished-at' }, ""))
+      );
+
+  this.document.body.appendChild(this.outerDiv);
+
+  var suites = runner.suites();
+  for (var i = 0; i < suites.length; i++) {
+    var suite = suites[i];
+    var suiteDiv = this.createDom('div', { className: 'suite' },
+        this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, "run"),
+        this.createDom('a', { className: 'description', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, suite.description));
+    this.suiteDivs[suite.id] = suiteDiv;
+    var parentDiv = this.outerDiv;
+    if (suite.parentSuite) {
+      parentDiv = this.suiteDivs[suite.parentSuite.id];
+    }
+    parentDiv.appendChild(suiteDiv);
+  }
+
+  this.startedAt = new Date();
+
+  var self = this;
+  showPassed.onclick = function(evt) {
+    if (showPassed.checked) {
+      self.outerDiv.className += ' show-passed';
+    } else {
+      self.outerDiv.className = self.outerDiv.className.replace(/ show-passed/, '');
+    }
+  };
+
+  showSkipped.onclick = function(evt) {
+    if (showSkipped.checked) {
+      self.outerDiv.className += ' show-skipped';
+    } else {
+      self.outerDiv.className = self.outerDiv.className.replace(/ show-skipped/, '');
+    }
+  };
+};
+
+jasmine.TrivialReporter.prototype.reportRunnerResults = function(runner) {
+  var results = runner.results();
+  var className = (results.failedCount > 0) ? "runner failed" : "runner passed";
+  this.runnerDiv.setAttribute("class", className);
+  //do it twice for IE
+  this.runnerDiv.setAttribute("className", className);
+  var specs = runner.specs();
+  var specCount = 0;
+  for (var i = 0; i < specs.length; i++) {
+    if (this.specFilter(specs[i])) {
+      specCount++;
+    }
+  }
+  var message = "" + specCount + " spec" + (specCount == 1 ? "" : "s" ) + ", " + results.failedCount + " failure" + ((results.failedCount == 1) ? "" : "s");
+  message += " in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + "s";
+  this.runnerMessageSpan.replaceChild(this.createDom('a', { className: 'description', href: '?'}, message), this.runnerMessageSpan.firstChild);
+
+  this.finishedAtSpan.appendChild(document.createTextNode("Finished at " + new Date().toString()));
+};
+
+jasmine.TrivialReporter.prototype.reportSuiteResults = function(suite) {
+  var results = suite.results();
+  var status = results.passed() ? 'passed' : 'failed';
+  if (results.totalCount === 0) { // todo: change this to check results.skipped
+    status = 'skipped';
+  }
+  this.suiteDivs[suite.id].className += " " + status;
+};
+
+jasmine.TrivialReporter.prototype.reportSpecStarting = function(spec) {
+  if (this.logRunningSpecs) {
+    this.log('>> Jasmine Running ' + spec.suite.description + ' ' + spec.description + '...');
+  }
+};
+
+jasmine.TrivialReporter.prototype.reportSpecResults = function(spec) {
+  var results = spec.results();
+  var status = results.passed() ? 'passed' : 'failed';
+  if (results.skipped) {
+    status = 'skipped';
+  }
+  var specDiv = this.createDom('div', { className: 'spec '  + status },
+      this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(spec.getFullName()) }, "run"),
+      this.createDom('a', {
+        className: 'description',
+        href: '?spec=' + encodeURIComponent(spec.getFullName()),
+        title: spec.getFullName()
+      }, spec.description));
+
+
+  var resultItems = results.getItems();
+  var messagesDiv = this.createDom('div', { className: 'messages' });
+  for (var i = 0; i < resultItems.length; i++) {
+    var result = resultItems[i];
+
+    if (result.type == 'log') {
+      messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage log'}, result.toString()));
+    } else if (result.type == 'expect' && result.passed && !result.passed()) {
+      messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage fail'}, result.message));
+
+      if (result.trace.stack) {
+        messagesDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack));
+      }
+    }
+  }
+
+  if (messagesDiv.childNodes.length > 0) {
+    specDiv.appendChild(messagesDiv);
+  }
+
+  this.suiteDivs[spec.suite.id].appendChild(specDiv);
+};
+
+jasmine.TrivialReporter.prototype.log = function() {
+  var console = jasmine.getGlobal().console;
+  if (console && console.log) {
+    if (console.log.apply) {
+      console.log.apply(console, arguments);
+    } else {
+      console.log(arguments); // ie fix: console.log.apply doesn't exist on ie
+    }
+  }
+};
+
+jasmine.TrivialReporter.prototype.getLocation = function() {
+  return this.document.location;
+};
+
+jasmine.TrivialReporter.prototype.specFilter = function(spec) {
+  var paramMap = {};
+  var params = this.getLocation().search.substring(1).split('&');
+  for (var i = 0; i < params.length; i++) {
+    var p = params[i].split('=');
+    paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]);
+  }
+
+  if (!paramMap.spec) {
+    return true;
+  }
+  return spec.getFullName().indexOf(paramMap.spec) === 0;
+};
diff --git a/deck.js/test/lib/jasmine-jquery.js b/deck.js/test/lib/jasmine-jquery.js
new file mode 100755 (executable)
index 0000000..4f7357d
--- /dev/null
@@ -0,0 +1,288 @@
+var readFixtures = function() {
+  return jasmine.getFixtures().proxyCallTo_('read', arguments);
+};
+
+var preloadFixtures = function() {
+  jasmine.getFixtures().proxyCallTo_('preload', arguments);
+};
+
+var loadFixtures = function() {
+  jasmine.getFixtures().proxyCallTo_('load', arguments);
+};
+
+var setFixtures = function(html) {
+  jasmine.getFixtures().set(html);
+};
+
+var sandbox = function(attributes) {
+  return jasmine.getFixtures().sandbox(attributes);
+};
+
+var spyOnEvent = function(selector, eventName) {
+  jasmine.JQuery.events.spyOn(selector, eventName);
+}
+
+jasmine.getFixtures = function() {
+  return jasmine.currentFixtures_ = jasmine.currentFixtures_ || new jasmine.Fixtures();
+};
+
+jasmine.Fixtures = function() {
+  this.containerId = 'jasmine-fixtures';
+  this.fixturesCache_ = {};
+  this.fixturesPath = 'spec/javascripts/fixtures';
+};
+
+jasmine.Fixtures.prototype.set = function(html) {
+  this.cleanUp();
+  this.createContainer_(html);
+};
+
+jasmine.Fixtures.prototype.preload = function() {
+  this.read.apply(this, arguments);
+};
+
+jasmine.Fixtures.prototype.load = function() {
+  this.cleanUp();
+  this.createContainer_(this.read.apply(this, arguments));
+};
+
+jasmine.Fixtures.prototype.read = function() {
+  var htmlChunks = [];
+
+  var fixtureUrls = arguments;
+  for(var urlCount = fixtureUrls.length, urlIndex = 0; urlIndex < urlCount; urlIndex++) {
+    htmlChunks.push(this.getFixtureHtml_(fixtureUrls[urlIndex]));
+  }
+
+  return htmlChunks.join('');
+};
+
+jasmine.Fixtures.prototype.clearCache = function() {
+  this.fixturesCache_ = {};
+};
+
+jasmine.Fixtures.prototype.cleanUp = function() {
+  jQuery('#' + this.containerId).remove();
+};
+
+jasmine.Fixtures.prototype.sandbox = function(attributes) {
+  var attributesToSet = attributes || {};
+  return jQuery('<div id="sandbox" />').attr(attributesToSet);
+};
+
+jasmine.Fixtures.prototype.createContainer_ = function(html) {
+  var container;
+  if(html instanceof jQuery) {
+    container = jQuery('<div id="' + this.containerId + '" />');
+    container.html(html);
+  } else {
+    container = '<div id="' + this.containerId + '">' + html + '</div>'
+  }
+  jQuery('body').append(container);
+};
+
+jasmine.Fixtures.prototype.getFixtureHtml_ = function(url) {  
+  if (typeof this.fixturesCache_[url] == 'undefined') {
+    this.loadFixtureIntoCache_(url);
+  }
+  return this.fixturesCache_[url];
+};
+
+jasmine.Fixtures.prototype.loadFixtureIntoCache_ = function(relativeUrl) {
+  var self = this;
+  var url = this.fixturesPath.match('/$') ? this.fixturesPath + relativeUrl : this.fixturesPath + '/' + relativeUrl;
+  jQuery.ajax({
+    async: false, // must be synchronous to guarantee that no tests are run before fixture is loaded
+    cache: false,
+    dataType: 'html',
+    url: url,
+    success: function(data) {
+      self.fixturesCache_[relativeUrl] = data;
+    },
+    error: function(jqXHR, status, errorThrown) {
+        throw Error('Fixture could not be loaded: ' + url + ' (status: ' + status + ', message: ' + errorThrown.message + ')');
+    }
+  });
+};
+
+jasmine.Fixtures.prototype.proxyCallTo_ = function(methodName, passedArguments) {
+  return this[methodName].apply(this, passedArguments);
+};
+
+
+jasmine.JQuery = function() {};
+
+jasmine.JQuery.browserTagCaseIndependentHtml = function(html) {
+  return jQuery('<div/>').append(html).html();
+};
+
+jasmine.JQuery.elementToString = function(element) {
+  return jQuery('<div />').append(element.clone()).html();
+};
+
+jasmine.JQuery.matchersClass = {};
+
+(function(namespace) {
+  var data = {
+    spiedEvents: {},
+    handlers:    []
+  };
+
+  namespace.events = {
+    spyOn: function(selector, eventName) {
+      var handler = function(e) {
+        data.spiedEvents[[selector, eventName]] = e;
+      };
+      jQuery(selector).bind(eventName, handler);
+      data.handlers.push(handler);
+    },
+
+    wasTriggered: function(selector, eventName) {
+      return !!(data.spiedEvents[[selector, eventName]]);
+    },
+
+    cleanUp: function() {
+      data.spiedEvents = {};
+      data.handlers    = [];
+    }
+  }
+})(jasmine.JQuery);
+
+(function(){
+  var jQueryMatchers = {
+    toHaveClass: function(className) {
+      return this.actual.hasClass(className);
+    },
+
+    toBeVisible: function() {
+      return this.actual.is(':visible');
+    },
+
+    toBeHidden: function() {
+      return this.actual.is(':hidden');
+    },
+
+    toBeSelected: function() {
+      return this.actual.is(':selected');
+    },
+
+    toBeChecked: function() {
+      return this.actual.is(':checked');
+    },
+
+    toBeEmpty: function() {
+      return this.actual.is(':empty');
+    },
+
+    toExist: function() {
+      return this.actual.size() > 0;
+    },
+
+    toHaveAttr: function(attributeName, expectedAttributeValue) {
+      return hasProperty(this.actual.attr(attributeName), expectedAttributeValue);
+    },
+
+    toHaveId: function(id) {
+      return this.actual.attr('id') == id;
+    },
+
+    toHaveHtml: function(html) {
+      return this.actual.html() == jasmine.JQuery.browserTagCaseIndependentHtml(html);
+    },
+
+    toHaveText: function(text) {
+      if (text && jQuery.isFunction(text.test)) {
+        return text.test(this.actual.text());
+      } else {
+        return this.actual.text() == text;
+      }
+    },
+
+    toHaveValue: function(value) {
+      return this.actual.val() == value;
+    },
+
+    toHaveData: function(key, expectedValue) {
+      return hasProperty(this.actual.data(key), expectedValue);
+    },
+
+    toBe: function(selector) {
+      return this.actual.is(selector);
+    },
+
+    toContain: function(selector) {
+      return this.actual.find(selector).size() > 0;
+    },
+
+    toBeDisabled: function(selector){
+      return this.actual.is(':disabled');
+    },
+
+    // tests the existence of a specific event binding
+    toHandle: function(eventName) {
+      var events = this.actual.data("events");
+      return events && events[eventName].length > 0;
+    },
+    
+    // tests the existence of a specific event binding + handler
+    toHandleWith: function(eventName, eventHandler) {
+      var stack = this.actual.data("events")[eventName];
+      var i;
+      for (i = 0; i < stack.length; i++) {
+        if (stack[i].handler == eventHandler) {
+          return true;
+        }
+      }
+      return false;
+    }
+  };
+
+  var hasProperty = function(actualValue, expectedValue) {
+    if (expectedValue === undefined) {
+      return actualValue !== undefined;
+    }
+    return actualValue == expectedValue;
+  };
+
+  var bindMatcher = function(methodName) {
+    var builtInMatcher = jasmine.Matchers.prototype[methodName];
+
+    jasmine.JQuery.matchersClass[methodName] = function() {
+      if (this.actual instanceof jQuery) {
+        var result = jQueryMatchers[methodName].apply(this, arguments);
+        this.actual = jasmine.JQuery.elementToString(this.actual);
+        return result;
+      }
+
+      if (builtInMatcher) {
+        return builtInMatcher.apply(this, arguments);
+      }
+
+      return false;
+    };
+  };
+
+  for(var methodName in jQueryMatchers) {
+    bindMatcher(methodName);
+  }
+})();
+
+beforeEach(function() {
+  this.addMatchers(jasmine.JQuery.matchersClass);
+  this.addMatchers({
+    toHaveBeenTriggeredOn: function(selector) {
+      this.message = function() {
+        return [
+          "Expected event " + this.actual + " to have been triggered on" + selector,
+          "Expected event " + this.actual + " not to have been triggered on" + selector
+        ];
+      };
+      return jasmine.JQuery.events.wasTriggered(selector, this.actual);
+    }
+  })
+});
+
+afterEach(function() {
+  jasmine.getFixtures().cleanUp();
+  jasmine.JQuery.events.cleanUp();
+});
diff --git a/deck.js/test/lib/jasmine.css b/deck.js/test/lib/jasmine.css
new file mode 100755 (executable)
index 0000000..6583fe7
--- /dev/null
@@ -0,0 +1,166 @@
+body {
+  font-family: "Helvetica Neue Light", "Lucida Grande", "Calibri", "Arial", sans-serif;
+}
+
+
+.jasmine_reporter a:visited, .jasmine_reporter a {
+  color: #303; 
+}
+
+.jasmine_reporter a:hover, .jasmine_reporter a:active {
+  color: blue; 
+}
+
+.run_spec {
+  float:right;
+  padding-right: 5px;
+  font-size: .8em;
+  text-decoration: none;
+}
+
+.jasmine_reporter {
+  margin: 0 5px;
+}
+
+.banner {
+  color: #303;
+  background-color: #fef;
+  padding: 5px;
+}
+
+.logo {
+  float: left;
+  font-size: 1.1em;
+  padding-left: 5px;
+}
+
+.logo .version {
+  font-size: .6em;
+  padding-left: 1em;
+}
+
+.runner.running {
+  background-color: yellow;
+}
+
+
+.options {
+  text-align: right;
+  font-size: .8em;
+}
+
+
+
+
+.suite {
+  border: 1px outset gray;
+  margin: 5px 0;
+  padding-left: 1em;
+}
+
+.suite .suite {
+  margin: 5px; 
+}
+
+.suite.passed {
+  background-color: #dfd;
+}
+
+.suite.failed {
+  background-color: #fdd;
+}
+
+.spec {
+  margin: 5px;
+  padding-left: 1em;
+  clear: both;
+}
+
+.spec.failed, .spec.passed, .spec.skipped {
+  padding-bottom: 5px;
+  border: 1px solid gray;
+}
+
+.spec.failed {
+  background-color: #fbb;
+  border-color: red;
+}
+
+.spec.passed {
+  background-color: #bfb;
+  border-color: green;
+}
+
+.spec.skipped {
+  background-color: #bbb;
+}
+
+.messages {
+  border-left: 1px dashed gray;
+  padding-left: 1em;
+  padding-right: 1em;
+}
+
+.passed {
+  background-color: #cfc;
+  display: none;
+}
+
+.failed {
+  background-color: #fbb;
+}
+
+.skipped {
+  color: #777;
+  background-color: #eee;
+  display: none;
+}
+
+
+/*.resultMessage {*/
+  /*white-space: pre;*/
+/*}*/
+
+.resultMessage span.result {
+  display: block;
+  line-height: 2em;
+  color: black;
+}
+
+.resultMessage .mismatch {
+  color: black;
+}
+
+.stackTrace {
+  white-space: pre;
+  font-size: .8em;
+  margin-left: 10px;
+  max-height: 5em;
+  overflow: auto;
+  border: 1px inset red;
+  padding: 1em;
+  background: #eef;
+}
+
+.finished-at {
+  padding-left: 1em;
+  font-size: .6em;
+}
+
+.show-passed .passed,
+.show-skipped .skipped {
+  display: block;
+}
+
+
+#jasmine_content {
+  position:fixed;
+  right: 100%;
+}
+
+.runner {
+  border: 1px solid gray;
+  display: block;
+  margin: 5px 0;
+  padding: 2px 0 2px 10px;
+}
diff --git a/deck.js/test/lib/jasmine.js b/deck.js/test/lib/jasmine.js
new file mode 100755 (executable)
index 0000000..e96e0a7
--- /dev/null
@@ -0,0 +1,2477 @@
+var isCommonJS = typeof window == "undefined";
+
+/**
+ * Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework.
+ *
+ * @namespace
+ */
+var jasmine = {};
+if (isCommonJS) exports.jasmine = jasmine;
+/**
+ * @private
+ */
+jasmine.unimplementedMethod_ = function() {
+  throw new Error("unimplemented method");
+};
+
+/**
+ * Use <code>jasmine.undefined</code> instead of <code>undefined</code>, since <code>undefined</code> is just
+ * a plain old variable and may be redefined by somebody else.
+ *
+ * @private
+ */
+jasmine.undefined = jasmine.___undefined___;
+
+/**
+ * Show diagnostic messages in the console if set to true
+ *
+ */
+jasmine.VERBOSE = false;
+
+/**
+ * Default interval in milliseconds for event loop yields (e.g. to allow network activity or to refresh the screen with the HTML-based runner). Small values here may result in slow test running. Zero means no updates until all tests have completed.
+ *
+ */
+jasmine.DEFAULT_UPDATE_INTERVAL = 250;
+
+/**
+ * Default timeout interval in milliseconds for waitsFor() blocks.
+ */
+jasmine.DEFAULT_TIMEOUT_INTERVAL = 5000;
+
+jasmine.getGlobal = function() {
+  function getGlobal() {
+    return this;
+  }
+
+  return getGlobal();
+};
+
+/**
+ * Allows for bound functions to be compared.  Internal use only.
+ *
+ * @ignore
+ * @private
+ * @param base {Object} bound 'this' for the function
+ * @param name {Function} function to find
+ */
+jasmine.bindOriginal_ = function(base, name) {
+  var original = base[name];
+  if (original.apply) {
+    return function() {
+      return original.apply(base, arguments);
+    };
+  } else {
+    // IE support
+    return jasmine.getGlobal()[name];
+  }
+};
+
+jasmine.setTimeout = jasmine.bindOriginal_(jasmine.getGlobal(), 'setTimeout');
+jasmine.clearTimeout = jasmine.bindOriginal_(jasmine.getGlobal(), 'clearTimeout');
+jasmine.setInterval = jasmine.bindOriginal_(jasmine.getGlobal(), 'setInterval');
+jasmine.clearInterval = jasmine.bindOriginal_(jasmine.getGlobal(), 'clearInterval');
+
+jasmine.MessageResult = function(values) {
+  this.type = 'log';
+  this.values = values;
+  this.trace = new Error(); // todo: test better
+};
+
+jasmine.MessageResult.prototype.toString = function() {
+  var text = "";
+  for (var i = 0; i < this.values.length; i++) {
+    if (i > 0) text += " ";
+    if (jasmine.isString_(this.values[i])) {
+      text += this.values[i];
+    } else {
+      text += jasmine.pp(this.values[i]);
+    }
+  }
+  return text;
+};
+
+jasmine.ExpectationResult = function(params) {
+  this.type = 'expect';
+  this.matcherName = params.matcherName;
+  this.passed_ = params.passed;
+  this.expected = params.expected;
+  this.actual = params.actual;
+  this.message = this.passed_ ? 'Passed.' : params.message;
+
+  var trace = (params.trace || new Error(this.message));
+  this.trace = this.passed_ ? '' : trace;
+};
+
+jasmine.ExpectationResult.prototype.toString = function () {
+  return this.message;
+};
+
+jasmine.ExpectationResult.prototype.passed = function () {
+  return this.passed_;
+};
+
+/**
+ * Getter for the Jasmine environment. Ensures one gets created
+ */
+jasmine.getEnv = function() {
+  var env = jasmine.currentEnv_ = jasmine.currentEnv_ || new jasmine.Env();
+  return env;
+};
+
+/**
+ * @ignore
+ * @private
+ * @param value
+ * @returns {Boolean}
+ */
+jasmine.isArray_ = function(value) {
+  return jasmine.isA_("Array", value);
+};
+
+/**
+ * @ignore
+ * @private
+ * @param value
+ * @returns {Boolean}
+ */
+jasmine.isString_ = function(value) {
+  return jasmine.isA_("String", value);
+};
+
+/**
+ * @ignore
+ * @private
+ * @param value
+ * @returns {Boolean}
+ */
+jasmine.isNumber_ = function(value) {
+  return jasmine.isA_("Number", value);
+};
+
+/**
+ * @ignore
+ * @private
+ * @param {String} typeName
+ * @param value
+ * @returns {Boolean}
+ */
+jasmine.isA_ = function(typeName, value) {
+  return Object.prototype.toString.apply(value) === '[object ' + typeName + ']';
+};
+
+/**
+ * Pretty printer for expecations.  Takes any object and turns it into a human-readable string.
+ *
+ * @param value {Object} an object to be outputted
+ * @returns {String}
+ */
+jasmine.pp = function(value) {
+  var stringPrettyPrinter = new jasmine.StringPrettyPrinter();
+  stringPrettyPrinter.format(value);
+  return stringPrettyPrinter.string;
+};
+
+/**
+ * Returns true if the object is a DOM Node.
+ *
+ * @param {Object} obj object to check
+ * @returns {Boolean}
+ */
+jasmine.isDomNode = function(obj) {
+  return obj.nodeType > 0;
+};
+
+/**
+ * Returns a matchable 'generic' object of the class type.  For use in expecations of type when values don't matter.
+ *
+ * @example
+ * // don't care about which function is passed in, as long as it's a function
+ * expect(mySpy).toHaveBeenCalledWith(jasmine.any(Function));
+ *
+ * @param {Class} clazz
+ * @returns matchable object of the type clazz
+ */
+jasmine.any = function(clazz) {
+  return new jasmine.Matchers.Any(clazz);
+};
+
+/**
+ * Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks.
+ *
+ * Spies should be created in test setup, before expectations.  They can then be checked, using the standard Jasmine
+ * expectation syntax. Spies can be checked if they were called or not and what the calling params were.
+ *
+ * A Spy has the following fields: wasCalled, callCount, mostRecentCall, and argsForCall (see docs).
+ *
+ * Spies are torn down at the end of every spec.
+ *
+ * Note: Do <b>not</b> call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj.
+ *
+ * @example
+ * // a stub
+ * var myStub = jasmine.createSpy('myStub');  // can be used anywhere
+ *
+ * // spy example
+ * var foo = {
+ *   not: function(bool) { return !bool; }
+ * }
+ *
+ * // actual foo.not will not be called, execution stops
+ * spyOn(foo, 'not');
+
+ // foo.not spied upon, execution will continue to implementation
+ * spyOn(foo, 'not').andCallThrough();
+ *
+ * // fake example
+ * var foo = {
+ *   not: function(bool) { return !bool; }
+ * }
+ *
+ * // foo.not(val) will return val
+ * spyOn(foo, 'not').andCallFake(function(value) {return value;});
+ *
+ * // mock example
+ * foo.not(7 == 7);
+ * expect(foo.not).toHaveBeenCalled();
+ * expect(foo.not).toHaveBeenCalledWith(true);
+ *
+ * @constructor
+ * @see spyOn, jasmine.createSpy, jasmine.createSpyObj
+ * @param {String} name
+ */
+jasmine.Spy = function(name) {
+  /**
+   * The name of the spy, if provided.
+   */
+  this.identity = name || 'unknown';
+  /**
+   *  Is this Object a spy?
+   */
+  this.isSpy = true;
+  /**
+   * The actual function this spy stubs.
+   */
+  this.plan = function() {
+  };
+  /**
+   * Tracking of the most recent call to the spy.
+   * @example
+   * var mySpy = jasmine.createSpy('foo');
+   * mySpy(1, 2);
+   * mySpy.mostRecentCall.args = [1, 2];
+   */
+  this.mostRecentCall = {};
+
+  /**
+   * Holds arguments for each call to the spy, indexed by call count
+   * @example
+   * var mySpy = jasmine.createSpy('foo');
+   * mySpy(1, 2);
+   * mySpy(7, 8);
+   * mySpy.mostRecentCall.args = [7, 8];
+   * mySpy.argsForCall[0] = [1, 2];
+   * mySpy.argsForCall[1] = [7, 8];
+   */
+  this.argsForCall = [];
+  this.calls = [];
+};
+
+/**
+ * Tells a spy to call through to the actual implemenatation.
+ *
+ * @example
+ * var foo = {
+ *   bar: function() { // do some stuff }
+ * }
+ *
+ * // defining a spy on an existing property: foo.bar
+ * spyOn(foo, 'bar').andCallThrough();
+ */
+jasmine.Spy.prototype.andCallThrough = function() {
+  this.plan = this.originalValue;
+  return this;
+};
+
+/**
+ * For setting the return value of a spy.
+ *
+ * @example
+ * // defining a spy from scratch: foo() returns 'baz'
+ * var foo = jasmine.createSpy('spy on foo').andReturn('baz');
+ *
+ * // defining a spy on an existing property: foo.bar() returns 'baz'
+ * spyOn(foo, 'bar').andReturn('baz');
+ *
+ * @param {Object} value
+ */
+jasmine.Spy.prototype.andReturn = function(value) {
+  this.plan = function() {
+    return value;
+  };
+  return this;
+};
+
+/**
+ * For throwing an exception when a spy is called.
+ *
+ * @example
+ * // defining a spy from scratch: foo() throws an exception w/ message 'ouch'
+ * var foo = jasmine.createSpy('spy on foo').andThrow('baz');
+ *
+ * // defining a spy on an existing property: foo.bar() throws an exception w/ message 'ouch'
+ * spyOn(foo, 'bar').andThrow('baz');
+ *
+ * @param {String} exceptionMsg
+ */
+jasmine.Spy.prototype.andThrow = function(exceptionMsg) {
+  this.plan = function() {
+    throw exceptionMsg;
+  };
+  return this;
+};
+
+/**
+ * Calls an alternate implementation when a spy is called.
+ *
+ * @example
+ * var baz = function() {
+ *   // do some stuff, return something
+ * }
+ * // defining a spy from scratch: foo() calls the function baz
+ * var foo = jasmine.createSpy('spy on foo').andCall(baz);
+ *
+ * // defining a spy on an existing property: foo.bar() calls an anonymnous function
+ * spyOn(foo, 'bar').andCall(function() { return 'baz';} );
+ *
+ * @param {Function} fakeFunc
+ */
+jasmine.Spy.prototype.andCallFake = function(fakeFunc) {
+  this.plan = fakeFunc;
+  return this;
+};
+
+/**
+ * Resets all of a spy's the tracking variables so that it can be used again.
+ *
+ * @example
+ * spyOn(foo, 'bar');
+ *
+ * foo.bar();
+ *
+ * expect(foo.bar.callCount).toEqual(1);
+ *
+ * foo.bar.reset();
+ *
+ * expect(foo.bar.callCount).toEqual(0);
+ */
+jasmine.Spy.prototype.reset = function() {
+  this.wasCalled = false;
+  this.callCount = 0;
+  this.argsForCall = [];
+  this.calls = [];
+  this.mostRecentCall = {};
+};
+
+jasmine.createSpy = function(name) {
+
+  var spyObj = function() {
+    spyObj.wasCalled = true;
+    spyObj.callCount++;
+    var args = jasmine.util.argsToArray(arguments);
+    spyObj.mostRecentCall.object = this;
+    spyObj.mostRecentCall.args = args;
+    spyObj.argsForCall.push(args);
+    spyObj.calls.push({object: this, args: args});
+    return spyObj.plan.apply(this, arguments);
+  };
+
+  var spy = new jasmine.Spy(name);
+
+  for (var prop in spy) {
+    spyObj[prop] = spy[prop];
+  }
+
+  spyObj.reset();
+
+  return spyObj;
+};
+
+/**
+ * Determines whether an object is a spy.
+ *
+ * @param {jasmine.Spy|Object} putativeSpy
+ * @returns {Boolean}
+ */
+jasmine.isSpy = function(putativeSpy) {
+  return putativeSpy && putativeSpy.isSpy;
+};
+
+/**
+ * Creates a more complicated spy: an Object that has every property a function that is a spy.  Used for stubbing something
+ * large in one call.
+ *
+ * @param {String} baseName name of spy class
+ * @param {Array} methodNames array of names of methods to make spies
+ */
+jasmine.createSpyObj = function(baseName, methodNames) {
+  if (!jasmine.isArray_(methodNames) || methodNames.length === 0) {
+    throw new Error('createSpyObj requires a non-empty array of method names to create spies for');
+  }
+  var obj = {};
+  for (var i = 0; i < methodNames.length; i++) {
+    obj[methodNames[i]] = jasmine.createSpy(baseName + '.' + methodNames[i]);
+  }
+  return obj;
+};
+
+/**
+ * All parameters are pretty-printed and concatenated together, then written to the current spec's output.
+ *
+ * Be careful not to leave calls to <code>jasmine.log</code> in production code.
+ */
+jasmine.log = function() {
+  var spec = jasmine.getEnv().currentSpec;
+  spec.log.apply(spec, arguments);
+};
+
+/**
+ * Function that installs a spy on an existing object's method name.  Used within a Spec to create a spy.
+ *
+ * @example
+ * // spy example
+ * var foo = {
+ *   not: function(bool) { return !bool; }
+ * }
+ * spyOn(foo, 'not'); // actual foo.not will not be called, execution stops
+ *
+ * @see jasmine.createSpy
+ * @param obj
+ * @param methodName
+ * @returns a Jasmine spy that can be chained with all spy methods
+ */
+var spyOn = function(obj, methodName) {
+  return jasmine.getEnv().currentSpec.spyOn(obj, methodName);
+};
+if (isCommonJS) exports.spyOn = spyOn;
+
+/**
+ * Creates a Jasmine spec that will be added to the current suite.
+ *
+ * // TODO: pending tests
+ *
+ * @example
+ * it('should be true', function() {
+ *   expect(true).toEqual(true);
+ * });
+ *
+ * @param {String} desc description of this specification
+ * @param {Function} func defines the preconditions and expectations of the spec
+ */
+var it = function(desc, func) {
+  return jasmine.getEnv().it(desc, func);
+};
+if (isCommonJS) exports.it = it;
+
+/**
+ * Creates a <em>disabled</em> Jasmine spec.
+ *
+ * A convenience method that allows existing specs to be disabled temporarily during development.
+ *
+ * @param {String} desc description of this specification
+ * @param {Function} func defines the preconditions and expectations of the spec
+ */
+var xit = function(desc, func) {
+  return jasmine.getEnv().xit(desc, func);
+};
+if (isCommonJS) exports.xit = xit;
+
+/**
+ * Starts a chain for a Jasmine expectation.
+ *
+ * It is passed an Object that is the actual value and should chain to one of the many
+ * jasmine.Matchers functions.
+ *
+ * @param {Object} actual Actual value to test against and expected value
+ */
+var expect = function(actual) {
+  return jasmine.getEnv().currentSpec.expect(actual);
+};
+if (isCommonJS) exports.expect = expect;
+
+/**
+ * Defines part of a jasmine spec.  Used in cominbination with waits or waitsFor in asynchrnous specs.
+ *
+ * @param {Function} func Function that defines part of a jasmine spec.
+ */
+var runs = function(func) {
+  jasmine.getEnv().currentSpec.runs(func);
+};
+if (isCommonJS) exports.runs = runs;
+
+/**
+ * Waits a fixed time period before moving to the next block.
+ *
+ * @deprecated Use waitsFor() instead
+ * @param {Number} timeout milliseconds to wait
+ */
+var waits = function(timeout) {
+  jasmine.getEnv().currentSpec.waits(timeout);
+};
+if (isCommonJS) exports.waits = waits;
+
+/**
+ * Waits for the latchFunction to return true before proceeding to the next block.
+ *
+ * @param {Function} latchFunction
+ * @param {String} optional_timeoutMessage
+ * @param {Number} optional_timeout
+ */
+var waitsFor = function(latchFunction, optional_timeoutMessage, optional_timeout) {
+  jasmine.getEnv().currentSpec.waitsFor.apply(jasmine.getEnv().currentSpec, arguments);
+};
+if (isCommonJS) exports.waitsFor = waitsFor;
+
+/**
+ * A function that is called before each spec in a suite.
+ *
+ * Used for spec setup, including validating assumptions.
+ *
+ * @param {Function} beforeEachFunction
+ */
+var beforeEach = function(beforeEachFunction) {
+  jasmine.getEnv().beforeEach(beforeEachFunction);
+};
+if (isCommonJS) exports.beforeEach = beforeEach;
+
+/**
+ * A function that is called after each spec in a suite.
+ *
+ * Used for restoring any state that is hijacked during spec execution.
+ *
+ * @param {Function} afterEachFunction
+ */
+var afterEach = function(afterEachFunction) {
+  jasmine.getEnv().afterEach(afterEachFunction);
+};
+if (isCommonJS) exports.afterEach = afterEach;
+
+/**
+ * Defines a suite of specifications.
+ *
+ * Stores the description and all defined specs in the Jasmine environment as one suite of specs. Variables declared
+ * are accessible by calls to beforeEach, it, and afterEach. Describe blocks can be nested, allowing for specialization
+ * of setup in some tests.
+ *
+ * @example
+ * // TODO: a simple suite
+ *
+ * // TODO: a simple suite with a nested describe block
+ *
+ * @param {String} description A string, usually the class under test.
+ * @param {Function} specDefinitions function that defines several specs.
+ */
+var describe = function(description, specDefinitions) {
+  return jasmine.getEnv().describe(description, specDefinitions);
+};
+if (isCommonJS) exports.describe = describe;
+
+/**
+ * Disables a suite of specifications.  Used to disable some suites in a file, or files, temporarily during development.
+ *
+ * @param {String} description A string, usually the class under test.
+ * @param {Function} specDefinitions function that defines several specs.
+ */
+var xdescribe = function(description, specDefinitions) {
+  return jasmine.getEnv().xdescribe(description, specDefinitions);
+};
+if (isCommonJS) exports.xdescribe = xdescribe;
+
+
+// Provide the XMLHttpRequest class for IE 5.x-6.x:
+jasmine.XmlHttpRequest = (typeof XMLHttpRequest == "undefined") ? function() {
+  function tryIt(f) {
+    try {
+      return f();
+    } catch(e) {
+    }
+    return null;
+  }
+
+  var xhr = tryIt(function() {
+    return new ActiveXObject("Msxml2.XMLHTTP.6.0");
+  }) ||
+    tryIt(function() {
+      return new ActiveXObject("Msxml2.XMLHTTP.3.0");
+    }) ||
+    tryIt(function() {
+      return new ActiveXObject("Msxml2.XMLHTTP");
+    }) ||
+    tryIt(function() {
+      return new ActiveXObject("Microsoft.XMLHTTP");
+    });
+
+  if (!xhr) throw new Error("This browser does not support XMLHttpRequest.");
+
+  return xhr;
+} : XMLHttpRequest;
+/**
+ * @namespace
+ */
+jasmine.util = {};
+
+/**
+ * Declare that a child class inherit it's prototype from the parent class.
+ *
+ * @private
+ * @param {Function} childClass
+ * @param {Function} parentClass
+ */
+jasmine.util.inherit = function(childClass, parentClass) {
+  /**
+   * @private
+   */
+  var subclass = function() {
+  };
+  subclass.prototype = parentClass.prototype;
+  childClass.prototype = new subclass();
+};
+
+jasmine.util.formatException = function(e) {
+  var lineNumber;
+  if (e.line) {
+    lineNumber = e.line;
+  }
+  else if (e.lineNumber) {
+    lineNumber = e.lineNumber;
+  }
+
+  var file;
+
+  if (e.sourceURL) {
+    file = e.sourceURL;
+  }
+  else if (e.fileName) {
+    file = e.fileName;
+  }
+
+  var message = (e.name && e.message) ? (e.name + ': ' + e.message) : e.toString();
+
+  if (file && lineNumber) {
+    message += ' in ' + file + ' (line ' + lineNumber + ')';
+  }
+
+  return message;
+};
+
+jasmine.util.htmlEscape = function(str) {
+  if (!str) return str;
+  return str.replace(/&/g, '&amp;')
+    .replace(/</g, '&lt;')
+    .replace(/>/g, '&gt;');
+};
+
+jasmine.util.argsToArray = function(args) {
+  var arrayOfArgs = [];
+  for (var i = 0; i < args.length; i++) arrayOfArgs.push(args[i]);
+  return arrayOfArgs;
+};
+
+jasmine.util.extend = function(destination, source) {
+  for (var property in source) destination[property] = source[property];
+  return destination;
+};
+
+/**
+ * Environment for Jasmine
+ *
+ * @constructor
+ */
+jasmine.Env = function() {
+  this.currentSpec = null;
+  this.currentSuite = null;
+  this.currentRunner_ = new jasmine.Runner(this);
+
+  this.reporter = new jasmine.MultiReporter();
+
+  this.updateInterval = jasmine.DEFAULT_UPDATE_INTERVAL;
+  this.defaultTimeoutInterval = jasmine.DEFAULT_TIMEOUT_INTERVAL;
+  this.lastUpdate = 0;
+  this.specFilter = function() {
+    return true;
+  };
+
+  this.nextSpecId_ = 0;
+  this.nextSuiteId_ = 0;
+  this.equalityTesters_ = [];
+
+  // wrap matchers
+  this.matchersClass = function() {
+    jasmine.Matchers.apply(this, arguments);
+  };
+  jasmine.util.inherit(this.matchersClass, jasmine.Matchers);
+
+  jasmine.Matchers.wrapInto_(jasmine.Matchers.prototype, this.matchersClass);
+};
+
+
+jasmine.Env.prototype.setTimeout = jasmine.setTimeout;
+jasmine.Env.prototype.clearTimeout = jasmine.clearTimeout;
+jasmine.Env.prototype.setInterval = jasmine.setInterval;
+jasmine.Env.prototype.clearInterval = jasmine.clearInterval;
+
+/**
+ * @returns an object containing jasmine version build info, if set.
+ */
+jasmine.Env.prototype.version = function () {
+  if (jasmine.version_) {
+    return jasmine.version_;
+  } else {
+    throw new Error('Version not set');
+  }
+};
+
+/**
+ * @returns string containing jasmine version build info, if set.
+ */
+jasmine.Env.prototype.versionString = function() {
+  if (!jasmine.version_) {
+    return "version unknown";
+  }
+
+  var version = this.version();
+  var versionString = version.major + "." + version.minor + "." + version.build;
+  if (version.release_candidate) {
+    versionString += ".rc" + version.release_candidate
+  }
+  versionString += " revision " + version.revision;
+  return versionString;
+};
+
+/**
+ * @returns a sequential integer starting at 0
+ */
+jasmine.Env.prototype.nextSpecId = function () {
+  return this.nextSpecId_++;
+};
+
+/**
+ * @returns a sequential integer starting at 0
+ */
+jasmine.Env.prototype.nextSuiteId = function () {
+  return this.nextSuiteId_++;
+};
+
+/**
+ * Register a reporter to receive status updates from Jasmine.
+ * @param {jasmine.Reporter} reporter An object which will receive status updates.
+ */
+jasmine.Env.prototype.addReporter = function(reporter) {
+  this.reporter.addReporter(reporter);
+};
+
+jasmine.Env.prototype.execute = function() {
+  this.currentRunner_.execute();
+};
+
+jasmine.Env.prototype.describe = function(description, specDefinitions) {
+  var suite = new jasmine.Suite(this, description, specDefinitions, this.currentSuite);
+
+  var parentSuite = this.currentSuite;
+  if (parentSuite) {
+    parentSuite.add(suite);
+  } else {
+    this.currentRunner_.add(suite);
+  }
+
+  this.currentSuite = suite;
+
+  var declarationError = null;
+  try {
+    specDefinitions.call(suite);
+  } catch(e) {
+    declarationError = e;
+  }
+
+  if (declarationError) {
+    this.it("encountered a declaration exception", function() {
+      throw declarationError;
+    });
+  }
+
+  this.currentSuite = parentSuite;
+
+  return suite;
+};
+
+jasmine.Env.prototype.beforeEach = function(beforeEachFunction) {
+  if (this.currentSuite) {
+    this.currentSuite.beforeEach(beforeEachFunction);
+  } else {
+    this.currentRunner_.beforeEach(beforeEachFunction);
+  }
+};
+
+jasmine.Env.prototype.currentRunner = function () {
+  return this.currentRunner_;
+};
+
+jasmine.Env.prototype.afterEach = function(afterEachFunction) {
+  if (this.currentSuite) {
+    this.currentSuite.afterEach(afterEachFunction);
+  } else {
+    this.currentRunner_.afterEach(afterEachFunction);
+  }
+
+};
+
+jasmine.Env.prototype.xdescribe = function(desc, specDefinitions) {
+  return {
+    execute: function() {
+    }
+  };
+};
+
+jasmine.Env.prototype.it = function(description, func) {
+  var spec = new jasmine.Spec(this, this.currentSuite, description);
+  this.currentSuite.add(spec);
+  this.currentSpec = spec;
+
+  if (func) {
+    spec.runs(func);
+  }
+
+  return spec;
+};
+
+jasmine.Env.prototype.xit = function(desc, func) {
+  return {
+    id: this.nextSpecId(),
+    runs: function() {
+    }
+  };
+};
+
+jasmine.Env.prototype.compareObjects_ = function(a, b, mismatchKeys, mismatchValues) {
+  if (a.__Jasmine_been_here_before__ === b && b.__Jasmine_been_here_before__ === a) {
+    return true;
+  }
+
+  a.__Jasmine_been_here_before__ = b;
+  b.__Jasmine_been_here_before__ = a;
+
+  var hasKey = function(obj, keyName) {
+    return obj !== null && obj[keyName] !== jasmine.undefined;
+  };
+
+  for (var property in b) {
+    if (!hasKey(a, property) && hasKey(b, property)) {
+      mismatchKeys.push("expected has key '" + property + "', but missing from actual.");
+    }
+  }
+  for (property in a) {
+    if (!hasKey(b, property) && hasKey(a, property)) {
+      mismatchKeys.push("expected missing key '" + property + "', but present in actual.");
+    }
+  }
+  for (property in b) {
+    if (property == '__Jasmine_been_here_before__') continue;
+    if (!this.equals_(a[property], b[property], mismatchKeys, mismatchValues)) {
+      mismatchValues.push("'" + property + "' was '" + (b[property] ? jasmine.util.htmlEscape(b[property].toString()) : b[property]) + "' in expected, but was '" + (a[property] ? jasmine.util.htmlEscape(a[property].toString()) : a[property]) + "' in actual.");
+    }
+  }
+
+  if (jasmine.isArray_(a) && jasmine.isArray_(b) && a.length != b.length) {
+    mismatchValues.push("arrays were not the same length");
+  }
+
+  delete a.__Jasmine_been_here_before__;
+  delete b.__Jasmine_been_here_before__;
+  return (mismatchKeys.length === 0 && mismatchValues.length === 0);
+};
+
+jasmine.Env.prototype.equals_ = function(a, b, mismatchKeys, mismatchValues) {
+  mismatchKeys = mismatchKeys || [];
+  mismatchValues = mismatchValues || [];
+
+  for (var i = 0; i < this.equalityTesters_.length; i++) {
+    var equalityTester = this.equalityTesters_[i];
+    var result = equalityTester(a, b, this, mismatchKeys, mismatchValues);
+    if (result !== jasmine.undefined) return result;
+  }
+
+  if (a === b) return true;
+
+  if (a === jasmine.undefined || a === null || b === jasmine.undefined || b === null) {
+    return (a == jasmine.undefined && b == jasmine.undefined);
+  }
+
+  if (jasmine.isDomNode(a) && jasmine.isDomNode(b)) {
+    return a === b;
+  }
+
+  if (a instanceof Date && b instanceof Date) {
+    return a.getTime() == b.getTime();
+  }
+
+  if (a instanceof jasmine.Matchers.Any) {
+    return a.matches(b);
+  }
+
+  if (b instanceof jasmine.Matchers.Any) {
+    return b.matches(a);
+  }
+
+  if (jasmine.isString_(a) && jasmine.isString_(b)) {
+    return (a == b);
+  }
+
+  if (jasmine.isNumber_(a) && jasmine.isNumber_(b)) {
+    return (a == b);
+  }
+
+  if (typeof a === "object" && typeof b === "object") {
+    return this.compareObjects_(a, b, mismatchKeys, mismatchValues);
+  }
+
+  //Straight check
+  return (a === b);
+};
+
+jasmine.Env.prototype.contains_ = function(haystack, needle) {
+  if (jasmine.isArray_(haystack)) {
+    for (var i = 0; i < haystack.length; i++) {
+      if (this.equals_(haystack[i], needle)) return true;
+    }
+    return false;
+  }
+  return haystack.indexOf(needle) >= 0;
+};
+
+jasmine.Env.prototype.addEqualityTester = function(equalityTester) {
+  this.equalityTesters_.push(equalityTester);
+};
+/** No-op base class for Jasmine reporters.
+ *
+ * @constructor
+ */
+jasmine.Reporter = function() {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.Reporter.prototype.reportRunnerStarting = function(runner) {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.Reporter.prototype.reportRunnerResults = function(runner) {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.Reporter.prototype.reportSuiteResults = function(suite) {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.Reporter.prototype.reportSpecStarting = function(spec) {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.Reporter.prototype.reportSpecResults = function(spec) {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.Reporter.prototype.log = function(str) {
+};
+
+/**
+ * Blocks are functions with executable code that make up a spec.
+ *
+ * @constructor
+ * @param {jasmine.Env} env
+ * @param {Function} func
+ * @param {jasmine.Spec} spec
+ */
+jasmine.Block = function(env, func, spec) {
+  this.env = env;
+  this.func = func;
+  this.spec = spec;
+};
+
+jasmine.Block.prototype.execute = function(onComplete) {  
+  try {
+    this.func.apply(this.spec);
+  } catch (e) {
+    this.spec.fail(e);
+  }
+  onComplete();
+};
+/** JavaScript API reporter.
+ *
+ * @constructor
+ */
+jasmine.JsApiReporter = function() {
+  this.started = false;
+  this.finished = false;
+  this.suites_ = [];
+  this.results_ = {};
+};
+
+jasmine.JsApiReporter.prototype.reportRunnerStarting = function(runner) {
+  this.started = true;
+  var suites = runner.topLevelSuites();
+  for (var i = 0; i < suites.length; i++) {
+    var suite = suites[i];
+    this.suites_.push(this.summarize_(suite));
+  }
+};
+
+jasmine.JsApiReporter.prototype.suites = function() {
+  return this.suites_;
+};
+
+jasmine.JsApiReporter.prototype.summarize_ = function(suiteOrSpec) {
+  var isSuite = suiteOrSpec instanceof jasmine.Suite;
+  var summary = {
+    id: suiteOrSpec.id,
+    name: suiteOrSpec.description,
+    type: isSuite ? 'suite' : 'spec',
+    children: []
+  };
+  
+  if (isSuite) {
+    var children = suiteOrSpec.children();
+    for (var i = 0; i < children.length; i++) {
+      summary.children.push(this.summarize_(children[i]));
+    }
+  }
+  return summary;
+};
+
+jasmine.JsApiReporter.prototype.results = function() {
+  return this.results_;
+};
+
+jasmine.JsApiReporter.prototype.resultsForSpec = function(specId) {
+  return this.results_[specId];
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.JsApiReporter.prototype.reportRunnerResults = function(runner) {
+  this.finished = true;
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.JsApiReporter.prototype.reportSuiteResults = function(suite) {
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.JsApiReporter.prototype.reportSpecResults = function(spec) {
+  this.results_[spec.id] = {
+    messages: spec.results().getItems(),
+    result: spec.results().failedCount > 0 ? "failed" : "passed"
+  };
+};
+
+//noinspection JSUnusedLocalSymbols
+jasmine.JsApiReporter.prototype.log = function(str) {
+};
+
+jasmine.JsApiReporter.prototype.resultsForSpecs = function(specIds){
+  var results = {};
+  for (var i = 0; i < specIds.length; i++) {
+    var specId = specIds[i];
+    results[specId] = this.summarizeResult_(this.results_[specId]);
+  }
+  return results;
+};
+
+jasmine.JsApiReporter.prototype.summarizeResult_ = function(result){
+  var summaryMessages = [];
+  var messagesLength = result.messages.length;
+  for (var messageIndex = 0; messageIndex < messagesLength; messageIndex++) {
+    var resultMessage = result.messages[messageIndex];
+    summaryMessages.push({
+      text: resultMessage.type == 'log' ? resultMessage.toString() : jasmine.undefined,
+      passed: resultMessage.passed ? resultMessage.passed() : true,
+      type: resultMessage.type,
+      message: resultMessage.message,
+      trace: {
+        stack: resultMessage.passed && !resultMessage.passed() ? resultMessage.trace.stack : jasmine.undefined
+      }
+    });
+  }
+
+  return {
+    result : result.result,
+    messages : summaryMessages
+  };
+};
+
+/**
+ * @constructor
+ * @param {jasmine.Env} env
+ * @param actual
+ * @param {jasmine.Spec} spec
+ */
+jasmine.Matchers = function(env, actual, spec, opt_isNot) {
+  this.env = env;
+  this.actual = actual;
+  this.spec = spec;
+  this.isNot = opt_isNot || false;
+  this.reportWasCalled_ = false;
+};
+
+// todo: @deprecated as of Jasmine 0.11, remove soon [xw]
+jasmine.Matchers.pp = function(str) {
+  throw new Error("jasmine.Matchers.pp() is no longer supported, please use jasmine.pp() instead!");
+};
+
+// todo: @deprecated Deprecated as of Jasmine 0.10. Rewrite your custom matchers to return true or false. [xw]
+jasmine.Matchers.prototype.report = function(result, failing_message, details) {
+  throw new Error("As of jasmine 0.11, custom matchers must be implemented differently -- please see jasmine docs");
+};
+
+jasmine.Matchers.wrapInto_ = function(prototype, matchersClass) {
+  for (var methodName in prototype) {
+    if (methodName == 'report') continue;
+    var orig = prototype[methodName];
+    matchersClass.prototype[methodName] = jasmine.Matchers.matcherFn_(methodName, orig);
+  }
+};
+
+jasmine.Matchers.matcherFn_ = function(matcherName, matcherFunction) {
+  return function() {
+    var matcherArgs = jasmine.util.argsToArray(arguments);
+    var result = matcherFunction.apply(this, arguments);
+
+    if (this.isNot) {
+      result = !result;
+    }
+
+    if (this.reportWasCalled_) return result;
+
+    var message;
+    if (!result) {
+      if (this.message) {
+        message = this.message.apply(this, arguments);
+        if (jasmine.isArray_(message)) {
+          message = message[this.isNot ? 1 : 0];
+        }
+      } else {
+        var englishyPredicate = matcherName.replace(/[A-Z]/g, function(s) { return ' ' + s.toLowerCase(); });
+        message = "Expected " + jasmine.pp(this.actual) + (this.isNot ? " not " : " ") + englishyPredicate;
+        if (matcherArgs.length > 0) {
+          for (var i = 0; i < matcherArgs.length; i++) {
+            if (i > 0) message += ",";
+            message += " " + jasmine.pp(matcherArgs[i]);
+          }
+        }
+        message += ".";
+      }
+    }
+    var expectationResult = new jasmine.ExpectationResult({
+      matcherName: matcherName,
+      passed: result,
+      expected: matcherArgs.length > 1 ? matcherArgs : matcherArgs[0],
+      actual: this.actual,
+      message: message
+    });
+    this.spec.addMatcherResult(expectationResult);
+    return jasmine.undefined;
+  };
+};
+
+
+
+
+/**
+ * toBe: compares the actual to the expected using ===
+ * @param expected
+ */
+jasmine.Matchers.prototype.toBe = function(expected) {
+  return this.actual === expected;
+};
+
+/**
+ * toNotBe: compares the actual to the expected using !==
+ * @param expected
+ * @deprecated as of 1.0. Use not.toBe() instead.
+ */
+jasmine.Matchers.prototype.toNotBe = function(expected) {
+  return this.actual !== expected;
+};
+
+/**
+ * toEqual: compares the actual to the expected using common sense equality. Handles Objects, Arrays, etc.
+ *
+ * @param expected
+ */
+jasmine.Matchers.prototype.toEqual = function(expected) {
+  return this.env.equals_(this.actual, expected);
+};
+
+/**
+ * toNotEqual: compares the actual to the expected using the ! of jasmine.Matchers.toEqual
+ * @param expected
+ * @deprecated as of 1.0. Use not.toNotEqual() instead.
+ */
+jasmine.Matchers.prototype.toNotEqual = function(expected) {
+  return !this.env.equals_(this.actual, expected);
+};
+
+/**
+ * Matcher that compares the actual to the expected using a regular expression.  Constructs a RegExp, so takes
+ * a pattern or a String.
+ *
+ * @param expected
+ */
+jasmine.Matchers.prototype.toMatch = function(expected) {
+  return new RegExp(expected).test(this.actual);
+};
+
+/**
+ * Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch
+ * @param expected
+ * @deprecated as of 1.0. Use not.toMatch() instead.
+ */
+jasmine.Matchers.prototype.toNotMatch = function(expected) {
+  return !(new RegExp(expected).test(this.actual));
+};
+
+/**
+ * Matcher that compares the actual to jasmine.undefined.
+ */
+jasmine.Matchers.prototype.toBeDefined = function() {
+  return (this.actual !== jasmine.undefined);
+};
+
+/**
+ * Matcher that compares the actual to jasmine.undefined.
+ */
+jasmine.Matchers.prototype.toBeUndefined = function() {
+  return (this.actual === jasmine.undefined);
+};
+
+/**
+ * Matcher that compares the actual to null.
+ */
+jasmine.Matchers.prototype.toBeNull = function() {
+  return (this.actual === null);
+};
+
+/**
+ * Matcher that boolean not-nots the actual.
+ */
+jasmine.Matchers.prototype.toBeTruthy = function() {
+  return !!this.actual;
+};
+
+
+/**
+ * Matcher that boolean nots the actual.
+ */
+jasmine.Matchers.prototype.toBeFalsy = function() {
+  return !this.actual;
+};
+
+
+/**
+ * Matcher that checks to see if the actual, a Jasmine spy, was called.
+ */
+jasmine.Matchers.prototype.toHaveBeenCalled = function() {
+  if (arguments.length > 0) {
+    throw new Error('toHaveBeenCalled does not take arguments, use toHaveBeenCalledWith');
+  }
+
+  if (!jasmine.isSpy(this.actual)) {
+    throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
+  }
+
+  this.message = function() {
+    return [
+      "Expected spy " + this.actual.identity + " to have been called.",
+      "Expected spy " + this.actual.identity + " not to have been called."
+    ];
+  };
+
+  return this.actual.wasCalled;
+};
+
+/** @deprecated Use expect(xxx).toHaveBeenCalled() instead */
+jasmine.Matchers.prototype.wasCalled = jasmine.Matchers.prototype.toHaveBeenCalled;
+
+/**
+ * Matcher that checks to see if the actual, a Jasmine spy, was not called.
+ *
+ * @deprecated Use expect(xxx).not.toHaveBeenCalled() instead
+ */
+jasmine.Matchers.prototype.wasNotCalled = function() {
+  if (arguments.length > 0) {
+    throw new Error('wasNotCalled does not take arguments');
+  }
+
+  if (!jasmine.isSpy(this.actual)) {
+    throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
+  }
+
+  this.message = function() {
+    return [
+      "Expected spy " + this.actual.identity + " to not have been called.",
+      "Expected spy " + this.actual.identity + " to have been called."
+    ];
+  };
+
+  return !this.actual.wasCalled;
+};
+
+/**
+ * Matcher that checks to see if the actual, a Jasmine spy, was called with a set of parameters.
+ *
+ * @example
+ *
+ */
+jasmine.Matchers.prototype.toHaveBeenCalledWith = function() {
+  var expectedArgs = jasmine.util.argsToArray(arguments);
+  if (!jasmine.isSpy(this.actual)) {
+    throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
+  }
+  this.message = function() {
+    if (this.actual.callCount === 0) {
+      // todo: what should the failure message for .not.toHaveBeenCalledWith() be? is this right? test better. [xw]
+      return [
+        "Expected spy " + this.actual.identity + " to have been called with " + jasmine.pp(expectedArgs) + " but it was never called.",
+        "Expected spy " + this.actual.identity + " not to have been called with " + jasmine.pp(expectedArgs) + " but it was."
+      ];
+    } else {
+      return [
+        "Expected spy " + this.actual.identity + " to have been called with " + jasmine.pp(expectedArgs) + " but was called with " + jasmine.pp(this.actual.argsForCall),
+        "Expected spy " + this.actual.identity + " not to have been called with " + jasmine.pp(expectedArgs) + " but was called with " + jasmine.pp(this.actual.argsForCall)
+      ];
+    }
+  };
+
+  return this.env.contains_(this.actual.argsForCall, expectedArgs);
+};
+
+/** @deprecated Use expect(xxx).toHaveBeenCalledWith() instead */
+jasmine.Matchers.prototype.wasCalledWith = jasmine.Matchers.prototype.toHaveBeenCalledWith;
+
+/** @deprecated Use expect(xxx).not.toHaveBeenCalledWith() instead */
+jasmine.Matchers.prototype.wasNotCalledWith = function() {
+  var expectedArgs = jasmine.util.argsToArray(arguments);
+  if (!jasmine.isSpy(this.actual)) {
+    throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.');
+  }
+
+  this.message = function() {
+    return [
+      "Expected spy not to have been called with " + jasmine.pp(expectedArgs) + " but it was",
+      "Expected spy to have been called with " + jasmine.pp(expectedArgs) + " but it was"
+    ];
+  };
+
+  return !this.env.contains_(this.actual.argsForCall, expectedArgs);
+};
+
+/**
+ * Matcher that checks that the expected item is an element in the actual Array.
+ *
+ * @param {Object} expected
+ */
+jasmine.Matchers.prototype.toContain = function(expected) {
+  return this.env.contains_(this.actual, expected);
+};
+
+/**
+ * Matcher that checks that the expected item is NOT an element in the actual Array.
+ *
+ * @param {Object} expected
+ * @deprecated as of 1.0. Use not.toNotContain() instead.
+ */
+jasmine.Matchers.prototype.toNotContain = function(expected) {
+  return !this.env.contains_(this.actual, expected);
+};
+
+jasmine.Matchers.prototype.toBeLessThan = function(expected) {
+  return this.actual < expected;
+};
+
+jasmine.Matchers.prototype.toBeGreaterThan = function(expected) {
+  return this.actual > expected;
+};
+
+/**
+ * Matcher that checks that the expected item is equal to the actual item
+ * up to a given level of decimal precision (default 2).
+ *
+ * @param {Number} expected
+ * @param {Number} precision
+ */
+jasmine.Matchers.prototype.toBeCloseTo = function(expected, precision) {
+  if (!(precision === 0)) {
+    precision = precision || 2;
+  }
+  var multiplier = Math.pow(10, precision);
+  var actual = Math.round(this.actual * multiplier);
+  expected = Math.round(expected * multiplier);
+  return expected == actual;
+};
+
+/**
+ * Matcher that checks that the expected exception was thrown by the actual.
+ *
+ * @param {String} expected
+ */
+jasmine.Matchers.prototype.toThrow = function(expected) {
+  var result = false;
+  var exception;
+  if (typeof this.actual != 'function') {
+    throw new Error('Actual is not a function');
+  }
+  try {
+    this.actual();
+  } catch (e) {
+    exception = e;
+  }
+  if (exception) {
+    result = (expected === jasmine.undefined || this.env.equals_(exception.message || exception, expected.message || expected));
+  }
+
+  var not = this.isNot ? "not " : "";
+
+  this.message = function() {
+    if (exception && (expected === jasmine.undefined || !this.env.equals_(exception.message || exception, expected.message || expected))) {
+      return ["Expected function " + not + "to throw", expected ? expected.message || expected : "an exception", ", but it threw", exception.message || exception].join(' ');
+    } else {
+      return "Expected function to throw an exception.";
+    }
+  };
+
+  return result;
+};
+
+jasmine.Matchers.Any = function(expectedClass) {
+  this.expectedClass = expectedClass;
+};
+
+jasmine.Matchers.Any.prototype.matches = function(other) {
+  if (this.expectedClass == String) {
+    return typeof other == 'string' || other instanceof String;
+  }
+
+  if (this.expectedClass == Number) {
+    return typeof other == 'number' || other instanceof Number;
+  }
+
+  if (this.expectedClass == Function) {
+    return typeof other == 'function' || other instanceof Function;
+  }
+
+  if (this.expectedClass == Object) {
+    return typeof other == 'object';
+  }
+
+  return other instanceof this.expectedClass;
+};
+
+jasmine.Matchers.Any.prototype.toString = function() {
+  return '<jasmine.any(' + this.expectedClass + ')>';
+};
+
+/**
+ * @constructor
+ */
+jasmine.MultiReporter = function() {
+  this.subReporters_ = [];
+};
+jasmine.util.inherit(jasmine.MultiReporter, jasmine.Reporter);
+
+jasmine.MultiReporter.prototype.addReporter = function(reporter) {
+  this.subReporters_.push(reporter);
+};
+
+(function() {
+  var functionNames = [
+    "reportRunnerStarting",
+    "reportRunnerResults",
+    "reportSuiteResults",
+    "reportSpecStarting",
+    "reportSpecResults",
+    "log"
+  ];
+  for (var i = 0; i < functionNames.length; i++) {
+    var functionName = functionNames[i];
+    jasmine.MultiReporter.prototype[functionName] = (function(functionName) {
+      return function() {
+        for (var j = 0; j < this.subReporters_.length; j++) {
+          var subReporter = this.subReporters_[j];
+          if (subReporter[functionName]) {
+            subReporter[functionName].apply(subReporter, arguments);
+          }
+        }
+      };
+    })(functionName);
+  }
+})();
+/**
+ * Holds results for a set of Jasmine spec. Allows for the results array to hold another jasmine.NestedResults
+ *
+ * @constructor
+ */
+jasmine.NestedResults = function() {
+  /**
+   * The total count of results
+   */
+  this.totalCount = 0;
+  /**
+   * Number of passed results
+   */
+  this.passedCount = 0;
+  /**
+   * Number of failed results
+   */
+  this.failedCount = 0;
+  /**
+   * Was this suite/spec skipped?
+   */
+  this.skipped = false;
+  /**
+   * @ignore
+   */
+  this.items_ = [];
+};
+
+/**
+ * Roll up the result counts.
+ *
+ * @param result
+ */
+jasmine.NestedResults.prototype.rollupCounts = function(result) {
+  this.totalCount += result.totalCount;
+  this.passedCount += result.passedCount;
+  this.failedCount += result.failedCount;
+};
+
+/**
+ * Adds a log message.
+ * @param values Array of message parts which will be concatenated later.
+ */
+jasmine.NestedResults.prototype.log = function(values) {
+  this.items_.push(new jasmine.MessageResult(values));
+};
+
+/**
+ * Getter for the results: message & results.
+ */
+jasmine.NestedResults.prototype.getItems = function() {
+  return this.items_;
+};
+
+/**
+ * Adds a result, tracking counts (total, passed, & failed)
+ * @param {jasmine.ExpectationResult|jasmine.NestedResults} result
+ */
+jasmine.NestedResults.prototype.addResult = function(result) {
+  if (result.type != 'log') {
+    if (result.items_) {
+      this.rollupCounts(result);
+    } else {
+      this.totalCount++;
+      if (result.passed()) {
+        this.passedCount++;
+      } else {
+        this.failedCount++;
+      }
+    }
+  }
+  this.items_.push(result);
+};
+
+/**
+ * @returns {Boolean} True if <b>everything</b> below passed
+ */
+jasmine.NestedResults.prototype.passed = function() {
+  return this.passedCount === this.totalCount;
+};
+/**
+ * Base class for pretty printing for expectation results.
+ */
+jasmine.PrettyPrinter = function() {
+  this.ppNestLevel_ = 0;
+};
+
+/**
+ * Formats a value in a nice, human-readable string.
+ *
+ * @param value
+ */
+jasmine.PrettyPrinter.prototype.format = function(value) {
+  if (this.ppNestLevel_ > 40) {
+    throw new Error('jasmine.PrettyPrinter: format() nested too deeply!');
+  }
+
+  this.ppNestLevel_++;
+  try {
+    if (value === jasmine.undefined) {
+      this.emitScalar('undefined');
+    } else if (value === null) {
+      this.emitScalar('null');
+    } else if (value === jasmine.getGlobal()) {
+      this.emitScalar('<global>');
+    } else if (value instanceof jasmine.Matchers.Any) {
+      this.emitScalar(value.toString());
+    } else if (typeof value === 'string') {
+      this.emitString(value);
+    } else if (jasmine.isSpy(value)) {
+      this.emitScalar("spy on " + value.identity);
+    } else if (value instanceof RegExp) {
+      this.emitScalar(value.toString());
+    } else if (typeof value === 'function') {
+      this.emitScalar('Function');
+    } else if (typeof value.nodeType === 'number') {
+      this.emitScalar('HTMLNode');
+    } else if (value instanceof Date) {
+      this.emitScalar('Date(' + value + ')');
+    } else if (value.__Jasmine_been_here_before__) {
+      this.emitScalar('<circular reference: ' + (jasmine.isArray_(value) ? 'Array' : 'Object') + '>');
+    } else if (jasmine.isArray_(value) || typeof value == 'object') {
+      value.__Jasmine_been_here_before__ = true;
+      if (jasmine.isArray_(value)) {
+        this.emitArray(value);
+      } else {
+        this.emitObject(value);
+      }
+      delete value.__Jasmine_been_here_before__;
+    } else {
+      this.emitScalar(value.toString());
+    }
+  } finally {
+    this.ppNestLevel_--;
+  }
+};
+
+jasmine.PrettyPrinter.prototype.iterateObject = function(obj, fn) {
+  for (var property in obj) {
+    if (property == '__Jasmine_been_here_before__') continue;
+    fn(property, obj.__lookupGetter__ ? (obj.__lookupGetter__(property) !== jasmine.undefined && 
+                                         obj.__lookupGetter__(property) !== null) : false);
+  }
+};
+
+jasmine.PrettyPrinter.prototype.emitArray = jasmine.unimplementedMethod_;
+jasmine.PrettyPrinter.prototype.emitObject = jasmine.unimplementedMethod_;
+jasmine.PrettyPrinter.prototype.emitScalar = jasmine.unimplementedMethod_;
+jasmine.PrettyPrinter.prototype.emitString = jasmine.unimplementedMethod_;
+
+jasmine.StringPrettyPrinter = function() {
+  jasmine.PrettyPrinter.call(this);
+
+  this.string = '';
+};
+jasmine.util.inherit(jasmine.StringPrettyPrinter, jasmine.PrettyPrinter);
+
+jasmine.StringPrettyPrinter.prototype.emitScalar = function(value) {
+  this.append(value);
+};
+
+jasmine.StringPrettyPrinter.prototype.emitString = function(value) {
+  this.append("'" + value + "'");
+};
+
+jasmine.StringPrettyPrinter.prototype.emitArray = function(array) {
+  this.append('[ ');
+  for (var i = 0; i < array.length; i++) {
+    if (i > 0) {
+      this.append(', ');
+    }
+    this.format(array[i]);
+  }
+  this.append(' ]');
+};
+
+jasmine.StringPrettyPrinter.prototype.emitObject = function(obj) {
+  var self = this;
+  this.append('{ ');
+  var first = true;
+
+  this.iterateObject(obj, function(property, isGetter) {
+    if (first) {
+      first = false;
+    } else {
+      self.append(', ');
+    }
+
+    self.append(property);
+    self.append(' : ');
+    if (isGetter) {
+      self.append('<getter>');
+    } else {
+      self.format(obj[property]);
+    }
+  });
+
+  this.append(' }');
+};
+
+jasmine.StringPrettyPrinter.prototype.append = function(value) {
+  this.string += value;
+};
+jasmine.Queue = function(env) {
+  this.env = env;
+  this.blocks = [];
+  this.running = false;
+  this.index = 0;
+  this.offset = 0;
+  this.abort = false;
+};
+
+jasmine.Queue.prototype.addBefore = function(block) {
+  this.blocks.unshift(block);
+};
+
+jasmine.Queue.prototype.add = function(block) {
+  this.blocks.push(block);
+};
+
+jasmine.Queue.prototype.insertNext = function(block) {
+  this.blocks.splice((this.index + this.offset + 1), 0, block);
+  this.offset++;
+};
+
+jasmine.Queue.prototype.start = function(onComplete) {
+  this.running = true;
+  this.onComplete = onComplete;
+  this.next_();
+};
+
+jasmine.Queue.prototype.isRunning = function() {
+  return this.running;
+};
+
+jasmine.Queue.LOOP_DONT_RECURSE = true;
+
+jasmine.Queue.prototype.next_ = function() {
+  var self = this;
+  var goAgain = true;
+
+  while (goAgain) {
+    goAgain = false;
+    
+    if (self.index < self.blocks.length && !this.abort) {
+      var calledSynchronously = true;
+      var completedSynchronously = false;
+
+      var onComplete = function () {
+        if (jasmine.Queue.LOOP_DONT_RECURSE && calledSynchronously) {
+          completedSynchronously = true;
+          return;
+        }
+
+        if (self.blocks[self.index].abort) {
+          self.abort = true;
+        }
+
+        self.offset = 0;
+        self.index++;
+
+        var now = new Date().getTime();
+        if (self.env.updateInterval && now - self.env.lastUpdate > self.env.updateInterval) {
+          self.env.lastUpdate = now;
+          self.env.setTimeout(function() {
+            self.next_();
+          }, 0);
+        } else {
+          if (jasmine.Queue.LOOP_DONT_RECURSE && completedSynchronously) {
+            goAgain = true;
+          } else {
+            self.next_();
+          }
+        }
+      };
+      self.blocks[self.index].execute(onComplete);
+
+      calledSynchronously = false;
+      if (completedSynchronously) {
+        onComplete();
+      }
+      
+    } else {
+      self.running = false;
+      if (self.onComplete) {
+        self.onComplete();
+      }
+    }
+  }
+};
+
+jasmine.Queue.prototype.results = function() {
+  var results = new jasmine.NestedResults();
+  for (var i = 0; i < this.blocks.length; i++) {
+    if (this.blocks[i].results) {
+      results.addResult(this.blocks[i].results());
+    }
+  }
+  return results;
+};
+
+
+/**
+ * Runner
+ *
+ * @constructor
+ * @param {jasmine.Env} env
+ */
+jasmine.Runner = function(env) {
+  var self = this;
+  self.env = env;
+  self.queue = new jasmine.Queue(env);
+  self.before_ = [];
+  self.after_ = [];
+  self.suites_ = [];
+};
+
+jasmine.Runner.prototype.execute = function() {
+  var self = this;
+  if (self.env.reporter.reportRunnerStarting) {
+    self.env.reporter.reportRunnerStarting(this);
+  }
+  self.queue.start(function () {
+    self.finishCallback();
+  });
+};
+
+jasmine.Runner.prototype.beforeEach = function(beforeEachFunction) {
+  beforeEachFunction.typeName = 'beforeEach';
+  this.before_.splice(0,0,beforeEachFunction);
+};
+
+jasmine.Runner.prototype.afterEach = function(afterEachFunction) {
+  afterEachFunction.typeName = 'afterEach';
+  this.after_.splice(0,0,afterEachFunction);
+};
+
+
+jasmine.Runner.prototype.finishCallback = function() {
+  this.env.reporter.reportRunnerResults(this);
+};
+
+jasmine.Runner.prototype.addSuite = function(suite) {
+  this.suites_.push(suite);
+};
+
+jasmine.Runner.prototype.add = function(block) {
+  if (block instanceof jasmine.Suite) {
+    this.addSuite(block);
+  }
+  this.queue.add(block);
+};
+
+jasmine.Runner.prototype.specs = function () {
+  var suites = this.suites();
+  var specs = [];
+  for (var i = 0; i < suites.length; i++) {
+    specs = specs.concat(suites[i].specs());
+  }
+  return specs;
+};
+
+jasmine.Runner.prototype.suites = function() {
+  return this.suites_;
+};
+
+jasmine.Runner.prototype.topLevelSuites = function() {
+  var topLevelSuites = [];
+  for (var i = 0; i < this.suites_.length; i++) {
+    if (!this.suites_[i].parentSuite) {
+      topLevelSuites.push(this.suites_[i]);
+    }
+  }
+  return topLevelSuites;
+};
+
+jasmine.Runner.prototype.results = function() {
+  return this.queue.results();
+};
+/**
+ * Internal representation of a Jasmine specification, or test.
+ *
+ * @constructor
+ * @param {jasmine.Env} env
+ * @param {jasmine.Suite} suite
+ * @param {String} description
+ */
+jasmine.Spec = function(env, suite, description) {
+  if (!env) {
+    throw new Error('jasmine.Env() required');
+  }
+  if (!suite) {
+    throw new Error('jasmine.Suite() required');
+  }
+  var spec = this;
+  spec.id = env.nextSpecId ? env.nextSpecId() : null;
+  spec.env = env;
+  spec.suite = suite;
+  spec.description = description;
+  spec.queue = new jasmine.Queue(env);
+
+  spec.afterCallbacks = [];
+  spec.spies_ = [];
+
+  spec.results_ = new jasmine.NestedResults();
+  spec.results_.description = description;
+  spec.matchersClass = null;
+};
+
+jasmine.Spec.prototype.getFullName = function() {
+  return this.suite.getFullName() + ' ' + this.description + '.';
+};
+
+
+jasmine.Spec.prototype.results = function() {
+  return this.results_;
+};
+
+/**
+ * All parameters are pretty-printed and concatenated together, then written to the spec's output.
+ *
+ * Be careful not to leave calls to <code>jasmine.log</code> in production code.
+ */
+jasmine.Spec.prototype.log = function() {
+  return this.results_.log(arguments);
+};
+
+jasmine.Spec.prototype.runs = function (func) {
+  var block = new jasmine.Block(this.env, func, this);
+  this.addToQueue(block);
+  return this;
+};
+
+jasmine.Spec.prototype.addToQueue = function (block) {
+  if (this.queue.isRunning()) {
+    this.queue.insertNext(block);
+  } else {
+    this.queue.add(block);
+  }
+};
+
+/**
+ * @param {jasmine.ExpectationResult} result
+ */
+jasmine.Spec.prototype.addMatcherResult = function(result) {
+  this.results_.addResult(result);
+};
+
+jasmine.Spec.prototype.expect = function(actual) {
+  var positive = new (this.getMatchersClass_())(this.env, actual, this);
+  positive.not = new (this.getMatchersClass_())(this.env, actual, this, true);
+  return positive;
+};
+
+/**
+ * Waits a fixed time period before moving to the next block.
+ *
+ * @deprecated Use waitsFor() instead
+ * @param {Number} timeout milliseconds to wait
+ */
+jasmine.Spec.prototype.waits = function(timeout) {
+  var waitsFunc = new jasmine.WaitsBlock(this.env, timeout, this);
+  this.addToQueue(waitsFunc);
+  return this;
+};
+
+/**
+ * Waits for the latchFunction to return true before proceeding to the next block.
+ *
+ * @param {Function} latchFunction
+ * @param {String} optional_timeoutMessage
+ * @param {Number} optional_timeout
+ */
+jasmine.Spec.prototype.waitsFor = function(latchFunction, optional_timeoutMessage, optional_timeout) {
+  var latchFunction_ = null;
+  var optional_timeoutMessage_ = null;
+  var optional_timeout_ = null;
+
+  for (var i = 0; i < arguments.length; i++) {
+    var arg = arguments[i];
+    switch (typeof arg) {
+      case 'function':
+        latchFunction_ = arg;
+        break;
+      case 'string':
+        optional_timeoutMessage_ = arg;
+        break;
+      case 'number':
+        optional_timeout_ = arg;
+        break;
+    }
+  }
+
+  var waitsForFunc = new jasmine.WaitsForBlock(this.env, optional_timeout_, latchFunction_, optional_timeoutMessage_, this);
+  this.addToQueue(waitsForFunc);
+  return this;
+};
+
+jasmine.Spec.prototype.fail = function (e) {
+  var expectationResult = new jasmine.ExpectationResult({
+    passed: false,
+    message: e ? jasmine.util.formatException(e) : 'Exception',
+    trace: { stack: e.stack }
+  });
+  this.results_.addResult(expectationResult);
+};
+
+jasmine.Spec.prototype.getMatchersClass_ = function() {
+  return this.matchersClass || this.env.matchersClass;
+};
+
+jasmine.Spec.prototype.addMatchers = function(matchersPrototype) {
+  var parent = this.getMatchersClass_();
+  var newMatchersClass = function() {
+    parent.apply(this, arguments);
+  };
+  jasmine.util.inherit(newMatchersClass, parent);
+  jasmine.Matchers.wrapInto_(matchersPrototype, newMatchersClass);
+  this.matchersClass = newMatchersClass;
+};
+
+jasmine.Spec.prototype.finishCallback = function() {
+  this.env.reporter.reportSpecResults(this);
+};
+
+jasmine.Spec.prototype.finish = function(onComplete) {
+  this.removeAllSpies();
+  this.finishCallback();
+  if (onComplete) {
+    onComplete();
+  }
+};
+
+jasmine.Spec.prototype.after = function(doAfter) {
+  if (this.queue.isRunning()) {
+    this.queue.add(new jasmine.Block(this.env, doAfter, this));
+  } else {
+    this.afterCallbacks.unshift(doAfter);
+  }
+};
+
+jasmine.Spec.prototype.execute = function(onComplete) {
+  var spec = this;
+  if (!spec.env.specFilter(spec)) {
+    spec.results_.skipped = true;
+    spec.finish(onComplete);
+    return;
+  }
+
+  this.env.reporter.reportSpecStarting(this);
+
+  spec.env.currentSpec = spec;
+
+  spec.addBeforesAndAftersToQueue();
+
+  spec.queue.start(function () {
+    spec.finish(onComplete);
+  });
+};
+
+jasmine.Spec.prototype.addBeforesAndAftersToQueue = function() {
+  var runner = this.env.currentRunner();
+  var i;
+
+  for (var suite = this.suite; suite; suite = suite.parentSuite) {
+    for (i = 0; i < suite.before_.length; i++) {
+      this.queue.addBefore(new jasmine.Block(this.env, suite.before_[i], this));
+    }
+  }
+  for (i = 0; i < runner.before_.length; i++) {
+    this.queue.addBefore(new jasmine.Block(this.env, runner.before_[i], this));
+  }
+  for (i = 0; i < this.afterCallbacks.length; i++) {
+    this.queue.add(new jasmine.Block(this.env, this.afterCallbacks[i], this));
+  }
+  for (suite = this.suite; suite; suite = suite.parentSuite) {
+    for (i = 0; i < suite.after_.length; i++) {
+      this.queue.add(new jasmine.Block(this.env, suite.after_[i], this));
+    }
+  }
+  for (i = 0; i < runner.after_.length; i++) {
+    this.queue.add(new jasmine.Block(this.env, runner.after_[i], this));
+  }
+};
+
+jasmine.Spec.prototype.explodes = function() {
+  throw 'explodes function should not have been called';
+};
+
+jasmine.Spec.prototype.spyOn = function(obj, methodName, ignoreMethodDoesntExist) {
+  if (obj == jasmine.undefined) {
+    throw "spyOn could not find an object to spy upon for " + methodName + "()";
+  }
+
+  if (!ignoreMethodDoesntExist && obj[methodName] === jasmine.undefined) {
+    throw methodName + '() method does not exist';
+  }
+
+  if (!ignoreMethodDoesntExist && obj[methodName] && obj[methodName].isSpy) {
+    throw new Error(methodName + ' has already been spied upon');
+  }
+
+  var spyObj = jasmine.createSpy(methodName);
+
+  this.spies_.push(spyObj);
+  spyObj.baseObj = obj;
+  spyObj.methodName = methodName;
+  spyObj.originalValue = obj[methodName];
+
+  obj[methodName] = spyObj;
+
+  return spyObj;
+};
+
+jasmine.Spec.prototype.removeAllSpies = function() {
+  for (var i = 0; i < this.spies_.length; i++) {
+    var spy = this.spies_[i];
+    spy.baseObj[spy.methodName] = spy.originalValue;
+  }
+  this.spies_ = [];
+};
+
+/**
+ * Internal representation of a Jasmine suite.
+ *
+ * @constructor
+ * @param {jasmine.Env} env
+ * @param {String} description
+ * @param {Function} specDefinitions
+ * @param {jasmine.Suite} parentSuite
+ */
+jasmine.Suite = function(env, description, specDefinitions, parentSuite) {
+  var self = this;
+  self.id = env.nextSuiteId ? env.nextSuiteId() : null;
+  self.description = description;
+  self.queue = new jasmine.Queue(env);
+  self.parentSuite = parentSuite;
+  self.env = env;
+  self.before_ = [];
+  self.after_ = [];
+  self.children_ = [];
+  self.suites_ = [];
+  self.specs_ = [];
+};
+
+jasmine.Suite.prototype.getFullName = function() {
+  var fullName = this.description;
+  for (var parentSuite = this.parentSuite; parentSuite; parentSuite = parentSuite.parentSuite) {
+    fullName = parentSuite.description + ' ' + fullName;
+  }
+  return fullName;
+};
+
+jasmine.Suite.prototype.finish = function(onComplete) {
+  this.env.reporter.reportSuiteResults(this);
+  this.finished = true;
+  if (typeof(onComplete) == 'function') {
+    onComplete();
+  }
+};
+
+jasmine.Suite.prototype.beforeEach = function(beforeEachFunction) {
+  beforeEachFunction.typeName = 'beforeEach';
+  this.before_.unshift(beforeEachFunction);
+};
+
+jasmine.Suite.prototype.afterEach = function(afterEachFunction) {
+  afterEachFunction.typeName = 'afterEach';
+  this.after_.unshift(afterEachFunction);
+};
+
+jasmine.Suite.prototype.results = function() {
+  return this.queue.results();
+};
+
+jasmine.Suite.prototype.add = function(suiteOrSpec) {
+  this.children_.push(suiteOrSpec);
+  if (suiteOrSpec instanceof jasmine.Suite) {
+    this.suites_.push(suiteOrSpec);
+    this.env.currentRunner().addSuite(suiteOrSpec);
+  } else {
+    this.specs_.push(suiteOrSpec);
+  }
+  this.queue.add(suiteOrSpec);
+};
+
+jasmine.Suite.prototype.specs = function() {
+  return this.specs_;
+};
+
+jasmine.Suite.prototype.suites = function() {
+  return this.suites_;
+};
+
+jasmine.Suite.prototype.children = function() {
+  return this.children_;
+};
+
+jasmine.Suite.prototype.execute = function(onComplete) {
+  var self = this;
+  this.queue.start(function () {
+    self.finish(onComplete);
+  });
+};
+jasmine.WaitsBlock = function(env, timeout, spec) {
+  this.timeout = timeout;
+  jasmine.Block.call(this, env, null, spec);
+};
+
+jasmine.util.inherit(jasmine.WaitsBlock, jasmine.Block);
+
+jasmine.WaitsBlock.prototype.execute = function (onComplete) {
+  if (jasmine.VERBOSE) {
+    this.env.reporter.log('>> Jasmine waiting for ' + this.timeout + ' ms...');
+  }
+  this.env.setTimeout(function () {
+    onComplete();
+  }, this.timeout);
+};
+/**
+ * A block which waits for some condition to become true, with timeout.
+ *
+ * @constructor
+ * @extends jasmine.Block
+ * @param {jasmine.Env} env The Jasmine environment.
+ * @param {Number} timeout The maximum time in milliseconds to wait for the condition to become true.
+ * @param {Function} latchFunction A function which returns true when the desired condition has been met.
+ * @param {String} message The message to display if the desired condition hasn't been met within the given time period.
+ * @param {jasmine.Spec} spec The Jasmine spec.
+ */
+jasmine.WaitsForBlock = function(env, timeout, latchFunction, message, spec) {
+  this.timeout = timeout || env.defaultTimeoutInterval;
+  this.latchFunction = latchFunction;
+  this.message = message;
+  this.totalTimeSpentWaitingForLatch = 0;
+  jasmine.Block.call(this, env, null, spec);
+};
+jasmine.util.inherit(jasmine.WaitsForBlock, jasmine.Block);
+
+jasmine.WaitsForBlock.TIMEOUT_INCREMENT = 10;
+
+jasmine.WaitsForBlock.prototype.execute = function(onComplete) {
+  if (jasmine.VERBOSE) {
+    this.env.reporter.log('>> Jasmine waiting for ' + (this.message || 'something to happen'));
+  }
+  var latchFunctionResult;
+  try {
+    latchFunctionResult = this.latchFunction.apply(this.spec);
+  } catch (e) {
+    this.spec.fail(e);
+    onComplete();
+    return;
+  }
+
+  if (latchFunctionResult) {
+    onComplete();
+  } else if (this.totalTimeSpentWaitingForLatch >= this.timeout) {
+    var message = 'timed out after ' + this.timeout + ' msec waiting for ' + (this.message || 'something to happen');
+    this.spec.fail({
+      name: 'timeout',
+      message: message
+    });
+
+    this.abort = true;
+    onComplete();
+  } else {
+    this.totalTimeSpentWaitingForLatch += jasmine.WaitsForBlock.TIMEOUT_INCREMENT;
+    var self = this;
+    this.env.setTimeout(function() {
+      self.execute(onComplete);
+    }, jasmine.WaitsForBlock.TIMEOUT_INCREMENT);
+  }
+};
+// Mock setTimeout, clearTimeout
+// Contributed by Pivotal Computer Systems, www.pivotalsf.com
+
+jasmine.FakeTimer = function() {
+  this.reset();
+
+  var self = this;
+  self.setTimeout = function(funcToCall, millis) {
+    self.timeoutsMade++;
+    self.scheduleFunction(self.timeoutsMade, funcToCall, millis, false);
+    return self.timeoutsMade;
+  };
+
+  self.setInterval = function(funcToCall, millis) {
+    self.timeoutsMade++;
+    self.scheduleFunction(self.timeoutsMade, funcToCall, millis, true);
+    return self.timeoutsMade;
+  };
+
+  self.clearTimeout = function(timeoutKey) {
+    self.scheduledFunctions[timeoutKey] = jasmine.undefined;
+  };
+
+  self.clearInterval = function(timeoutKey) {
+    self.scheduledFunctions[timeoutKey] = jasmine.undefined;
+  };
+
+};
+
+jasmine.FakeTimer.prototype.reset = function() {
+  this.timeoutsMade = 0;
+  this.scheduledFunctions = {};
+  this.nowMillis = 0;
+};
+
+jasmine.FakeTimer.prototype.tick = function(millis) {
+  var oldMillis = this.nowMillis;
+  var newMillis = oldMillis + millis;
+  this.runFunctionsWithinRange(oldMillis, newMillis);
+  this.nowMillis = newMillis;
+};
+
+jasmine.FakeTimer.prototype.runFunctionsWithinRange = function(oldMillis, nowMillis) {
+  var scheduledFunc;
+  var funcsToRun = [];
+  for (var timeoutKey in this.scheduledFunctions) {
+    scheduledFunc = this.scheduledFunctions[timeoutKey];
+    if (scheduledFunc != jasmine.undefined &&
+        scheduledFunc.runAtMillis >= oldMillis &&
+        scheduledFunc.runAtMillis <= nowMillis) {
+      funcsToRun.push(scheduledFunc);
+      this.scheduledFunctions[timeoutKey] = jasmine.undefined;
+    }
+  }
+
+  if (funcsToRun.length > 0) {
+    funcsToRun.sort(function(a, b) {
+      return a.runAtMillis - b.runAtMillis;
+    });
+    for (var i = 0; i < funcsToRun.length; ++i) {
+      try {
+        var funcToRun = funcsToRun[i];
+        this.nowMillis = funcToRun.runAtMillis;
+        funcToRun.funcToCall();
+        if (funcToRun.recurring) {
+          this.scheduleFunction(funcToRun.timeoutKey,
+              funcToRun.funcToCall,
+              funcToRun.millis,
+              true);
+        }
+      } catch(e) {
+      }
+    }
+    this.runFunctionsWithinRange(oldMillis, nowMillis);
+  }
+};
+
+jasmine.FakeTimer.prototype.scheduleFunction = function(timeoutKey, funcToCall, millis, recurring) {
+  this.scheduledFunctions[timeoutKey] = {
+    runAtMillis: this.nowMillis + millis,
+    funcToCall: funcToCall,
+    recurring: recurring,
+    timeoutKey: timeoutKey,
+    millis: millis
+  };
+};
+
+/**
+ * @namespace
+ */
+jasmine.Clock = {
+  defaultFakeTimer: new jasmine.FakeTimer(),
+
+  reset: function() {
+    jasmine.Clock.assertInstalled();
+    jasmine.Clock.defaultFakeTimer.reset();
+  },
+
+  tick: function(millis) {
+    jasmine.Clock.assertInstalled();
+    jasmine.Clock.defaultFakeTimer.tick(millis);
+  },
+
+  runFunctionsWithinRange: function(oldMillis, nowMillis) {
+    jasmine.Clock.defaultFakeTimer.runFunctionsWithinRange(oldMillis, nowMillis);
+  },
+
+  scheduleFunction: function(timeoutKey, funcToCall, millis, recurring) {
+    jasmine.Clock.defaultFakeTimer.scheduleFunction(timeoutKey, funcToCall, millis, recurring);
+  },
+
+  useMock: function() {
+    if (!jasmine.Clock.isInstalled()) {
+      var spec = jasmine.getEnv().currentSpec;
+      spec.after(jasmine.Clock.uninstallMock);
+
+      jasmine.Clock.installMock();
+    }
+  },
+
+  installMock: function() {
+    jasmine.Clock.installed = jasmine.Clock.defaultFakeTimer;
+  },
+
+  uninstallMock: function() {
+    jasmine.Clock.assertInstalled();
+    jasmine.Clock.installed = jasmine.Clock.real;
+  },
+
+  real: {
+    setTimeout: jasmine.getGlobal().setTimeout,
+    clearTimeout: jasmine.getGlobal().clearTimeout,
+    setInterval: jasmine.getGlobal().setInterval,
+    clearInterval: jasmine.getGlobal().clearInterval
+  },
+
+  assertInstalled: function() {
+    if (!jasmine.Clock.isInstalled()) {
+      throw new Error("Mock clock is not installed, use jasmine.Clock.useMock()");
+    }
+  },
+
+  isInstalled: function() {
+    return jasmine.Clock.installed == jasmine.Clock.defaultFakeTimer;
+  },
+
+  installed: null
+};
+jasmine.Clock.installed = jasmine.Clock.real;
+
+//else for IE support
+jasmine.getGlobal().setTimeout = function(funcToCall, millis) {
+  if (jasmine.Clock.installed.setTimeout.apply) {
+    return jasmine.Clock.installed.setTimeout.apply(this, arguments);
+  } else {
+    return jasmine.Clock.installed.setTimeout(funcToCall, millis);
+  }
+};
+
+jasmine.getGlobal().setInterval = function(funcToCall, millis) {
+  if (jasmine.Clock.installed.setInterval.apply) {
+    return jasmine.Clock.installed.setInterval.apply(this, arguments);
+  } else {
+    return jasmine.Clock.installed.setInterval(funcToCall, millis);
+  }
+};
+
+jasmine.getGlobal().clearTimeout = function(timeoutKey) {
+  if (jasmine.Clock.installed.clearTimeout.apply) {
+    return jasmine.Clock.installed.clearTimeout.apply(this, arguments);
+  } else {
+    return jasmine.Clock.installed.clearTimeout(timeoutKey);
+  }
+};
+
+jasmine.getGlobal().clearInterval = function(timeoutKey) {
+  if (jasmine.Clock.installed.clearTimeout.apply) {
+    return jasmine.Clock.installed.clearInterval.apply(this, arguments);
+  } else {
+    return jasmine.Clock.installed.clearInterval(timeoutKey);
+  }
+};
+
+jasmine.version_= {
+  "major": 1,
+  "minor": 1,
+  "build": 0,
+  "revision": 1308965645,
+  "release_candidate": 2
+};
diff --git a/deck.js/test/settings.js b/deck.js/test/settings.js
new file mode 100755 (executable)
index 0000000..7ba223d
--- /dev/null
@@ -0,0 +1,3 @@
+// SETTINGS, VARS, UTILITY FUNCTIONS
+jasmine.getFixtures().fixturesPath = 'fixtures';
+var defaults = $.deck.defaults;
diff --git a/deck.js/test/spec.core.js b/deck.js/test/spec.core.js
new file mode 100755 (executable)
index 0000000..9c7866a
--- /dev/null
@@ -0,0 +1,436 @@
+// Go tests, go
+describe('Deck JS', function() {
+       describe('standard html structure', function() {
+               beforeEach(function() {
+                       loadFixtures('standard.html');
+                       if (Modernizr.history) {
+                               history.replaceState({}, "", "#")
+                       }
+                       else {
+                               window.location.hash = '#';
+                       }
+               });
+
+               describe('init(selector)', function() {
+                       it('should create slides', function() {
+                               $.deck('.slide');
+                               expect($.deck('getSlides').length).toEqual($('.slide').length);
+                       });
+               });
+
+               describe('init([selectors])', function() {
+                       it('should create slides', function() {
+                               $.deck([
+                                       '.slide1',
+                                       '.slide2',
+                                       '.slide3',
+                                       '.slide4',
+                                       '.slide5'
+                               ]);
+                               expect($.deck('getSlides').length).toEqual($('.slide').length);
+                       });
+               });
+
+               describe('navigation functions', function() {
+                       beforeEach(function() {
+                               $.deck('.slide');
+                       });
+
+                       describe('go(i)', function() {
+                               it('should go to the i slide (0 based index)', function() {
+                                       $.deck('go', 3);
+                                       expect($.deck('getSlide')).toHaveClass('slide4');
+                               });
+
+                               it('should go to the slide with specified id', function() {
+                                       $.deck('go', 'custom-id');
+                                       expect($.deck('getSlide')).toHaveId('custom-id');
+                               });
+
+                               it('should go nowhere if i is out of bounds', function() {
+                                       $.deck('go', 5);
+                                       expect($.deck('getSlide')).toHaveClass('slide1');
+                               });
+                               
+                               it('should go nowhere if id does not exist', function() {
+                                       $.deck('go', 'i-dont-exist');
+                                       expect($.deck('getSlide')).toHaveClass('slide1');
+                               });
+                       });
+
+                       describe('next()', function() {
+                               it('should go to the next slide', function() {
+                                       $.deck('next');
+                                       expect($.deck('getSlide')).toHaveClass('slide2');
+                               });
+
+                               it('should go nowhere if on the last slide', function() {
+                                       $.deck('go', 4);
+                                       $.deck('next');
+                                       expect($.deck('getSlide')).toHaveClass('slide5');
+                               });
+                       });
+
+                       describe('prev()', function() {
+                               it('should go to the previous slide', function() {
+                                       $.deck('go', 2);
+                                       $.deck('prev');
+                                       expect($.deck('getSlide')).toHaveClass('slide2');
+                               });
+
+                               it('should go nowhere if on the first slide', function() {
+                                       $.deck('prev');
+                                       expect($.deck('getSlide')).toHaveClass('slide1');
+                               });
+                       });
+               });
+
+               describe('getters', function() {
+                       beforeEach(function() {
+                               $.deck('.slide');
+                       });
+
+                       describe('getSlide()', function() {
+                               it('should get the current slide', function() {
+                                       expect($.deck('getSlide')).toHaveClass('slide1');
+                                       $.deck('go', 2);
+                                       expect($.deck('getSlide')).toHaveClass('slide3');
+                               });
+                       });
+
+                       describe('getSlide(i)', function() {
+                               it('should get slide number i (0 based index)', function() {
+                                       expect($.deck('getSlide', 1)).toHaveClass('slide2');
+                                       expect($.deck('getSlide', 3)).toHaveClass('slide4');
+                               });
+
+                               it('should return null if i is NaN', function() {
+                                       expect($.deck('getSlide', 'barfoo')).toBeNull();
+                               });
+
+                               it('should return null if i is out of bounds', function() {
+                                       expect($.deck('getSlide', 6)).toBeNull();
+                               });
+                       });
+
+                       describe('getSlides()', function() {
+                               it('should return an array of jQuery objects for each slide', function() {
+                                       var expectation = [],
+                                       slides = $.deck('getSlides');
+                                       $('.slide').each(function() {
+                                               expectation.push($(this));
+                                       });
+                                       expect(slides).toEqual(expectation);
+                               });
+                       });
+                       
+                       describe('getContainer()', function() {
+                               it('should return a jQuery object with the container element(s)', function() {
+                                       expect($.deck('getContainer')).toBe(defaults.selectors.container);
+                               });
+                       });
+                       
+                       describe('getOptions()', function() {
+                               it('should return the current options object', function() {
+                                       expect($.deck('getOptions')).toEqual(defaults);
+                               });
+                       });
+               });
+
+               describe('container states', function() {
+                       beforeEach(function() {
+                               $.deck('.slide');
+                       });
+
+                       it('should start at state 0', function() {
+                               expect($(defaults.selectors.container)).toHaveClass(defaults.classes.onPrefix + '0');
+                       });
+
+                       it('should change states with the slide number', function() {
+                               $.deck('next');
+                               expect($(defaults.selectors.container)).toHaveClass(defaults.classes.onPrefix + '1');
+                               $.deck('go', 3);
+                               expect($(defaults.selectors.container)).toHaveClass(defaults.classes.onPrefix + '3');
+                               $.deck('prev');
+                               expect($(defaults.selectors.container)).toHaveClass(defaults.classes.onPrefix + '2');
+                       });
+               });
+
+               describe('options object', function() {
+                       var $d = $(document);
+
+                       beforeEach(function() {
+                               $.deck('.alt-slide', {
+                                       classes: {
+                                               after: 'alt-after',
+                                               before: 'alt-before',
+                                               current: 'alt-current',
+                                               onPrefix: 'alt-on-',
+                                               next: 'alt-next',
+                                               previous: 'alt-prev'
+                                       },
+
+                                       selectors: {
+                                               container: '.alt-container'
+                                       },
+
+                                       keys: {
+                                               next: 87,
+                                               previous: 69
+                                       }
+                               });
+                       });
+
+                       describe('classes', function() {
+                               it('should use the specified after class', function() {
+                                       expect($('.alt-slide3, .alt-slide4, .alt-slide5')).toHaveClass('alt-after');
+                               });
+
+                               it('should use the specified before class', function() {
+                                       $.deck('go', 4);
+                                       expect($('.alt-slide1, .alt-slide2, .alt-slide3')).toHaveClass('alt-before');
+                               });
+
+                               it('should use the specified container class', function() {
+                                       $.deck('go', 2);
+                                       expect($('.alt-container')).toHaveClass('alt-on-2');
+                               });
+
+                               it('should use the specified current class', function() {
+                                       expect($.deck('getSlide')).toHaveClass('alt-current');
+                               });
+
+                               it('should use the specified next class', function() {
+                                       expect($('.alt-slide2')).toHaveClass('alt-next');
+                               });
+
+                               it('should use the specified previous class', function() {
+                                       $.deck('next');
+                                       expect($('.alt-slide1')).toHaveClass('alt-prev');
+                               });
+                       });
+
+                       describe('key bindings', function() {
+                               var e;
+
+                               beforeEach(function() {
+                                       e = jQuery.Event('keydown.deck');
+                               });
+
+                               it('should go to the next slide using the specified key', function() {
+                                       e.which = 87; // 'w'
+                                       $d.trigger(e);
+                                       expect($.deck('getSlide')).toHaveClass('alt-slide2');
+                               });
+
+                               it('should go to the previous slide using the specified key', function() {
+                                       $.deck('next');
+                                       e.which = 69; // 'e'
+                                       $d.trigger(e);
+                                       expect($.deck('getSlide')).toHaveClass('alt-slide1');
+                               });
+                               
+                               it('should not trigger events that originate within editable elements', function() {
+                                       var $outside = $('<input type="text" />').appendTo('body');
+                                       e = jQuery.Event('keydown');
+                                       e.which = 87;
+                                       $outside.trigger(e);
+                                       expect($.deck('getSlide')).toHaveClass('alt-slide1');
+                                       $outside.remove();
+                               });
+                       });
+               });
+
+               describe('events', function() {
+                       var $d = $(document);
+
+                       beforeEach(function() {
+                               spyOnEvent($d, 'deck.init');
+                               spyOnEvent($d, 'deck.beforeInit');
+                               $.deck('.slide');
+                               $.deck('go', 1);
+                               spyOnEvent($d, 'deck.change');
+                       });
+
+                       describe('deck.change', function() {
+                               it('should fire on go(i)', function() {
+                                       $.deck('go', 3);
+                                       expect('deck.change').toHaveBeenTriggeredOn($d);
+                               });
+
+                               it('should fire on next()', function() {
+                                       $.deck('next');
+                                       expect('deck.change').toHaveBeenTriggeredOn($d);
+                               });
+
+                               it('should fire on prev()', function() {
+                                       $.deck('prev');
+                                       expect('deck.change').toHaveBeenTriggeredOn($d);
+                               });
+
+                               it('should pass parameters with from and to indices', function() {
+                                       var f = function(e, from, to) {
+                                               expect(from).toEqual(1);
+                                               expect(to).toEqual(3);
+                                       };
+                                       
+                                       $d.bind('deck.change', f);
+                                       $.deck('go', 3);
+                                       $d.unbind('deck.change', f);
+                               });
+                               
+                               it('should not change slides if default prevented', function() {
+                                       $d.bind('deck.change', false);
+                                       $.deck('go', 3);
+                                       expect($.deck('getSlide')).toEqual($.deck('getSlide', 1));
+                                       $d.unbind('deck.change', false);
+                               });
+                       });
+                       
+                       describe('deck.init', function() {
+                               it('should fire on deck initialization', function() {
+                                       expect('deck.init').toHaveBeenTriggeredOn($d);
+                               });
+                               
+                               it('should have already populated the slides array', function() {
+                                       var f = function() {
+                                               expect($.deck('getSlides').length).toBeGreaterThan(0);
+                                       };
+                                       
+                                       $d.bind('deck.init', f);
+                                       $.deck('.slide');
+                                       $d.unbind('deck.init', f);
+                               });
+                       });
+                       
+                       describe('deck.beforeInit', function() {
+                               it('should fire on deck initialization', function() {
+                                       expect('deck.beforeInit').toHaveBeenTriggeredOn($d);
+                               });
+                               
+                               it('should have not populated the slides array', function() {
+                                       var f = function() {
+                                               expect($.deck('getSlides').length).toEqual(0);
+                                       };
+                                       
+                                       $d.bind('deck.beforeInit', f);
+                                       $.deck('.slide');
+                                       $d.unbind('deck.beforeInit', f);
+                               });
+                       });
+               });
+       });
+       
+       describe('complex html structure', function() {
+               beforeEach(function() {
+                       loadFixtures('complex.html');
+                       if (Modernizr.history) {
+                               history.replaceState({}, "", "#")
+                       }
+                       $.deck([
+                               '.slide1',
+                               '.slide2',
+                               '.slide3',
+                               '.slide4',
+                               '.slide5',
+                               '.slide6',
+                               '.slide7',
+                               '.slide8',
+                               '.slide9',
+                               '.slide10',
+                       ]);
+                       $.deck('go', 2);
+               });
+               
+               describe('compound state classes', function() {
+                       it('should apply current class', function() {
+                               $('.slide3').each(function(i, el) {
+                                       expect($(el)).toHaveClass(defaults.classes.current);
+                               });
+                       });
+                       
+                       it('should apply previous class', function() {
+                               $('.slide2').each(function(i, el) {
+                                       expect($(el)).toHaveClass(defaults.classes.previous);
+                               });
+                       });
+                       
+                       it('should apply next class', function() {
+                               $('.slide4').each(function(i, el) {
+                                       expect($(el)).toHaveClass(defaults.classes.next);
+                               });
+                       });
+                       
+                       it('should apply before class', function() {
+                               $('.slide1').each(function(i, el) {
+                                       expect($(el)).toHaveClass(defaults.classes.before);
+                               });
+                       });
+                       
+                       it('should apply after class', function() {
+                               $('.slide5, .slide6, .slide7, .slide8, .slide9, .slide10').each(function(i, el) {
+                                       expect($(el)).toHaveClass(defaults.classes.after);
+                               });
+                       });
+                       
+                       it('should apply child-current class', function() {
+                               expect($('.slide2').not('.slide10')).toHaveClass(defaults.classes.childCurrent);
+                       });
+               });
+               
+               it('should remove old state classes', function() {
+                       $.deck('go', 4);
+                       expect($('.slide3').not('.slide5')).not.toHaveClass(defaults.classes.current);
+                       expect($('.slide2').not('.slide4')).not.toHaveClass(defaults.classes.previous);
+                       expect($('.slide4').not('.slide6')).not.toHaveClass(defaults.classes.next);
+               });
+       });
+
+       describe('iframes', function() {
+               beforeEach(function() {
+                       loadFixtures('iframes.html');
+                       if (Modernizr.history) {
+                               history.replaceState({}, "", "#")
+                       }
+                       $.deck([
+                               '.slide1',
+                               '.slide2',
+                               '.slide3',
+                               '.slide4',
+                               '.slide5',
+                               '.slide6',
+                               '.slide7',
+                               '.slide8',
+                               '.slide9',
+                               '.slide10',
+                       ]);
+
+               });
+
+               it('should remove/restore iframe sources when leaving/entering a slide', function() {
+                       $.deck('go', 4);
+               expect($.deck('getSlide').find('iframe').attr('src')).toEqual('fixtures/iframe_simple.html');
+               $.deck('next');
+               expect($('.slide5').find('iframe').attr('src')).toEqual('');
+            $.deck('prev');
+            expect($('.slide5').find('iframe').attr('src')).toEqual('fixtures/iframe_simple.html');
+        });
+
+               it('should not store blank iframe sources', function() {
+                 $.deck('go', 6);
+                 $.deck('next');
+                 expect($.deck('getSlide').find('iframe').data('src')).toBeUndefined();
+               });
+       });
+       
+       describe('empty deck', function() {
+               beforeEach(function() {
+                       loadFixtures('empty.html');
+                       $.deck('.slide');
+               });
+               
+               describe('getSlide()', function() {
+                       it('should not error on init', $.noop);
+               });
+       });
+});
diff --git a/deck.js/test/spec.goto.js b/deck.js/test/spec.goto.js
new file mode 100644 (file)
index 0000000..391d80c
--- /dev/null
@@ -0,0 +1,142 @@
+describe('Deck JS Quick Go-To', function() {
+       var $d = $(document);
+       
+       beforeEach(function() {
+               loadFixtures('standard.html');
+               if (Modernizr.history) {
+                       history.replaceState({}, "", "#")
+               }
+               else {
+                       window.location.hash = '#';
+               }
+               $.deck('.slide');
+       });
+       
+       describe('showGoTo()', function() {
+               it('should show the go-to helper', function() {
+                       expect($(defaults.selectors.container)).not.toHaveClass(defaults.classes.goto);
+                       $.deck('showGoTo');
+                       expect($(defaults.selectors.container)).toHaveClass(defaults.classes.goto);
+               });
+               
+               it('should focus the go-to input', function() {
+                       $.deck('showGoTo');
+                       expect($(defaults.selectors.gotoInput)[0]).toEqual(document.activeElement);
+               });
+       });
+       
+       describe('hideGoTo()', function() {
+               beforeEach(function() {
+                       $.deck('showGoTo');
+                       $.deck('hideGoTo');
+               });
+               
+               it('should hide the go-to helper', function() {
+                       expect($(defaults.selectors.container)).not.toHaveClass(defaults.classes.goto);
+               });
+               
+               it('should blur the go-to input', function() {
+                       expect($(defaults.selectors.gotoInput)[0]).not.toEqual(document.activeElement);
+               });
+       });
+       
+       describe('toggleGoTo()', function() {
+               it('should toggle the go-to helper on and off', function() {
+                       expect($(defaults.selectors.container)).not.toHaveClass(defaults.classes.goto);
+                       $.deck('toggleGoTo');
+                       expect($(defaults.selectors.container)).toHaveClass(defaults.classes.goto);
+                       $.deck('toggleGoTo');
+                       expect($(defaults.selectors.container)).not.toHaveClass(defaults.classes.goto);
+               });
+       });
+       
+       describe('Go-To submit', function() {
+               beforeEach(function() {
+                       $.deck('showGoTo');
+               });
+               
+               it('should hide the go-to helper', function() {
+                       $(defaults.selectors.gotoInput).val('3');
+                       $(defaults.selectors.gotoForm).submit();
+                       expect($(defaults.selectors.container)).not.toHaveClass(defaults.classes.goto);
+               });
+               
+               it('should go to the slide number entered', function() {
+                       $(defaults.selectors.gotoInput).val('3');
+                       $(defaults.selectors.gotoForm).submit();
+                       expect($.deck('getSlide')).toEqual($.deck('getSlide'), 2);
+               });
+               
+               it('should go to the slide id entered', function() {
+                       $(defaults.selectors.gotoInput).val('custom-id');
+                       $(defaults.selectors.gotoForm).submit();
+                       expect($.deck('getSlide')).toEqual($.deck('getSlide'), 1);
+               });
+               
+               it('should go nowhere if the number is negative', function() {
+                       $(defaults.selectors.gotoInput).val('-2');
+                       $(defaults.selectors.gotoForm).submit();
+                       expect($.deck('getSlide')).toEqual($.deck('getSlide'), 0);
+               });
+               
+               it('should go nowhere if the number is greater than the number of slides', function() {
+                       $(defaults.selectors.gotoInput).val('9');
+                       $(defaults.selectors.gotoForm).submit();
+                       expect($.deck('getSlide')).toEqual($.deck('getSlide'), 0);
+               });
+               
+               it('should go nowhere if the id does not exist', function() {
+                       $(defaults.selectors.gotoInput).val('do-not-exist');
+                       $(defaults.selectors.gotoForm).submit();
+                       expect($.deck('getSlide')).toEqual($.deck('getSlide'), 0);
+               });
+       });
+       
+       describe('Datalist population', function() {
+               it('should fill in options with all the slide ids', function() {
+                       var $dataOptions = $(defaults.selectors.gotoDatalist).find('option');
+                       expect($dataOptions.length).toEqual(5);
+                       expect($dataOptions.eq(0).attr('value')).toEqual('slide-0');
+                       expect($dataOptions.eq(1).attr('value')).toEqual('custom-id');
+               });
+       });
+       
+       describe('key bindings', function() {
+               var e;
+
+               beforeEach(function() {
+                       e = jQuery.Event('keydown.deckgoto');
+               });
+               
+               it('should toggle the go-to helper if the specified key is pressed', function() {
+                       e.which = 71; // g
+                       $d.trigger(e);
+                       expect($(defaults.selectors.container)).toHaveClass(defaults.classes.goto);
+                       $d.trigger(e);
+                       expect($(defaults.selectors.container)).not.toHaveClass(defaults.classes.goto);
+               });
+       });
+       
+       describe('countNested false', function() {
+         beforeEach(function() {
+           loadFixtures('nesteds.html');
+                       $.deck('.slide', {
+                               countNested: false
+                       });
+                       $.deck('showGoTo');
+         });
+         
+               it('should ignore nested slides when given a slide number', function() {
+                       $(defaults.selectors.gotoInput).val('4');
+                       $(defaults.selectors.gotoForm).submit();
+                       expect($.deck('getSlide')).toHaveId('after');
+               });
+               
+               it('should respect top side of new slide range', function() {
+                 $.deck('go', 0);
+                       $(defaults.selectors.gotoInput).val('6');
+                       $(defaults.selectors.gotoForm).submit();
+                       expect($.deck('getSlide')).toHaveId('slide-0');
+               });
+       });
+});
\ No newline at end of file
diff --git a/deck.js/test/spec.hash.js b/deck.js/test/spec.hash.js
new file mode 100644 (file)
index 0000000..c1faafd
--- /dev/null
@@ -0,0 +1,81 @@
+describe('Deck JS Hash Extension', function() {
+       beforeEach(function() {
+               loadFixtures('standard.html');
+               if (Modernizr.history) {
+                       history.replaceState({}, "", "#")
+               }
+               else {
+                       window.location.hash = '#';
+               }
+               $.deck('.slide');
+       });
+       
+       it('should assign ids to slides that do not have them', function() {
+               var slides = $.deck('getSlides');
+               $.each(slides, function(i, $e) {
+                       expect($e.attr('id')).toBeTruthy();
+               });
+       });
+       
+       it('should reassign ids on reinitialization', function() {
+               var $firstSlide = $.deck('getSlide', 0),
+               firstID = $firstSlide.attr('id');
+               
+               $firstSlide.before('<div class="slide"></div>');
+               $.deck('.slide');
+               expect($firstSlide).not.toHaveId(firstID);
+       });
+       
+   it('should update container with a state class including the slide id', function() {
+      var $c = $.deck('getContainer'),
+      osp = defaults.classes.onPrefix;
+      
+      expect($c).toHaveClass(osp + $.deck('getSlide', 0).attr('id'));
+      $.deck('next');
+      expect($c).toHaveClass(osp + $.deck('getSlide', 1).attr('id'));
+      $.deck('next');
+      expect($c).not.toHaveClass(osp + $.deck('getSlide', 1).attr('id'));
+      expect($c).toHaveClass(osp + $.deck('getSlide', 2).attr('id'));
+   });
+       
+       it('should update the href on slide change', function() {
+               var $hashLink = $(defaults.selectors.hashLink);
+               $.deck('go', 3);
+               expect($hashLink.attr('href')).toMatch('#slide-3');
+       });
+       
+       it('should use existing ids if they exist', function() {
+               var $hashLink = $(defaults.selectors.hashLink);
+               $.deck('go', 1);
+               expect($hashLink.attr('href')).toMatch('#custom-id');
+       });
+       
+       it('should update the URL on slide change (if supported)', function() {
+               if (Modernizr.history) {
+                       $.deck('go', 3);
+                       expect(window.location.hash).toEqual('#slide-3');
+               }
+       });
+       
+       it('should deep link to slide on deck init', function() {
+               window.location.hash = "#slide-3";
+               $.deck('.slide');
+               expect($.deck('getSlide')).toHaveId('slide-3');
+       });
+       
+       it('should follow internal hash links using hashchange (if supported)', function() {
+               if (Modernizr.hashchange) {
+                       window.location.hash = "#slide-3";
+                       
+                       // Hashchange event doesn't fire right when the hash changes?
+                       waitsFor(function() {
+                               return $.deck('getSlide').attr('id') === 'slide-3';
+                       }, 'hash to change to slide-3', 2000);
+               }
+       });
+       
+       it('should follow internal hash links on click', function() {
+               /* Triggered clicks dont generate hashchanges, so until I find
+               a way to do this in an automated fashion, needs to be hand tested. */
+       });
+});
\ No newline at end of file
diff --git a/deck.js/test/spec.menu.js b/deck.js/test/spec.menu.js
new file mode 100644 (file)
index 0000000..35f494c
--- /dev/null
@@ -0,0 +1,66 @@
+describe('Deck JS Menu', function() {
+       var $d = $(document),
+       dsc = defaults.selectors.container;
+       
+       beforeEach(function() {
+               loadFixtures('standard.html');
+               if (Modernizr.history) {
+                       history.replaceState({}, "", "#")
+               }
+               else {
+                       window.location.hash = '#';
+               }
+               $.deck('.slide');
+       });
+       
+       describe('showMenu()', function() {
+               it('should show the menu', function() {
+                       expect($(dsc)).not.toHaveClass(defaults.classes.menu);
+                       $.deck('showMenu');
+                       expect($(dsc)).toHaveClass(defaults.classes.menu);
+               });
+               
+               it('should do nothing if menu is already showing', function() {
+                       if (Modernizr.csstransforms) {
+                               $.deck('showMenu');
+                               $.deck('showMenu');
+                               $.deck('hideMenu');
+                               expect($('.slide').attr('style')).toBeFalsy();
+                       }
+               });
+       });
+       
+       describe('hideMenu()', function() {
+               it('should hide the menu', function() {
+                       $.deck('showMenu');
+                       $.deck('hideMenu');
+                       expect($(dsc)).not.toHaveClass(defaults.classes.menu);
+               });
+       });
+       
+       describe('toggleMenu()', function() {
+               it('should toggle menu on and off', function() {
+                       expect($(dsc)).not.toHaveClass(defaults.classes.menu);
+                       $.deck('toggleMenu');
+                       expect($(dsc)).toHaveClass(defaults.classes.menu);
+                       $.deck('toggleMenu');
+                       expect($(dsc)).not.toHaveClass(defaults.classes.menu);
+               });
+       });
+       
+       describe('key bindings', function() {
+               var e;
+
+               beforeEach(function() {
+                       e = jQuery.Event('keydown.deckmenu');
+               });
+               
+               it('should toggle the menu if the specified key is pressed', function() {
+                       e.which = 77; // m
+                       $d.trigger(e);
+                       expect($(dsc)).toHaveClass(defaults.classes.menu);
+                       $d.trigger(e);
+                       expect($(dsc)).not.toHaveClass(defaults.classes.menu);
+               });
+       });
+});
\ No newline at end of file
diff --git a/deck.js/test/spec.navigation.js b/deck.js/test/spec.navigation.js
new file mode 100644 (file)
index 0000000..46f6f21
--- /dev/null
@@ -0,0 +1,51 @@
+describe('Deck JS Navigation Buttons', function() {
+       beforeEach(function() {
+               loadFixtures('standard.html');
+               if (Modernizr.history) {
+                       history.replaceState({}, "", "#")
+               }
+               else {
+                       window.location.hash = '#';
+               }
+               $.deck('.slide');
+       });
+       
+       it('should go to the next slide if next link is clicked', function() {
+               $(defaults.selectors.nextLink).click();
+               expect($.deck('getSlide')).toHaveClass('slide2');
+       });
+       
+       it('should go to the previous slide if previous link is clicked', function() {
+               $.deck('go', 2);
+               $(defaults.selectors.previousLink).click();
+               expect($.deck('getSlide')).toHaveClass('slide2');
+       });
+       
+       it('should add the disabled class to the previous link if on first slide', function() {
+               expect($(defaults.selectors.previousLink)).toHaveClass(defaults.classes.navDisabled);
+               $(defaults.selectors.nextLink).click();
+               expect($(defaults.selectors.previousLink)).not.toHaveClass(defaults.classes.navDisabled);
+               $(defaults.selectors.previousLink).click();
+               expect($(defaults.selectors.previousLink)).toHaveClass(defaults.classes.navDisabled);
+       });
+       
+       it('should add the disabled class to the next link if on last slide', function() {
+               expect($(defaults.selectors.nextLink)).not.toHaveClass(defaults.classes.navDisabled);
+               $.deck('go', $.deck('getSlides').length - 1);
+               expect($(defaults.selectors.nextLink)).toHaveClass(defaults.classes.navDisabled);
+       });
+       
+       it('should not start disabled if deck initialized in the middle', function() {
+               $.deck('go', 2);
+               $.deck('.slide');
+               expect($(defaults.selectors.previousLink)).not.toHaveClass(defaults.classes.navDisabled);
+       });
+       
+       it('should update the links hrefs with real fragment ids', function() {
+               expect($(defaults.selectors.previousLink).attr('href')).toMatch(/#$/);
+               expect($(defaults.selectors.nextLink).attr('href')).toMatch('#custom-id');
+               $.deck('go', 2);
+               expect($(defaults.selectors.previousLink).attr('href')).toMatch('#custom-id');
+               expect($(defaults.selectors.nextLink).attr('href')).toMatch('#slide-3');
+       });
+});
\ No newline at end of file
diff --git a/deck.js/test/spec.scale.js b/deck.js/test/spec.scale.js
new file mode 100644 (file)
index 0000000..0976ba1
--- /dev/null
@@ -0,0 +1,57 @@
+describe('Deck JS Status Indicator', function() {
+       beforeEach(function() {
+               loadFixtures('standard.html');
+               if (Modernizr.history) {
+                       history.replaceState({}, "", "#")
+               }
+               else {
+                       window.location.hash = '#';
+               }
+               $.deck('.slide');
+       });
+       
+       it('should start with scaling enabled', function() {
+               expect($.deck('getContainer')).toHaveClass(defaults.classes.scale);
+       });
+       
+       describe('disableScale()', function() {
+               it('should remove the scale class from the container', function() {
+                       $.deck('disableScale');
+                       expect($.deck('getContainer')).not.toHaveClass(defaults.classes.scale);
+               });
+       });
+       
+       describe('enableScale()', function() {
+               it('should add the scale class to the container', function() {
+                       $.deck('disableScale');
+                       $.deck('enableScale');
+                       expect($.deck('getContainer')).toHaveClass(defaults.classes.scale);
+               });
+       });
+       
+       describe('toggleScale()', function() {
+               it('should toggle between adding and removing the scale class', function() {
+                       $.deck('toggleScale');
+                       expect($.deck('getContainer')).not.toHaveClass(defaults.classes.scale);
+                       $.deck('toggleScale');
+                       expect($.deck('getContainer')).toHaveClass(defaults.classes.scale);
+               });
+       });
+       
+       describe('key bindings', function() {
+               var e,
+               $d = $(document);
+
+               beforeEach(function() {
+                       e = jQuery.Event('keydown.deckscale');
+               });
+               
+               it('should toggle scaling if the specified key is pressed', function() {
+                       e.which = 83; // s
+                       $d.trigger(e);
+                       expect($.deck('getContainer')).not.toHaveClass(defaults.classes.scale);
+                       $d.trigger(e);
+                       expect($.deck('getContainer')).toHaveClass(defaults.classes.scale);
+               });
+       });
+});
\ No newline at end of file
diff --git a/deck.js/test/spec.status.js b/deck.js/test/spec.status.js
new file mode 100644 (file)
index 0000000..fe0e015
--- /dev/null
@@ -0,0 +1,58 @@
+describe('Deck JS Status Indicator', function() {
+       beforeEach(function() {
+               loadFixtures('standard.html');
+               if (Modernizr.history) {
+                       history.replaceState({}, "", "#")
+               }
+               else {
+                       window.location.hash = '#';
+               }
+               $.deck('.slide');
+       });
+       
+       it('should show the correct total number of slides', function() {
+               expect($(defaults.selectors.statusTotal)).toHaveText($.deck('getSlides').length);
+       });
+       
+       it('should start at the right current slide', function() {
+               expect($(defaults.selectors.statusCurrent)).toHaveText(1);
+               $.deck('go', 2);
+               $.deck('.slide');
+               expect($(defaults.selectors.statusCurrent)).toHaveText(3);
+       });
+       
+       it('should update to the correct number on slide change', function() {
+               $.deck('go', 2);
+               expect($(defaults.selectors.statusCurrent)).toHaveText('3');
+       });
+});
+
+describe('countNested false indicator', function() {
+       beforeEach(function() {
+               loadFixtures('nesteds.html');
+               if (Modernizr.history) {
+                       history.replaceState({}, "", "#")
+               }
+               else {
+                       window.location.hash = '#';
+               }
+               $.deck('.slide', {
+                       countNested: false
+               });
+       });
+       
+       it('should ignore nested slides in the total', function() {
+               expect($(defaults.selectors.statusTotal)).toHaveText('5');
+       });
+       
+       it('should update to the root slide number when nested becomes active', function() {
+               $.deck('go', 10);
+               expect($(defaults.selectors.statusCurrent)).toHaveText('4');
+               $.deck('prev');
+               expect($(defaults.selectors.statusCurrent)).toHaveText('3');
+               $.deck('go', 3);
+               expect($(defaults.selectors.statusCurrent)).toHaveText('3');
+               $.deck('go', 1);
+               expect($(defaults.selectors.statusCurrent)).toHaveText('2');
+       });
+});
\ No newline at end of file
diff --git a/deck.js/themes/style/neon.css b/deck.js/themes/style/neon.css
new file mode 100644 (file)
index 0000000..aaaeb93
--- /dev/null
@@ -0,0 +1,123 @@
+.deck-container {
+  font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
+  font-size: 1.75em;
+  color: #aaa;
+  background: #000;
+}
+.deck-container .slide {
+  background: #000;
+}
+.deck-container .slide h1 {
+  color: #0af;
+  font-weight: normal;
+  font-weight: 100;
+  text-shadow: 0 0 50px #0af, 0 0 3px #fff;
+}
+.deck-container .slide h2 {
+  color: #af0;
+  border-bottom-color: #ccc;
+  font-weight: normal;
+  font-weight: 100;
+  text-shadow: 0 0 15px #af0, 0 0 2px #fff;
+  border-bottom: 1px solid #333;
+}
+.deck-container .slide h3 {
+  color: #fff;
+  font-weight: normal;
+  font-weight: 100;
+  text-shadow: 0 0 10px #fff, 0 0 2px #fff;
+}
+.deck-container .slide pre {
+  border-color: #333;
+}
+.deck-container .slide pre code {
+  color: #fff;
+}
+.deck-container .slide code {
+  color: #f0a;
+}
+.deck-container .slide blockquote {
+  font-size: 2em;
+  padding: 1em 2em;
+  color: #fff;
+  border-left: 5px solid #fff;
+}
+.deck-container .slide blockquote p {
+  margin: 0;
+}
+.deck-container .slide blockquote cite {
+  font-size: .5em;
+  font-style: normal;
+  font-weight: normal;
+  font-weight: 100;
+  color: #aaa;
+  text-shadow: 0 0 15px #fff, 0 0 2px #fff;
+}
+.deck-container .slide ::-moz-selection {
+  background: #a0f;
+}
+.deck-container .slide ::selection {
+  background: #a0f;
+}
+.deck-container .slide a, .deck-container .slide a:hover, .deck-container .slide a:focus, .deck-container .slide a:active, .deck-container .slide a:visited {
+  color: #f0a;
+  text-decoration: none;
+}
+.deck-container .slide a:hover, .deck-container .slide a:focus {
+  text-decoration: underline;
+}
+.deck-container .deck-prev-link, .deck-container .deck-next-link {
+  background: #f0a;
+  text-shadow: 0 0 3px #fff;
+}
+.deck-container .deck-prev-link, .deck-container .deck-prev-link:hover, .deck-container .deck-prev-link:focus, .deck-container .deck-prev-link:active, .deck-container .deck-prev-link:visited, .deck-container .deck-next-link, .deck-container .deck-next-link:hover, .deck-container .deck-next-link:focus, .deck-container .deck-next-link:active, .deck-container .deck-next-link:visited {
+  color: #fff;
+}
+.deck-container .deck-prev-link:hover, .deck-container .deck-prev-link:focus, .deck-container .deck-next-link:hover, .deck-container .deck-next-link:focus {
+  text-decoration: none;
+}
+.boxshadow .deck-container .deck-prev-link:hover, .boxshadow .deck-container .deck-prev-link:focus, .boxshadow .deck-container .deck-next-link:hover, .boxshadow .deck-container .deck-next-link:focus {
+  -webkit-box-shadow: 0 0 20px #f0a, 0 0 5px #fff;
+  -moz-box-shadow: 0 0 20px #f0a, 0 0 5px #fff;
+  box-shadow: 0 0 20px #f0a, 0 0 5px #fff;
+}
+.deck-container > .slide .deck-before, .deck-container > .slide .deck-previous {
+  opacity: 0.4;
+}
+.deck-container > .slide .deck-before:not(.deck-child-current) .deck-before, .deck-container > .slide .deck-before:not(.deck-child-current) .deck-previous, .deck-container > .slide .deck-previous:not(.deck-child-current) .deck-before, .deck-container > .slide .deck-previous:not(.deck-child-current) .deck-previous {
+  opacity: 1;
+}
+.deck-container > .slide .deck-child-current {
+  opacity: 1;
+}
+.deck-container .deck-status {
+  font-size: 0.6666em;
+}
+.deck-container .goto-form {
+  background: #000;
+  border: 1px solid #f0a;
+}
+.deck-container .goto-form label {
+  color: #fff;
+}
+.deck-container.deck-menu .slide {
+  background: #333;
+}
+.deck-container.deck-menu .deck-current {
+  background: #444;
+}
+.boxshadow .deck-container.deck-menu .deck-current {
+  background: #000;
+  -webkit-box-shadow: 0 0 20px #f0a, 0 0 5px #fff;
+  -moz-box-shadow: 0 0 20px #f0a, 0 0 5px #fff;
+  box-shadow: 0 0 20px #f0a, 0 0 5px #fff;
+}
+.no-touch .deck-container.deck-menu .slide:hover {
+  background: #444;
+}
+.no-touch.boxshadow .deck-container.deck-menu .slide:hover {
+  background: #000;
+  -webkit-box-shadow: 0 0 20px #f0a, 0 0 5px #fff;
+  -moz-box-shadow: 0 0 20px #f0a, 0 0 5px #fff;
+  box-shadow: 0 0 20px #f0a, 0 0 5px #fff;
+}
diff --git a/deck.js/themes/style/neon.scss b/deck.js/themes/style/neon.scss
new file mode 100644 (file)
index 0000000..d44babf
--- /dev/null
@@ -0,0 +1,155 @@
+.deck-container {
+       font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
+       font-size:1.75em;
+       color:#aaa;
+       background:#000;
+       
+       .slide {
+               background:#000;
+               
+               h1 {
+                       color:#0af;
+                       font-weight:normal;
+                       font-weight:100;
+                       text-shadow:0 0 50px #0af, 0 0 3px #fff;
+               }
+
+               h2 {
+                       color:#af0;
+                       border-bottom-color:#ccc;
+                       font-weight:normal;
+                       font-weight:100;
+                       text-shadow:0 0 15px #af0, 0 0 2px #fff;
+                       border-bottom:1px solid #333;
+               }
+
+               h3 {
+                       color:#fff;
+                       font-weight:normal;
+                       font-weight:100;
+                       text-shadow:0 0 10px #fff, 0 0 2px #fff;
+               }
+
+               pre {
+                       border-color:#333;
+
+                       code {
+                               color:#fff;
+                       }
+               }
+
+               code {
+                       color:#f0a;
+               }
+
+               blockquote {
+                       font-size:2em;
+                       padding:1em 2em;
+                       color:#fff;
+                       border-left:5px solid #fff;
+
+                       p {
+                               margin:0;
+                       }
+
+                       cite {
+                               font-size:.5em;
+                               font-style:normal;
+                               font-weight:normal;
+                               font-weight:100;
+                               color:#aaa;
+                               text-shadow:0 0 15px #fff, 0 0 2px #fff;
+                       }
+               }
+
+               ::-moz-selection{ background:#a0f; }
+               ::selection { background:#a0f; }
+
+               a {
+                       &, &:hover, &:focus, &:active, &:visited {
+                               color:#f0a;
+                               text-decoration:none;
+                       }
+
+                       &:hover, &:focus {
+                               text-decoration:underline;
+                       }
+               }
+       }
+       
+       .deck-prev-link, .deck-next-link {
+               background:#f0a;
+               text-shadow:0 0 3px #fff;
+               
+               &, &:hover, &:focus, &:active, &:visited {
+                       color:#fff;
+               }
+               
+               &:hover, &:focus {
+                       text-decoration:none;
+                       
+                       .boxshadow & {
+                               -webkit-box-shadow:0 0 20px #f0a, 0 0 5px #fff;
+                               -moz-box-shadow:0 0 20px #f0a, 0 0 5px #fff;
+                               box-shadow:0 0 20px #f0a, 0 0 5px #fff;
+                       }
+               }
+       }
+       
+       > .slide {
+               .deck-before, .deck-previous {
+                       opacity:0.4;
+                       
+                       &:not(.deck-child-current) {
+                               .deck-before, .deck-previous {
+                                       opacity:1;
+                               }
+                       }
+               }
+               
+               .deck-child-current {
+                       opacity:1;
+               }
+       }
+       
+       .deck-status {
+               font-size:0.6666em;
+       }
+       
+       .goto-form {
+               background:#000;
+               border:1px solid #f0a;
+               
+               label {
+                       color:#fff;
+               }
+       }
+       
+       &.deck-menu {
+               .slide {
+                       background:#333;
+               }
+               
+               .deck-current {
+                       background:#444;
+                       
+                       .boxshadow & {
+                               background:#000;
+                               -webkit-box-shadow:0 0 20px #f0a, 0 0 5px #fff;
+                               -moz-box-shadow:0 0 20px #f0a, 0 0 5px #fff;
+                               box-shadow:0 0 20px #f0a, 0 0 5px #fff;
+                       }
+               }
+               
+               .no-touch & .slide:hover {
+                       background:#444;
+               }
+               
+               .no-touch.boxshadow & .slide:hover {
+                       background:#000;
+                       -webkit-box-shadow:0 0 20px #f0a, 0 0 5px #fff;
+                       -moz-box-shadow:0 0 20px #f0a, 0 0 5px #fff;
+                       box-shadow:0 0 20px #f0a, 0 0 5px #fff;
+               }
+       }
+}
diff --git a/deck.js/themes/style/swiss.css b/deck.js/themes/style/swiss.css
new file mode 100644 (file)
index 0000000..64f76ac
--- /dev/null
@@ -0,0 +1,84 @@
+.deck-container {
+  font-family: "Helvetica Neue", sans-serif;
+  font-size: 1.75em;
+  background: #fff;
+}
+.deck-container .slide {
+  background: #fff;
+}
+.deck-container .slide h1 {
+  color: #000;
+}
+.deck-container .slide h2 {
+  color: #c00;
+  border-bottom-color: #ccc;
+}
+.deck-container .slide h3 {
+  color: #888;
+}
+.deck-container .slide pre {
+  border-color: #ccc;
+}
+.deck-container .slide code {
+  color: #888;
+}
+.deck-container .slide blockquote {
+  font-size: 2em;
+  font-style: italic;
+  padding: 1em 2em;
+  color: #000;
+  border-left: 5px solid #ccc;
+}
+.deck-container .slide blockquote p {
+  margin: 0;
+}
+.deck-container .slide blockquote cite {
+  font-size: .5em;
+  font-style: normal;
+  font-weight: bold;
+  color: #888;
+}
+.deck-container .slide ::-moz-selection {
+  background: #c00;
+  color: #fff;
+}
+.deck-container .slide ::selection {
+  background: #c00;
+  color: #fff;
+}
+.deck-container .slide a, .deck-container .slide a:hover, .deck-container .slide a:focus, .deck-container .slide a:active, .deck-container .slide a:visited {
+  color: #c00;
+  text-decoration: none;
+}
+.deck-container .slide a:hover, .deck-container .slide a:focus {
+  text-decoration: underline;
+}
+.deck-container > .slide .deck-before, .deck-container > .slide .deck-previous {
+  opacity: 0.4;
+}
+.deck-container > .slide .deck-before:not(.deck-child-current) .deck-before, .deck-container > .slide .deck-before:not(.deck-child-current) .deck-previous, .deck-container > .slide .deck-previous:not(.deck-child-current) .deck-before, .deck-container > .slide .deck-previous:not(.deck-child-current) .deck-previous {
+  opacity: 1;
+}
+.deck-container > .slide .deck-child-current {
+  opacity: 1;
+}
+.deck-container .deck-prev-link, .deck-container .deck-next-link {
+  background: #ccc;
+  font-family: serif;
+}
+.deck-container .deck-prev-link, .deck-container .deck-prev-link:hover, .deck-container .deck-prev-link:focus, .deck-container .deck-prev-link:active, .deck-container .deck-prev-link:visited, .deck-container .deck-next-link, .deck-container .deck-next-link:hover, .deck-container .deck-next-link:focus, .deck-container .deck-next-link:active, .deck-container .deck-next-link:visited {
+  color: #fff;
+}
+.deck-container .deck-prev-link:hover, .deck-container .deck-prev-link:focus, .deck-container .deck-next-link:hover, .deck-container .deck-next-link:focus {
+  background: #c00;
+  text-decoration: none;
+}
+.deck-container .deck-status {
+  font-size: 0.6666em;
+}
+.deck-container.deck-menu .slide {
+  background: #eee;
+}
+.deck-container.deck-menu .deck-current, .no-touch .deck-container.deck-menu .slide:hover {
+  background: #ddf;
+}
diff --git a/deck.js/themes/style/swiss.scss b/deck.js/themes/style/swiss.scss
new file mode 100644 (file)
index 0000000..f9b0e76
--- /dev/null
@@ -0,0 +1,107 @@
+.deck-container {
+       font-family: "Helvetica Neue", sans-serif;
+       font-size:1.75em;
+       background:#fff;
+       
+       .slide {
+               background:#fff;
+               
+               h1 {
+                       color:#000;
+               }
+
+               h2 {
+                       color:#c00;
+                       border-bottom-color:#ccc;
+               }
+
+               h3 {
+                       color:#888;
+               }
+
+               pre {
+                       border-color:#ccc;
+               }
+
+               code {
+                       color:#888;
+               }
+
+               blockquote {
+                       font-size:2em;
+                       font-style:italic;
+                       padding:1em 2em;
+                       color:#000;
+                       border-left:5px solid #ccc;
+
+                       p {
+                               margin:0;
+                       }
+
+                       cite {
+                               font-size:.5em;
+                               font-style:normal;
+                               font-weight:bold;
+                               color:#888;
+                       }
+               }
+
+               ::-moz-selection{ background:#c00; color:#fff; }
+               ::selection { background:#c00; color:#fff; }
+
+               a {
+                       &, &:hover, &:focus, &:active, &:visited {
+                               color:#c00;
+                               text-decoration:none;
+                       }
+
+                       &:hover, &:focus {
+                               text-decoration:underline;
+                       }
+               }
+       }
+       
+       > .slide {
+               .deck-before, .deck-previous {
+                       opacity:0.4;
+                       
+                       &:not(.deck-child-current) {
+                               .deck-before, .deck-previous {
+                                       opacity:1;
+                               }
+                       }
+               }
+               
+               .deck-child-current {
+                       opacity:1;
+               }
+       } 
+       
+       .deck-prev-link, .deck-next-link {
+               background:#ccc;
+               font-family:serif; // sans-serif arrows x-browser fail
+               
+               &, &:hover, &:focus, &:active, &:visited {
+                       color:#fff;
+               }
+               
+               &:hover, &:focus {
+                       background:#c00;
+                       text-decoration:none;
+               }
+       }
+       
+       .deck-status {
+               font-size:0.6666em;
+       }
+       
+       &.deck-menu {
+               .slide {
+                       background:#eee;
+               }
+               
+               .deck-current, .no-touch & .slide:hover {
+                       background:#ddf;
+               }
+       }
+}
diff --git a/deck.js/themes/style/web-2.0.css b/deck.js/themes/style/web-2.0.css
new file mode 100644 (file)
index 0000000..a30bd6f
--- /dev/null
@@ -0,0 +1,214 @@
+@charset "UTF-8";
+.deck-container {
+  font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
+  font-size: 1.75em;
+  background: #f4fafe;
+  /* Old browsers */
+  background: -moz-linear-gradient(top, #f4fafe 0%, #ccf0f0 100%);
+  /* FF3.6+ */
+  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f4fafe), color-stop(100%, #ccf0f0));
+  /* Chrome,Safari4+ */
+  background: -webkit-linear-gradient(top, #f4fafe 0%, #ccf0f0 100%);
+  /* Chrome10+,Safari5.1+ */
+  background: -o-linear-gradient(top, #f4fafe 0%, #ccf0f0 100%);
+  /* Opera11.10+ */
+  background: -ms-linear-gradient(top, #f4fafe 0%, #ccf0f0 100%);
+  /* IE10+ */
+  background: linear-gradient(top, #f4fafe 0%, #ccf0f0 100%);
+  /* W3C */
+  background-attachment: fixed;
+}
+.deck-container > .slide {
+  text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5);
+}
+.deck-container > .slide .deck-before, .deck-container > .slide .deck-previous {
+  opacity: 0.4;
+}
+.deck-container > .slide .deck-before:not(.deck-child-current) .deck-before, .deck-container > .slide .deck-before:not(.deck-child-current) .deck-previous, .deck-container > .slide .deck-previous:not(.deck-child-current) .deck-before, .deck-container > .slide .deck-previous:not(.deck-child-current) .deck-previous {
+  opacity: 1;
+}
+.deck-container > .slide .deck-child-current {
+  opacity: 1;
+}
+.deck-container .slide h1, .deck-container .slide h2, .deck-container .slide h3, .deck-container .slide h4, .deck-container .slide h5, .deck-container .slide h6 {
+  font-family: "Hoefler Text", Constantia, Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
+}
+.deck-container .slide h1 {
+  color: #08455f;
+}
+.deck-container .slide h2 {
+  color: #0b7495;
+  border-bottom: 0;
+}
+.cssreflections .deck-container .slide h2 {
+  line-height: 1;
+  -webkit-box-reflect: below -0.556em -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(0.3, transparent), color-stop(0.7, rgba(255, 255, 255, 0.1)), to(transparent));
+  -moz-box-reflect: below -0.556em -moz-linear-gradient(top, transparent 0%, transparent 30%, rgba(255, 255, 255, 0.3) 100%);
+}
+.deck-container .slide h3 {
+  color: #000;
+}
+.deck-container .slide pre {
+  border-color: #cde;
+  background: #fff;
+  position: relative;
+  z-index: auto;
+  /* http://nicolasgallagher.com/css-drop-shadows-without-images/ */
+}
+.borderradius .deck-container .slide pre {
+  -webkit-border-radius: 5px;
+  -moz-border-radius: 5px;
+  border-radius: 5px;
+}
+.csstransforms.boxshadow .deck-container .slide pre > :first-child:before {
+  content: "";
+  position: absolute;
+  z-index: -1;
+  background: #fff;
+  top: 0;
+  bottom: 0;
+  left: 0;
+  right: 0;
+}
+.csstransforms.boxshadow .deck-container .slide pre:before, .csstransforms.boxshadow .deck-container .slide pre:after {
+  content: "";
+  position: absolute;
+  z-index: -2;
+  bottom: 15px;
+  width: 50%;
+  height: 20%;
+  max-width: 300px;
+  -webkit-box-shadow: 0 15px 10px rgba(0, 0, 0, 0.7);
+  -moz-box-shadow: 0 15px 10px rgba(0, 0, 0, 0.7);
+  box-shadow: 0 15px 10px rgba(0, 0, 0, 0.7);
+}
+.csstransforms.boxshadow .deck-container .slide pre:before {
+  left: 10px;
+  -webkit-transform: rotate(-3deg);
+  -moz-transform: rotate(-3deg);
+  -ms-transform: rotate(-3deg);
+  -o-transform: rotate(-3deg);
+  transform: rotate(-3deg);
+}
+.csstransforms.boxshadow .deck-container .slide pre:after {
+  right: 10px;
+  -webkit-transform: rotate(3deg);
+  -moz-transform: rotate(3deg);
+  -ms-transform: rotate(3deg);
+  -o-transform: rotate(3deg);
+  transform: rotate(3deg);
+}
+.deck-container .slide code {
+  color: #789;
+}
+.deck-container .slide blockquote {
+  font-family: "Hoefler Text", Constantia, Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
+  font-size: 2em;
+  padding: 1em 2em .5em 2em;
+  color: #000;
+  background: #fff;
+  position: relative;
+  border: 1px solid #cde;
+  z-index: auto;
+}
+.borderradius .deck-container .slide blockquote {
+  -webkit-border-radius: 5px;
+  -moz-border-radius: 5px;
+  border-radius: 5px;
+}
+.boxshadow .deck-container .slide blockquote > :first-child:before {
+  content: "";
+  position: absolute;
+  z-index: -1;
+  background: #fff;
+  top: 0;
+  bottom: 0;
+  left: 0;
+  right: 0;
+}
+.boxshadow .deck-container .slide blockquote:after {
+  content: "";
+  position: absolute;
+  z-index: -2;
+  top: 10px;
+  bottom: 10px;
+  left: 0;
+  right: 50%;
+  -moz-border-radius: 10px/100px;
+  border-radius: 10px/100px;
+  -webkit-box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
+  -moz-box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
+  box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
+}
+.deck-container .slide blockquote p {
+  margin: 0;
+}
+.deck-container .slide blockquote cite {
+  font-size: .5em;
+  font-style: normal;
+  font-weight: bold;
+  color: #888;
+}
+.deck-container .slide blockquote:before {
+  content: "“";
+  position: absolute;
+  top: 0;
+  left: 0;
+  font-size: 5em;
+  line-height: 1;
+  color: #ccf0f0;
+  z-index: 1;
+}
+.deck-container .slide ::-moz-selection {
+  background: #08455f;
+  color: #fff;
+}
+.deck-container .slide ::selection {
+  background: #08455f;
+  color: #fff;
+}
+.deck-container .slide a, .deck-container .slide a:hover, .deck-container .slide a:focus, .deck-container .slide a:active, .deck-container .slide a:visited {
+  color: #599;
+  text-decoration: none;
+}
+.deck-container .slide a:hover, .deck-container .slide a:focus {
+  text-decoration: underline;
+}
+.deck-container .deck-prev-link, .deck-container .deck-next-link {
+  background: #fff;
+  opacity: 0.5;
+}
+.deck-container .deck-prev-link, .deck-container .deck-prev-link:hover, .deck-container .deck-prev-link:focus, .deck-container .deck-prev-link:active, .deck-container .deck-prev-link:visited, .deck-container .deck-next-link, .deck-container .deck-next-link:hover, .deck-container .deck-next-link:focus, .deck-container .deck-next-link:active, .deck-container .deck-next-link:visited {
+  color: #599;
+}
+.deck-container .deck-prev-link:hover, .deck-container .deck-prev-link:focus, .deck-container .deck-next-link:hover, .deck-container .deck-next-link:focus {
+  opacity: 1;
+  text-decoration: none;
+}
+.deck-container .deck-status {
+  font-size: 0.6666em;
+}
+.deck-container.deck-menu .slide {
+  background: transparent;
+  -webkit-border-radius: 5px;
+  -moz-border-radius: 5px;
+  border-radius: 5px;
+}
+.rgba .deck-container.deck-menu .slide {
+  background: rgba(0, 0, 0, 0.1);
+}
+.deck-container.deck-menu .slide.deck-current, .rgba .deck-container.deck-menu .slide.deck-current, .no-touch .deck-container.deck-menu .slide:hover {
+  background: #fff;
+}
+.deck-container .goto-form {
+  background: #fff;
+  border: 1px solid #cde;
+  -webkit-border-radius: 5px;
+  -moz-border-radius: 5px;
+  border-radius: 5px;
+}
+.boxshadow .deck-container .goto-form {
+  -webkit-box-shadow: 0 15px 10px -10px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
+  -moz-box-shadow: 0 15px 10px -10px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
+  box-shadow: 0 15px 10px -10px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
+}
diff --git a/deck.js/themes/style/web-2.0.scss b/deck.js/themes/style/web-2.0.scss
new file mode 100644 (file)
index 0000000..2b36fae
--- /dev/null
@@ -0,0 +1,250 @@
+@mixin border-radius($r) {
+       -webkit-border-radius:$r;
+       -moz-border-radius:$r;
+       border-radius:$r;
+}
+
+@mixin rotate($deg) {
+       -webkit-transform:rotate($deg);    
+       -moz-transform:rotate($deg);   
+       -ms-transform:rotate($deg);   
+       -o-transform:rotate($deg);
+       transform:rotate($deg);
+}
+
+@mixin box-shadow($x, $y, $blur, $color) {
+       -webkit-box-shadow:$x $y $blur $color;
+       -moz-box-shadow:$x $y $blur $color;
+       box-shadow:$x $y $blur $color;
+}
+
+
+.deck-container {
+       font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
+       font-size:1.75em;
+       background: rgb(244,250,254); /* Old browsers */
+       background: -moz-linear-gradient(top, rgba(244,250,254,1) 0%, rgba(204,240,240,1) 100%); /* FF3.6+ */
+       background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(244,250,254,1)), color-stop(100%,rgba(204,240,240,1))); /* Chrome,Safari4+ */
+       background: -webkit-linear-gradient(top, rgba(244,250,254,1) 0%,rgba(204,240,240,1) 100%); /* Chrome10+,Safari5.1+ */
+       background: -o-linear-gradient(top, rgba(244,250,254,1) 0%,rgba(204,240,240,1) 100%); /* Opera11.10+ */
+       background: -ms-linear-gradient(top, rgba(244,250,254,1) 0%,rgba(204,240,240,1) 100%); /* IE10+ */
+       background: linear-gradient(top, rgba(244,250,254,1) 0%,rgba(204,240,240,1) 100%); /* W3C */
+       background-attachment: fixed;
+       
+       > .slide {
+               text-shadow:1px 1px 1px rgba(255,255,255,.5);
+               
+               .deck-before, .deck-previous {
+                       opacity:0.4;
+                       
+                       &:not(.deck-child-current) {
+                               .deck-before, .deck-previous {
+                                       opacity:1;
+                               }
+                       }
+               }
+               
+               .deck-child-current {
+                       opacity:1;
+               }
+       }
+       
+       .slide {
+               h1, h2, h3, h4, h5, h6 {
+                       font-family: "Hoefler Text", Constantia, Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
+               }
+
+               h1 {
+                       color:#08455f;
+               }
+
+               h2 {
+                       color:#0b7495;
+                       border-bottom:0;
+
+                       .cssreflections & {
+                               line-height:1;
+                               -webkit-box-reflect:below -0.5555em -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(0.3, transparent), color-stop(0.7, rgba(255,255,255,.1)), to(transparent));
+                               -moz-box-reflect:below -0.5555em -moz-linear-gradient(top, transparent 0%, transparent 30%, rgba(255,255,255,.3) 100%);
+                       }
+               }
+
+               h3 {
+                       color:#000;
+               }
+
+               pre {
+                       border-color:#cde;
+                       background:#fff;
+                       position:relative;
+                       z-index:auto;
+
+                       .borderradius & {
+                               @include border-radius(5px);
+                       }
+
+                       /* http://nicolasgallagher.com/css-drop-shadows-without-images/ */
+                       .csstransforms.boxshadow & {
+                               > :first-child:before {
+                                       content:"";
+                                       position:absolute;
+                                       z-index:-1;
+                                       background:#fff;
+                                       top:0;
+                                       bottom:0;
+                                       left:0;
+                                       right:0;
+                               }
+
+                               &:before, &:after {
+                                       content:"";
+                                       position:absolute;
+                                       z-index:-2;
+                                       bottom:15px;
+                                       width:50%;
+                                       height:20%;
+                                       max-width:300px;
+                                       @include box-shadow(0, 15px, 10px, rgba(0, 0, 0, 0.7));
+                               }
+
+                               &:before {
+                                       left:10px;
+                                       @include rotate(-3deg);
+                               }
+
+                               &:after {
+                                       right:10px;
+                                       @include rotate(3deg);
+                               }
+                       }
+               }
+
+               code {
+                       color:#789;
+               }
+
+               blockquote {
+                       font-family: "Hoefler Text", Constantia, Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
+                       font-size:2em;
+                       padding:1em 2em .5em 2em;
+                       color:#000;
+                       background:#fff;
+                       position:relative;
+                       border:1px solid #cde;
+                       z-index:auto;
+
+                       .borderradius & {
+                               @include border-radius(5px);
+                       }
+
+                       .boxshadow & {
+                               > :first-child:before {
+                                       content:"";
+                                       position:absolute;
+                                       z-index:-1;
+                                       background:#fff;
+                                       top:0;
+                                       bottom:0;
+                                       left:0;
+                                       right:0;
+                               }
+
+                               &:after {
+                                       content:"";
+                                       position:absolute;
+                                       z-index:-2;
+                                       top: 10px;
+                                       bottom: 10px;
+                                       left: 0;
+                                       right: 50%;
+                                       -moz-border-radius: 10px / 100px;
+                                       border-radius: 10px / 100px;
+                                       @include box-shadow(0, 0, 15px, rgba(0,0,0,0.6));
+                               }
+                       }
+
+                       p {
+                               margin:0;
+                       }
+
+                       cite {
+                               font-size:.5em;
+                               font-style:normal;
+                               font-weight:bold;
+                               color:#888;
+                       }
+
+                       &:before {
+                               content:"“";
+                               position:absolute;
+                               top:0;
+                               left:0;
+                               font-size:5em;
+                               line-height:1;
+                               color:#ccf0f0;
+                               z-index:1;
+                       }
+               }
+
+               ::-moz-selection{ background:#08455f; color:#fff; }
+               ::selection { background:#08455f; color:#fff; }
+
+               a {
+                       &, &:hover, &:focus, &:active, &:visited {
+                               color:#599;
+                               text-decoration:none;
+                       }
+
+                       &:hover, &:focus {
+                               text-decoration:underline;
+                       }
+               }
+       }
+       
+       .deck-prev-link, .deck-next-link {
+               background:#fff;
+               opacity:0.5;
+
+               &, &:hover, &:focus, &:active, &:visited {
+                       color:#599;
+               }
+
+               &:hover, &:focus {
+                       opacity:1;
+                       text-decoration:none;
+               }
+       }
+       
+       .deck-status {
+               font-size:0.6666em;
+       }
+       
+       &.deck-menu {
+               .slide {
+                       background:transparent;
+                       @include border-radius(5px);
+                       
+                       .rgba & {
+                               background:rgba(0,0,0,.1);
+                       }
+                       
+                       &.deck-current, .rgba &.deck-current, .no-touch &:hover {
+                               background:#fff;
+                       }
+               }
+       }
+       
+       .goto-form {
+               background:#fff;
+               border:1px solid #cde;
+               @include border-radius(5px);
+               
+               .boxshadow & {
+                       -webkit-box-shadow: 0 15px 10px -10px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
+                       -moz-box-shadow: 0 15px 10px -10px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
+                       box-shadow: 0 15px 10px -10px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
+               }
+       }
+}
+
+
diff --git a/deck.js/themes/transition/fade.css b/deck.js/themes/transition/fade.css
new file mode 100644 (file)
index 0000000..3c3fa2d
--- /dev/null
@@ -0,0 +1,43 @@
+.csstransitions.csstransforms .deck-container .slide {
+  -webkit-transition: opacity 500ms ease-in-out 0ms;
+  -moz-transition: opacity 500ms ease-in-out 0ms;
+  -ms-transition: opacity 500ms ease-in-out 0ms;
+  -o-transition: opacity 500ms ease-in-out 0ms;
+  transition: opacity 500ms ease-in-out 0ms;
+}
+.csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide {
+  position: absolute;
+  top: 0;
+  left: 0;
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+  width: 100%;
+  padding: 0 48px;
+}
+.csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .slide {
+  position: relative;
+  left: 0;
+  top: 0;
+}
+.csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .deck-next, .csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .deck-after {
+  opacity: 0;
+}
+.csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .deck-current {
+  opacity: 1;
+}
+.csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-previous, .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-before, .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-next, .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-after {
+  opacity: 0;
+  pointer-events: none;
+}
+.csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-before .slide, .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-previous .slide {
+  visibility: visible;
+}
+.csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-child-current {
+  opacity: 1;
+  visibility: visible;
+  pointer-events: auto;
+}
+.csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-child-current .deck-next, .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-child-current .deck-after {
+  visibility: hidden;
+}
diff --git a/deck.js/themes/transition/fade.scss b/deck.js/themes/transition/fade.scss
new file mode 100644 (file)
index 0000000..7612629
--- /dev/null
@@ -0,0 +1,69 @@
+@mixin translate($x: 0, $y: 0, $z: 0) {
+       -webkit-transform:translate3d($x, $y, $z);
+       -moz-transform:translate($x, $y);
+       -ms-transform:translate($x, $y);
+       -o-transform:translate($x, $y);
+       transform:translate3d($x, $y, $z);
+}
+
+@mixin transition($prop, $duration, $easing: ease-in-out, $delay: 0ms) {
+       -webkit-transition:$prop $duration $easing $delay;
+       -moz-transition:$prop $duration $easing $delay;
+       -ms-transition:$prop $duration $easing $delay;
+       -o-transition:$prop $duration $easing $delay;
+       transition:$prop $duration $easing $delay;
+}
+
+.csstransitions.csstransforms {
+       .deck-container .slide {
+               @include transition(opacity, 500ms);
+       }
+       
+       .deck-container:not(.deck-menu) {
+               > .slide {
+                       position:absolute;
+                       top:0;
+                       left:0;
+                       -webkit-box-sizing: border-box;
+                       -moz-box-sizing: border-box;
+                       box-sizing: border-box;
+                       width:100%;
+                       padding:0 48px;
+                       
+                       .slide {
+                               position:relative;
+                               left:0;
+                               top:0;
+                       }
+                       
+                       .deck-next, .deck-after {
+                               opacity:0;
+                       }
+                       
+                       .deck-current {
+                               opacity:1;
+                       }
+               }
+
+               > .deck-previous, > .deck-before, > .deck-next, > .deck-after {
+                       opacity:0;
+                       pointer-events:none;
+               }
+               
+               > .deck-before, > .deck-previous {
+                       .slide {
+                               visibility:visible;
+                       }
+               }
+
+               > .deck-child-current {
+                       opacity:1;
+                       visibility:visible;
+                       pointer-events:auto;
+                       
+                       .deck-next, .deck-after {
+                               visibility:hidden;
+                       }
+               }
+       }
+}
diff --git a/deck.js/themes/transition/horizontal-slide.css b/deck.js/themes/transition/horizontal-slide.css
new file mode 100644 (file)
index 0000000..4a4c6ad
--- /dev/null
@@ -0,0 +1,76 @@
+.csstransitions.csstransforms {
+  overflow-x: hidden;
+}
+.csstransitions.csstransforms .deck-container > .slide {
+  -webkit-transition: -webkit-transform 500ms ease-in-out;
+  -moz-transition: -moz-transform 500ms ease-in-out;
+  -ms-transition: -ms-transform 500ms ease-in-out;
+  -o-transition: -o-transform 500ms ease-in-out;
+  transition: transform 500ms ease-in-out;
+}
+.csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide {
+  position: absolute;
+  top: 0;
+  left: 0;
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+  width: 100%;
+  padding: 0 48px;
+}
+.csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .slide {
+  position: relative;
+  left: 0;
+  top: 0;
+  -webkit-transition: -webkit-transform 500ms ease-in-out, opacity 500ms ease-in-out;
+  -moz-transition: -moz-transform 500ms ease-in-out, opacity 500ms ease-in-out;
+  -ms-transition: -ms-transform 500ms ease-in-out, opacity 500ms ease-in-out;
+  -o-transition: -o-transform 500ms ease-in-out, opacity 500ms ease-in-out;
+  transition: -webkit-transform 500ms ease-in-out, opacity 500ms ease-in-out;
+}
+.csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .deck-next, .csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .deck-after {
+  visibility: visible;
+  -webkit-transform: translate3d(200%, 0, 0);
+  -moz-transform: translate(200%, 0);
+  -ms-transform: translate(200%, 0);
+  -o-transform: translate(200%, 0);
+  transform: translate3d(200%, 0, 0);
+}
+.csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-previous {
+  -webkit-transform: translate3d(-200%, 0, 0);
+  -moz-transform: translate(-200%, 0);
+  -ms-transform: translate(-200%, 0);
+  -o-transform: translate(-200%, 0);
+  transform: translate3d(-200%, 0, 0);
+}
+.csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-before {
+  -webkit-transform: translate3d(-400%, 0, 0);
+  -moz-transform: translate(-400%, 0);
+  -ms-transform: translate(-400%, 0);
+  -o-transform: translate(-400%, 0);
+  transform: translate3d(-400%, 0, 0);
+}
+.csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-next {
+  -webkit-transform: translate3d(200%, 0, 0);
+  -moz-transform: translate(200%, 0);
+  -ms-transform: translate(200%, 0);
+  -o-transform: translate(200%, 0);
+  transform: translate3d(200%, 0, 0);
+}
+.csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-after {
+  -webkit-transform: translate3d(400%, 0, 0);
+  -moz-transform: translate(400%, 0);
+  -ms-transform: translate(400%, 0);
+  -o-transform: translate(400%, 0);
+  transform: translate3d(400%, 0, 0);
+}
+.csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-before .slide, .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-previous .slide {
+  visibility: visible;
+}
+.csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-child-current {
+  -webkit-transform: none;
+  -moz-transform: none;
+  -ms-transform: none;
+  -o-transform: none;
+  transform: none;
+}
diff --git a/deck.js/themes/transition/horizontal-slide.scss b/deck.js/themes/transition/horizontal-slide.scss
new file mode 100644 (file)
index 0000000..c260bbc
--- /dev/null
@@ -0,0 +1,90 @@
+@mixin translate($x: 0, $y: 0, $z: 0) {
+       -webkit-transform:translate3d($x, $y, $z);
+       -moz-transform:translate($x, $y);
+       -ms-transform:translate($x, $y);
+       -o-transform:translate($x, $y);
+       transform:translate3d($x, $y, $z);
+}
+
+@mixin transition($prop, $duration, $easing: ease-in-out, $delay: 0ms) {
+       -webkit-transition:$prop $duration $easing $delay;
+       -moz-transition:$prop $duration $easing $delay;
+       -ms-transition:$prop $duration $easing $delay;
+       -o-transition:$prop $duration $easing $delay;
+       transition:$prop $duration $easing $delay;
+}
+
+@mixin transform($val) {
+       -webkit-transform:$val;
+       -moz-transform:$val;
+       -ms-transform:$val;
+       -o-transform:$val;
+       transform:$val;
+}
+
+.csstransitions.csstransforms {
+       overflow-x:hidden;
+       
+       .deck-container > .slide {
+               -webkit-transition:-webkit-transform 500ms ease-in-out;
+               -moz-transition:-moz-transform 500ms ease-in-out;
+               -ms-transition:-ms-transform 500ms ease-in-out;
+               -o-transition:-o-transform 500ms ease-in-out;
+               transition:transform 500ms ease-in-out;
+       }
+       
+       .deck-container:not(.deck-menu) {
+               > .slide {
+                       position:absolute;
+                       top:0;
+                       left:0;
+                       -webkit-box-sizing: border-box;
+                       -moz-box-sizing: border-box;
+                       box-sizing: border-box;
+                       width:100%;
+                       padding:0 48px;
+                       
+                       .slide {
+                               position:relative;
+                               left:0;
+                               top:0;
+                               -webkit-transition:-webkit-transform 500ms ease-in-out, opacity 500ms ease-in-out;
+                               -moz-transition:-moz-transform 500ms ease-in-out, opacity 500ms ease-in-out;
+                               -ms-transition:-ms-transform 500ms ease-in-out, opacity 500ms ease-in-out;
+                               -o-transition:-o-transform 500ms ease-in-out, opacity 500ms ease-in-out;
+                               transition:-webkit-transform 500ms ease-in-out, opacity 500ms ease-in-out;
+                       }
+
+                       .deck-next, .deck-after {
+                               visibility:visible;
+                               @include translate(200%);
+                       }
+               }
+
+               > .deck-previous {
+                       @include translate(-200%);
+               }
+
+               > .deck-before {
+                       @include translate(-400%);
+               }
+
+               > .deck-next {
+                       @include translate(200%);
+               }
+
+               > .deck-after {
+                       @include translate(400%);
+               }
+               
+               > .deck-before, > .deck-previous {
+                       .slide {
+                               visibility:visible;
+                       }
+               }
+
+               > .deck-child-current {
+                       @include transform(none);
+               }
+       }
+}
\ No newline at end of file
diff --git a/deck.js/themes/transition/vertical-slide.css b/deck.js/themes/transition/vertical-slide.css
new file mode 100644 (file)
index 0000000..7f87092
--- /dev/null
@@ -0,0 +1,94 @@
+.csstransitions.csstransforms .deck-container {
+  overflow-y: hidden;
+}
+.csstransitions.csstransforms .deck-container > .slide {
+  -webkit-transition: -webkit-transform 500ms ease-in-out;
+  -moz-transition: -moz-transform 500ms ease-in-out;
+  -ms-transition: -ms-transform 500ms ease-in-out;
+  -o-transition: -o-transform 500ms ease-in-out;
+  transition: transform 500ms ease-in-out;
+}
+.csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide {
+  position: absolute;
+  top: 0;
+  left: 0;
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+  width: 100%;
+  padding: 0 48px;
+}
+.csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .slide {
+  position: relative;
+  left: 0;
+  top: 0;
+  -webkit-transition: -webkit-transform 500ms ease-in-out, opacity 500ms ease-in-out;
+  -moz-transition: -moz-transform 500ms ease-in-out, opacity 500ms ease-in-out;
+  -ms-transition: -ms-transform 500ms ease-in-out, opacity 500ms ease-in-out;
+  -o-transition: -o-transform 500ms ease-in-out, opacity 500ms ease-in-out;
+  transition: -webkit-transform 500ms ease-in-out, opacity 500ms ease-in-out;
+}
+.csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .deck-next, .csstransitions.csstransforms .deck-container:not(.deck-menu) > .slide .deck-after {
+  visibility: visible;
+  -webkit-transform: translate3d(0, 1600px, 0);
+  -moz-transform: translate(0, 1600px);
+  -ms-transform: translate(0, 1600px);
+  -o-transform: translate(0, 1600px);
+  transform: translate3d(0, 1600px, 0);
+}
+.csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-previous {
+  -webkit-transform: translate3d(0, -200%, 0);
+  -moz-transform: translate(0, -200%);
+  -ms-transform: translate(0, -200%);
+  -o-transform: translate(0, -200%);
+  transform: translate3d(0, -200%, 0);
+}
+.csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-before {
+  -webkit-transform: translate3d(0, -400%, 0);
+  -moz-transform: translate(0, -400%);
+  -ms-transform: translate(0, -400%);
+  -o-transform: translate(0, -400%);
+  transform: translate3d(0, -400%, 0);
+}
+.csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-next {
+  -webkit-transform: translate3d(0, 200%, 0);
+  -moz-transform: translate(0, 200%);
+  -ms-transform: translate(0, 200%);
+  -o-transform: translate(0, 200%);
+  transform: translate3d(0, 200%, 0);
+}
+.csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-after {
+  -webkit-transform: translate3d(0, 400%, 0);
+  -moz-transform: translate(0, 400%);
+  -ms-transform: translate(0, 400%);
+  -o-transform: translate(0, 400%);
+  transform: translate3d(0, 400%, 0);
+}
+.csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-before .slide, .csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-previous .slide {
+  visibility: visible;
+}
+.csstransitions.csstransforms .deck-container:not(.deck-menu) > .deck-child-current {
+  -webkit-transform: none;
+  -moz-transform: none;
+  -ms-transform: none;
+  -o-transform: none;
+  transform: none;
+}
+.csstransitions.csstransforms .deck-prev-link {
+  left: auto;
+  right: 8px;
+  top: 59px;
+  -webkit-transform: rotate(90deg);
+  -moz-transform: rotate(90deg);
+  -ms-transform: rotate(90deg);
+  -o-transform: rotate(90deg);
+  transform: rotate(90deg);
+}
+.csstransitions.csstransforms .deck-next-link {
+  top: 99px;
+  -webkit-transform: rotate(90deg);
+  -moz-transform: rotate(90deg);
+  -ms-transform: rotate(90deg);
+  -o-transform: rotate(90deg);
+  transform: rotate(90deg);
+}
diff --git a/deck.js/themes/transition/vertical-slide.scss b/deck.js/themes/transition/vertical-slide.scss
new file mode 100644 (file)
index 0000000..c6892c3
--- /dev/null
@@ -0,0 +1,112 @@
+@mixin translate($x: 0, $y: 0, $z: 0) {
+       -webkit-transform:translate3d($x, $y, $z);
+       -moz-transform:translate($x, $y);
+       -ms-transform:translate($x, $y);
+       -o-transform:translate($x, $y);
+       transform:translate3d($x, $y, $z);
+}
+
+@mixin rotate($deg) {
+       -webkit-transform:rotate($deg);
+       -moz-transform:rotate($deg);
+       -ms-transform:rotate($deg);
+       -o-transform:rotate($deg);
+       transform:rotate($deg);
+}
+
+@mixin transition($prop, $duration, $easing: ease-in-out, $delay: 0ms) {
+       -webkit-transition:$prop $duration $easing $delay;
+       -moz-transition:$prop $duration $easing $delay;
+       -ms-transition:$prop $duration $easing $delay;
+       -o-transition:$prop $duration $easing $delay;
+       transition:$prop $duration $easing $delay;
+}
+
+@mixin transform($val) {
+       -webkit-transform:$val;
+       -moz-transform:$val;
+       -ms-transform:$val;
+       -o-transform:$val;
+       transform:$val;
+}
+
+.csstransitions.csstransforms {
+       .deck-container {
+               overflow-y:hidden;
+               
+               > .slide {
+                       -webkit-transition:-webkit-transform 500ms ease-in-out;
+                       -moz-transition:-moz-transform 500ms ease-in-out;
+                       -ms-transition:-ms-transform 500ms ease-in-out;
+                       -o-transition:-o-transform 500ms ease-in-out;
+                       transition:transform 500ms ease-in-out;
+               }
+       }
+       
+       .deck-container:not(.deck-menu) {
+               > .slide {
+                       position:absolute;
+                       top:0;
+                       left:0;
+                       -webkit-box-sizing: border-box;
+                       -moz-box-sizing: border-box;
+                       box-sizing: border-box;
+                       width:100%;
+                       padding:0 48px;
+                       
+                       .slide {
+                               position:relative;
+                               left:0;
+                               top:0;
+                               -webkit-transition:-webkit-transform 500ms ease-in-out, opacity 500ms ease-in-out;
+                               -moz-transition:-moz-transform 500ms ease-in-out, opacity 500ms ease-in-out;
+                               -ms-transition:-ms-transform 500ms ease-in-out, opacity 500ms ease-in-out;
+                               -o-transition:-o-transform 500ms ease-in-out, opacity 500ms ease-in-out;
+                               transition:-webkit-transform 500ms ease-in-out, opacity 500ms ease-in-out;
+                       }
+
+                       .deck-next, .deck-after {
+                               visibility:visible;
+                               @include translate(0, 1600px);
+                       }
+               }
+
+               > .deck-previous {
+                       @include translate(0, -200%);
+               }
+
+               > .deck-before {
+                       @include translate(0, -400%);
+               }
+
+               > .deck-next {
+                       @include translate(0, 200%);
+               }
+
+               > .deck-after {
+                       @include translate(0, 400%);
+               }
+               
+               > .deck-before, > .deck-previous {
+                       .slide {
+                               visibility:visible;
+                       }
+               }
+
+               > .deck-child-current {
+                       @include transform(none);
+               }
+       }
+       
+       .deck-prev-link {
+               left:auto;
+               right:8px;
+               top:59px;
+               @include rotate(90deg);
+       }
+       
+       .deck-next-link {
+               top:99px;
+               @include rotate(90deg);
+       }
+}
\ No newline at end of file
diff --git a/index.html b/index.html
new file mode 100644 (file)
index 0000000..17b8b45
--- /dev/null
@@ -0,0 +1,164 @@
+<!DOCTYPE html>
+<html>
+<head>
+       <meta charset="utf-8">
+       <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+       <meta name="viewport" content="width=1024, user-scalable=no">
+
+       <title>GDB tips &amp; tricks - ResaCON 2012</title>
+       
+       <!-- Required stylesheet -->
+       <link rel="stylesheet" href="deck.js/core/deck.core.css">
+       
+       <!-- Extension CSS files go here. Remove or add as needed. -->
+       <link rel="stylesheet" href="deck.js/extensions/goto/deck.goto.css">
+       <link rel="stylesheet" href="deck.js/extensions/menu/deck.menu.css">
+       <link rel="stylesheet" href="deck.js/extensions/navigation/deck.navigation.css">
+       <link rel="stylesheet" href="deck.js/extensions/status/deck.status.css">
+       <link rel="stylesheet" href="deck.js/extensions/hash/deck.hash.css">
+       <link rel="stylesheet" href="deck.js/extensions/scale/deck.scale.css">
+
+       <!-- Style theme. More available in /themes/style/ or create your own. -->
+       <link rel="stylesheet" href="resacon.css">
+       <!-- <link rel="stylesheet" href="deck.js/themes/style/web-2.0.css"> -->
+       <!-- <link rel="stylesheet" href="deck.js/themes/style/neon.css"> -->
+       <!-- <link rel="stylesheet" href="deck.js/themes/style/swiss.css"> -->
+       
+       <!-- Transition theme. More available in /themes/transition/ or create your own. -->
+       <link rel="stylesheet" href="deck.js/themes/transition/horizontal-slide.css">
+       
+       <!-- Required Modernizr file -->
+       <script src="deck.js/modernizr.custom.js"></script>
+</head>
+<body class="deck-container">
+
+<!-- Begin slides. Just make elements with a class of slide. -->
+
+<section class="slide">
+       <h1>GDB: tips and tricks</h1>
+</section>
+
+<section class="slide">
+       <h2>But... why?</h2>
+       <blockquote>
+           <p>It's 2012. Why the fuck are you talking about gdb?</p>
+           <p><cite>Probably you, right now</cite></p>
+       </blockquote>
+       <img src="oh_god_why.png" width="500">
+
+</section>
+
+<section class="slide">
+       <h2> Well, maybe... </h2>
+       <img src="stallman.jpg" width="500">
+       <p> You love Richard Stallman (isn't he lovely? :D) </p>
+</section>
+
+<section class="slide">
+       <h2> Well, maybe... </h2>
+       <img src="cool_story_bro2.jpg">
+       <p> You think something like an IDE is a complex amalgamation of state, hard to understand, and prone to fail in unexpected ways</p>
+</section>
+
+<section class="slide">
+       <h2> Well, maybe... </h2>
+       <img src="visual_studio.jpg" width="1000">
+</section>
+
+<section class="slide">
+       <h2> Anyway... </h2>
+       <h1> GDB can do interesting things </h1>
+</section>
+
+<section class="slide">
+       <h2>Fun with breakpoints!</h2>
+       <h3>Conditional breakpoints</h3>
+<pre>
+break myfile.cpp:99 if x &gt; 0
+</pre>
+       <p class="slide">Not so interesting</p>
+</section>
+
+<section class="slide">
+       <h2> Fun with breakpoints! </h2>
+       <h3>Breakpoint actions</h3>
+<pre>
+break myfile.cpp:99
+Breakpoint 1 at 0x401193: file myfile.c, line 99.
+(gdb) commands
+Type commands for breakpoint(s) 1, one per line.
+End with a line saying just "end".
+&gt;silent
+&gt;print a
+&gt;cont
+&gt;end
+</pre>
+<p>I called this <a href="http://slackito.com/2011/12/09/poor-mans-tracepoints-with-gdb/">"Poor man's tracepoints"</a> in a blog post some years ago</p>
+</section>
+
+<section class="slide">
+       <h2> Custom commands </h2>
+<pre>
+(gdb) define plist
+Type commands for definition of "plist".
+End with a line saying just "end".
+>set $ptr = $arg0
+>while $ptr != 0
+ >print *$ptr
+ >set $ptr = $ptr->next
+ >end
+>end
+</pre>
+</section>
+
+<!-- End slides. -->
+
+
+<!-- Begin extension snippets. Add or remove as needed. -->
+
+<!-- deck.navigation snippet -->
+<a href="#" class="deck-prev-link" title="Previous">&#8592;</a>
+<a href="#" class="deck-next-link" title="Next">&#8594;</a>
+
+<!-- deck.status snippet -->
+<p class="deck-status">
+       <span class="deck-status-current"></span>
+       /
+       <span class="deck-status-total"></span>
+</p>
+
+<!-- deck.goto snippet -->
+<form action="." method="get" class="goto-form">
+       <label for="goto-slide">Go to slide:</label>
+       <input type="text" name="slidenum" id="goto-slide" list="goto-datalist">
+       <datalist id="goto-datalist"></datalist>
+       <input type="submit" value="Go">
+</form>
+
+<!-- deck.hash snippet -->
+<a href="." title="Permalink to this slide" class="deck-permalink">#</a>
+
+<!-- End extension snippets. -->
+
+
+<!-- Required JS files. -->
+<script src="deck.js/jquery-1.7.2.min.js"></script>
+<script src="deck.js/core/deck.core.js"></script>
+
+<!-- Extension JS files. Add or remove as needed. -->
+<script src="deck.js/core/deck.core.js"></script>
+<script src="deck.js/extensions/hash/deck.hash.js"></script>
+<script src="deck.js/extensions/menu/deck.menu.js"></script>
+<script src="deck.js/extensions/goto/deck.goto.js"></script>
+<script src="deck.js/extensions/status/deck.status.js"></script>
+<script src="deck.js/extensions/navigation/deck.navigation.js"></script>
+<script src="deck.js/extensions/scale/deck.scale.js"></script>
+
+<!-- Initialize the deck. You can put this in an external file if desired. -->
+<script>
+       $(function() {
+               $.deck('.slide');
+       });
+</script>
+</body>
+</html>
diff --git a/oh_god_why.png b/oh_god_why.png
new file mode 100644 (file)
index 0000000..2b724f5
Binary files /dev/null and b/oh_god_why.png differ
diff --git a/resacon.css b/resacon.css
new file mode 100644 (file)
index 0000000..8df2534
--- /dev/null
@@ -0,0 +1,216 @@
+@charset "UTF-8";
+.deck-container {
+  font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
+  font-size: 1.75em;
+  background: #f4fafe;
+  /* Old browsers */
+  background: -moz-linear-gradient(top, #f4fafe 0%, #ccf0f0 100%);
+  /* FF3.6+ */
+  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f4fafe), color-stop(100%, #ccf0f0));
+  /* Chrome,Safari4+ */
+  background: -webkit-linear-gradient(top, #f4fafe 0%, #ccf0f0 100%);
+  /* Chrome10+,Safari5.1+ */
+  background: -o-linear-gradient(top, #f4fafe 0%, #ccf0f0 100%);
+  /* Opera11.10+ */
+  background: -ms-linear-gradient(top, #f4fafe 0%, #ccf0f0 100%);
+  /* IE10+ */
+  background: linear-gradient(top, #f4fafe 0%, #ccf0f0 100%);
+  /* W3C */
+  background-attachment: fixed;
+}
+.deck-container > .slide {
+  text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5);
+  text-align: center;
+}
+.deck-container > .slide .deck-before, .deck-container > .slide .deck-previous {
+  opacity: 0.4;
+}
+.deck-container > .slide .deck-before:not(.deck-child-current) .deck-before, .deck-container > .slide .deck-before:not(.deck-child-current) .deck-previous, .deck-container > .slide .deck-previous:not(.deck-child-current) .deck-before, .deck-container > .slide .deck-previous:not(.deck-child-current) .deck-previous {
+  opacity: 1;
+}
+.deck-container > .slide .deck-child-current {
+  opacity: 1;
+}
+.deck-container .slide h1, .deck-container .slide h2, .deck-container .slide h3, .deck-container .slide h4, .deck-container .slide h5, .deck-container .slide h6 {
+  font-family: "Hoefler Text", Constantia, Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
+}
+.deck-container .slide h1 {
+  color: #08455f;
+}
+.deck-container .slide h2 {
+  color: #0b7495;
+  border-bottom: 0;
+}
+.cssreflections .deck-container .slide h2 {
+  line-height: 1;
+  -webkit-box-reflect: below -0.556em -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(0.3, transparent), color-stop(0.7, rgba(255, 255, 255, 0.1)), to(transparent));
+  -moz-box-reflect: below -0.556em -moz-linear-gradient(top, transparent 0%, transparent 30%, rgba(255, 255, 255, 0.3) 100%);
+}
+.deck-container .slide h3 {
+  color: #000;
+}
+.deck-container .slide pre {
+  border-color: #cde;
+  background: #fff;
+  position: relative;
+  z-index: auto;
+  /* http://nicolasgallagher.com/css-drop-shadows-without-images/ */
+}
+.borderradius .deck-container .slide pre {
+  -webkit-border-radius: 5px;
+  -moz-border-radius: 5px;
+  border-radius: 5px;
+  text-align: left;
+}
+.csstransforms.boxshadow .deck-container .slide pre > :first-child:before {
+  content: "";
+  position: absolute;
+  z-index: -1;
+  background: #fff;
+  top: 0;
+  bottom: 0;
+  left: 0;
+  right: 0;
+}
+.csstransforms.boxshadow .deck-container .slide pre:before, .csstransforms.boxshadow .deck-container .slide pre:after {
+  content: "";
+  position: absolute;
+  z-index: -2;
+  bottom: 15px;
+  width: 50%;
+  height: 20%;
+  max-width: 300px;
+  -webkit-box-shadow: 0 15px 10px rgba(0, 0, 0, 0.7);
+  -moz-box-shadow: 0 15px 10px rgba(0, 0, 0, 0.7);
+  box-shadow: 0 15px 10px rgba(0, 0, 0, 0.7);
+}
+.csstransforms.boxshadow .deck-container .slide pre:before {
+  left: 10px;
+  -webkit-transform: rotate(-3deg);
+  -moz-transform: rotate(-3deg);
+  -ms-transform: rotate(-3deg);
+  -o-transform: rotate(-3deg);
+  transform: rotate(-3deg);
+}
+.csstransforms.boxshadow .deck-container .slide pre:after {
+  right: 10px;
+  -webkit-transform: rotate(3deg);
+  -moz-transform: rotate(3deg);
+  -ms-transform: rotate(3deg);
+  -o-transform: rotate(3deg);
+  transform: rotate(3deg);
+}
+.deck-container .slide code {
+  color: #789;
+}
+.deck-container .slide blockquote {
+  font-family: "Hoefler Text", Constantia, Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
+  font-size: 2em;
+  padding: 1em 2em .5em 2em;
+  color: #000;
+  background: #fff;
+  position: relative;
+  border: 1px solid #cde;
+  z-index: auto;
+}
+.borderradius .deck-container .slide blockquote {
+  -webkit-border-radius: 5px;
+  -moz-border-radius: 5px;
+  border-radius: 5px;
+}
+.boxshadow .deck-container .slide blockquote > :first-child:before {
+  content: "";
+  position: absolute;
+  z-index: -1;
+  background: #fff;
+  top: 0;
+  bottom: 0;
+  left: 0;
+  right: 0;
+}
+.boxshadow .deck-container .slide blockquote:after {
+  content: "";
+  position: absolute;
+  z-index: -2;
+  top: 10px;
+  bottom: 10px;
+  left: 0;
+  right: 50%;
+  -moz-border-radius: 10px/100px;
+  border-radius: 10px/100px;
+  -webkit-box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
+  -moz-box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
+  box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
+}
+.deck-container .slide blockquote p {
+  margin: 0;
+}
+.deck-container .slide blockquote cite {
+  font-size: .5em;
+  font-style: normal;
+  font-weight: bold;
+  color: #888;
+}
+.deck-container .slide blockquote:before {
+  content: "“";
+  position: absolute;
+  top: 0;
+  left: 0;
+  font-size: 5em;
+  line-height: 1;
+  color: #ccf0f0;
+  z-index: 1;
+}
+.deck-container .slide ::-moz-selection {
+  background: #08455f;
+  color: #fff;
+}
+.deck-container .slide ::selection {
+  background: #08455f;
+  color: #fff;
+}
+.deck-container .slide a, .deck-container .slide a:hover, .deck-container .slide a:focus, .deck-container .slide a:active, .deck-container .slide a:visited {
+  color: #599;
+  text-decoration: none;
+}
+.deck-container .slide a:hover, .deck-container .slide a:focus {
+  text-decoration: underline;
+}
+.deck-container .deck-prev-link, .deck-container .deck-next-link {
+  background: #fff;
+  opacity: 0.5;
+}
+.deck-container .deck-prev-link, .deck-container .deck-prev-link:hover, .deck-container .deck-prev-link:focus, .deck-container .deck-prev-link:active, .deck-container .deck-prev-link:visited, .deck-container .deck-next-link, .deck-container .deck-next-link:hover, .deck-container .deck-next-link:focus, .deck-container .deck-next-link:active, .deck-container .deck-next-link:visited {
+  color: #599;
+}
+.deck-container .deck-prev-link:hover, .deck-container .deck-prev-link:focus, .deck-container .deck-next-link:hover, .deck-container .deck-next-link:focus {
+  opacity: 1;
+  text-decoration: none;
+}
+.deck-container .deck-status {
+  font-size: 0.6666em;
+}
+.deck-container.deck-menu .slide {
+  background: transparent;
+  -webkit-border-radius: 5px;
+  -moz-border-radius: 5px;
+  border-radius: 5px;
+}
+.rgba .deck-container.deck-menu .slide {
+  background: rgba(0, 0, 0, 0.1);
+}
+.deck-container.deck-menu .slide.deck-current, .rgba .deck-container.deck-menu .slide.deck-current, .no-touch .deck-container.deck-menu .slide:hover {
+  background: #fff;
+}
+.deck-container .goto-form {
+  background: #fff;
+  border: 1px solid #cde;
+  -webkit-border-radius: 5px;
+  -moz-border-radius: 5px;
+  border-radius: 5px;
+}
+.boxshadow .deck-container .goto-form {
+  -webkit-box-shadow: 0 15px 10px -10px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
+  -moz-box-shadow: 0 15px 10px -10px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
+  box-shadow: 0 15px 10px -10px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
+}
diff --git a/samples/test1.c b/samples/test1.c
new file mode 100644 (file)
index 0000000..5ee21af
--- /dev/null
@@ -0,0 +1,13 @@
+#include <stdio.h>
+
+
+int main(int argc, char **argv)
+{
+       int a = 3;
+       int b = 7;
+       int c;
+       a += 5;
+       b *= 8;
+       c = a * b;
+       return c;
+}
diff --git a/samples/test1.exe b/samples/test1.exe
new file mode 100755 (executable)
index 0000000..861e6ab
Binary files /dev/null and b/samples/test1.exe differ
diff --git a/samples/test2.c b/samples/test2.c
new file mode 100644 (file)
index 0000000..06aff4c
--- /dev/null
@@ -0,0 +1,23 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+typedef struct snode {
+       int value;
+       struct snode *next;
+} node;
+
+void add(node **head, int x) {
+       node *n = malloc(sizeof(node));
+       n->value = x;
+       n->next = *head;
+       *head = n;
+}
+
+int main() {
+       node *list = NULL;
+       add(&list, 10);
+       add(&list, 20);
+       add(&list, 30);
+       add(&list, 99);
+}
+
diff --git a/samples/test2.exe b/samples/test2.exe
new file mode 100755 (executable)
index 0000000..a430d07
Binary files /dev/null and b/samples/test2.exe differ
diff --git a/stallman.jpg b/stallman.jpg
new file mode 100644 (file)
index 0000000..6b211e8
Binary files /dev/null and b/stallman.jpg differ
diff --git a/visual_studio.jpg b/visual_studio.jpg
new file mode 100644 (file)
index 0000000..ae95cb6
Binary files /dev/null and b/visual_studio.jpg differ